Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simplest way to copy whole database
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01301462
Message ID:
01301791
Views:
13
This message has been marked as a message which has helped to the initial question of the thread.
>>>Hi everybody,
>>>
>>>I have a database on the test server. I also used to have a database on the local PC, but not anymore (though I found some MDB file).
>>>
>>>My question is - what would be the simplest way to copy the database from the test server to the local PC and how would I adjust the connection string to use it locally?
>>>
>>>Thanks a lot in advance.
>>
>>
>>Naomi,
>>
>>Please find example script below:
>>
>>
>>BACKUP DATABASE MyDatabaseName
>>TO DISK = 'c:\Backups'
>>WITH  DESCRIPTION = 'This is a backup description',
>>NOFORMAT, INIT,  NAME = 'BackupName.bak', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
>>
>>
>>This should work on SQL2000-SQL2005 all versions.
>>
>>
>>Regards,
>>
>>Zoran
>
>Something was wrong with this command which I executed as is. The file name was created as Backups (I put c:\Development\Backups and I didn't create Backup directory myself - was this an error)?
>
>Anyway, I'll try to restore from this file now, thanks again.

You should specify the full file name in DISK:
TO DISK = 'c:\Backups\SomeBackup.BAK'
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform