cm regisrar o banco no msde?

16/09/2005

0

Por Favor estou precisando muito da ajuda de vcs

eu tenho uma base (pronta) q foi criada em msde numa outra maquina, eu gostaria de saber qual script q eu tenho q rodar para fazer o msde da minha maquina enchergar essa base de dados

melhor explicando

eu tenho a base e o msde, mas eles não estão se enxegando como eu faço para fazer o meu msde enxergar a base??

Grato


Henrytpc

Henrytpc

Responder

Posts

16/09/2005

Rjun

Se você não tem o Enterprise Manager então use o OSQL que é um utilitário de linha de comando. Vou postar o help do SQL Server para atachar um banco de dados.

sp_attach_db Attaches a database to a server. Syntax sp_attach_db [ @dbname = ] ´dbname´ , [ @filename1 = ] ´filename_n´ [ ,...16 ] Arguments [@dbname =] ´dbname´ Is the name of the database to be attached to the server. The name must be unique. dbname is sysname, with a default of NULL. [@filename1 =] ´filename_n´ Is the physical name, including path, of a database file. filename_n is nvarchar(260), with a default of NULL. There can be up to 16 file names specified. The parameter names start at @filename1 and increment to @filename16. The file name list must include at least the primary file, which contains the system tables that point to other files in the database. The list must also include any files that were moved after the database was detached. Return Code Values 0 (success) or 1 (failure) Result Sets None Remarks sp_attach_db should only be executed on databases that were previously detached from the database server using an explicit sp_detach_db operation. If more than 16 files must be specified, use CREATE DATABASE with the FOR ATTACH clause. If you attach a database to a server other than the server from which the database was detached, and the detached database was enabled for replication, you should run sp_removedbreplication to remove replication from the database. Permissions Only members of the sysadmin and dbcreator fixed server roles can execute this procedure. Examples This example attaches two files from pubs to the current server. EXEC sp_attach_db @dbname = N´pubs´, @filename1 = N´c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf´, @filename2 = N´c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log.ldf´



Responder

18/02/2006

Sistemald

Me da uma ajuda aí

tenho os seguintes arquivos, criados pelo starteam
E:\Projetos\StarTeam Repository\DB\sistemald_data_01.mdf
...\sistemald_data_02.ndf
...\sistemald_data_03.ndf
...\sistemald_log_01.ldf
...\sistemald_log_02.ldf
...\sistemald_log_03.ldf

nome do usário é ´sistemald´ senha ´abc123´

qual seria os camando para usar (OSQL)?


Responder

Assista grátis a nossa aula inaugural

Assitir aula

Saiba por que programar é uma questão de
sobrevivência e como aprender sem riscos

Assistir agora

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar