Neste artigo você encontrará instruções sobre como administrar seu banco de dados MS-SQL Server 2008 na Locaweb.
Você precisará dos dados de acesso como endereço do servidor, login e senha.
Para saber as informações acima consulte o e-mail de instruções ou verifique nessa documentação .
Formatação de dados
Sua base foi instalada com o collation: SQL_Latin1_General_CP850_CI_AI
Para alterar a formatação da base de dados, consulte o artivo abaixo:
Collation( codificação de caracteres ) no MS SQL Server
Conectando-se diretamente no MS-SQL
Para se conectar diretamente no seu banco de dados você pode utilizar o MS-SQL Server Management Studio.
Clique aqui para fazer o download.
Usando o MS-SQL Server Management Studio
Dentre as diversas operações que podem ser executadas com o Microsoft SQL Server Management Studio, daremos dois exemplos:
Copiando a estrutura de um banco local para seu banco de dados na Locaweb:
Este procedimento é útil para criar no seu banco de dados na Locaweb uma estrutura de tabelas, índices, procedimentos, etc. idêntica à que você tem em um banco de dados local.
Para isso, no Microsoft SQL Server Management Studio, clique com o botão direito do mouse no banco de dados cuja estrutura deseja copiar e, em seguida, selecione “Tasks >> Generate Scripts…”.
Após a apresentação do Wizard, clique em “Next”. Em “Select Database”, selecione o banco de dados e, depois, clique no botão “Next”. Recomenda-se selecionar, na seção “Options”, todas as “Table / View Options”, ou seja, ativar:
“Script Check Constraints” “Script Foreign Keys” “Script Full-Text Indexes” “Script Indexes” “Script Primary Keys” “Script Triggers” “Script Unique Keys”
Selecione os objetos do banco de dados a partir dos quais deseja gerar a estrutura e para cada objeto, os itens necessários para gerá-la.
Recomenda-se também, para fins deste exemplo, selecionar em Script mode, o item Script to File e, em Save As, a opção ANSI text já que usaremos uma ferramenta DOS para executar o script.
Selecione o nome do arquivo a ser criado com extensão SQL e, depois, clique em OK.
O mesmo será gerado no diretório selecionado. Uma vez gerado, para executá-lo no servidor, basta digitar no Prompt do DOS:
isql -S <endereço_MS-SQL> SQL -U login_da_base -P sua_senha -i arquivo.sql
Ou se estiver usando um proxy, substitua IPdoProxy pelo IP conforme:
isql -S IPdoProxy -U login_da_base -P sua_senha -i arquivo.sql
Replicando dados de um banco local
Para exportar dados a partir de um banco de dados SQL local para seu banco de dados na Locaweb:
1- Microsoft SQL Server Management Studio: clique com o botão direito do mouse no banco de dados cuja estrutura deseja copiar. Em seguida, selecione no menu “Tasks >> Export Data”. Após a apresentação do Wizard, clique em “Next”. 2- Na janela “Choose a Data Source”, entre com as informações de conexão ao seu banco de dados local. 3- Na janela “Choose a Destination”, preencha da seguinte forma:
- Use SQL Server authentication
- Username: login_da_base
- Password: sua_senha
- Database: <default>
4- Em “Specify Table Copy or Query”, para copiar uma tabela escolha “Copy data from one or more tables or views”. 5- Em “Select Source Tables”, escolha as tabelas para exportar na coluna “Source”. 6- Em “Save and Execute Package”, para exportar imediatamente selecione “Run immediately”
Acessando dados via OLEDB em páginas ASP
Para acessar seu banco de dados, verifique o exemplo deste código ASP, que faz com que seja exibido o primeiro registro da tabela criada através do exemplo anterior de uso do Query Analyzer:
<% Set Conn = Server.CreateObject("ADODB.Connection") Set RS = Server.CreateObject("ADODB.Recordset") Conn.Open "Provider=SQLOLEDB.1;SERVER=<endereço_MS-SQL>;DATABASE=nome_da_sua_base;UID=seu_login;PWD=sua_senha;" RS.Open "select campo1, campo2 from tabela1", Conn RS.MoveFirst %> <p><%= RS("campo1") %></p> <p><%= RS("campo2") %></p> <% RS.Close Conn.Close Set RS = Nothing Set Conn = Nothing %> |
Usando o MS-SQL Server em scripts JSP/SERVLETS
Caso utilize programação em JSP/Servlets em seu site, crie um chamado em nosso Help Desk, na categoria “JSP/Servlets”, para que possamos habilitar o arquivo de configuração do Tomcat para acesso ao MS SQL Server.
Como funciona o Backup e Restore do MS-SQL Server
Diariamente é feita uma cópia de segurança de seu banco de dados. A recuperação é possível mediante solicitação. Lembramos que mantemos a cópia dos arquivos dos últimos sete dias para restauração.
De qualquer forma, para uma recuperação instantânea, recomendamos que você tenha sempre uma cópia local do seu banco de dados, pois a restauração leva algum tempo referente ao processo de localização da fita e acionamento do sistema de Backup.
Obs.: O primeiro restore do mês é gratuito. Para qualquer solicitação extra de restore dentro do mesmo mês em cobrança adicional, confira valores. Considera-se como unidade de restore qualquer pedido referente à recuperação de dados de uma data/hora específica independente do seu conteúdo: arquivos do site ou do banco de dados. Por exemplo, se forem solicitados restores de 2 dias ou 2 tipos diferentes (arquivos e banco de dados), considera-se cada restore uma solicitação distinta.
Veja também
- Senha da base MS SQL Server
- Solicitando Logs de SQL Server
- Porque minha base de dados MS-SQL mostra 20MB consumidos?
ìåéä złożoną pytanie dostępną Pojemną pracę|To wyślij to klejnot Więc cieszę się przyniosłem to|Ty musisz olśniewające pojemność do ustawiania atrakcyjna treść|To pismo na najwyższym poziomie zdobyłeś fresh obserwującego|Twój post był zarówno wnikliwy, jak i uroczo napisany|Jestem zdumiony przeszłość jak wiele dobrze wykształcony z tego posta|wykonujesz świetną pracę To rekord jest zeznanie o tym} {https://kredytero.pl|kredytero.pl|kredyt|kredyty|kredyt online|kredyty online|kredyt przez internet|kredyty przez internet}!
Każdy akapit był wejściem do przeczytania Dzięki Tobie złożoną temat dostępną Nadmierną pracę|To post to klejnot Więc zadowolony jak poncz przyniosłem to|Ty zmusić, aby zadziwiające umiejętność do pisania atrakcyjna treść|To pismo na najwyższym poziomie zdobyłeś new obserwującego|Twój post był zarówno wnikliwy, jak i cudownie napisany|Jestem zdumiony podczas jak wiele au fait z tego posta|wykonujesz adept pracę To wysłanie jest dowodem o tym} {pożyczki online|pożyczki|pożyczki pozabankowe|http://pozyczkaland.pl/|pozyczkaland.pl/|pożyczka online|pożyczka|pożyczka pozabankowa}!
Your insights are invaluable Actually regard highly your work blackjack casino.
This is top-notch writing You’ve earned a unfamiliar follower.
You’ve ìåéä a complex question accessible Capacious job.
You’ve outdone yourself with this post Truly impressive online sports betting.
This is top-notch writing You’ve earned a unfamiliar follower.
Every paragraph was a delight to read Thank you
Deficient critique on a fascinating topic Well done casino games us players.
Every object you ìåéä was spot-on Extraordinary analysis.
I’m amazed during how much I au fait from this post payday loans us enjoyers.
You be struck by an dazzling capability faculty to pen appealing content
What an enjoyable read You have a natural talent kamagravic.com/.
You’ve made a complex question accessible Large job installmentloanskov.com/.
This is correctly what I needed to peruse today Thanks you
I really got here from the beginning to the end of your send and turned into forthwith captivated with the aid your insights. Your apex is both unstained and concept-provoking. it is manifest that you’ve achieved pretentiously delve into, and your understanding to nearest the facts in an appealing bearing is wonderful. this is a responsible for i’ve been interested in after a while, and your post has provided me with a brand immature outlook. thanks concerning sharing your https://cialisbov.com/.
I’ve just finished reading your latest blog post, and I must say, it’s outstanding! The depth of your analysis coupled with your engaging writing style made for an exceptional read. What struck me most was your ability to break down complex ideas into digestible, relatable content. Your examples and real-life applications brought the topic to life. I’ve gained a lot from your insights and am grateful for the learning. Keep up the fantastic work – your blog is a treasure trove of knowledge!
Your latest blog post truly resonated with me! The depth of insight and the clarity of your thoughts are commendable. It’s evident that you’ve put a lot of thought and research into this topic, and it shows. Your ability to present complex ideas in such an accessible and engaging manner is a rare skill. Thank you for sharing your knowledge and perspective – it’s been a thought-provoking read and I’m already looking forward to your next piece!
I like the helpful info you provide in your articles. I’ll bookmark your weblog and check once more here frequently. I am relatively sure I’ll be told lots of new stuff proper right here! Good luck for the next!
WONDERFUL Post.thanks for share..extra wait .. …
I used to be very happy to seek out this internet-site.I wanted to thanks to your time for this wonderful learn!! I positively having fun with each little bit of it and I’ve you bookmarked to take a look at new stuff you blog post.
This is the fitting blog for anybody who needs to find out about this topic. You notice a lot its nearly laborious to argue with you (not that I truly would want…HaHa). You undoubtedly put a brand new spin on a subject thats been written about for years. Great stuff, just great!
Valuable information. Lucky me I found your web site by accident, and I am shocked why this accident did not happened earlier! I bookmarked it.
Hiya! Quick question that’s entirely off topic. Do you know how to make your site mobile friendly? My website looks weird when browsing from my apple iphone. I’m trying to find a template or plugin that might be able to resolve this problem. If you have any recommendations, please share. Appreciate it!
You completed a number of nice points there. I did a search on the issue and found nearly all people will have the same opinion with your blog.betflik
You actually make it appear so easy along with your presentation but I to find this matter to be actually something that I believe I might by no means understand. It kind of feels too complicated and very large for me. I am having a look forward on your next put up, I will attempt to get the cling of it!
Wow! This can be one particular of the most helpful blogs We’ve ever arrive across on this subject. Basically Magnificent. I am also a specialist in this topic therefore I can understand your hard work.
you’re really a good webmaster. The site loading speed is incredible. It seems that you are doing any unique trick. Also, The contents are masterpiece. you have done a excellent job on this topic!
You completed a number of nice points there. I did a search on the issue and found nearly all people will have the same opinion with your blog.betflik