November 22, 2005 at 7:23 pm
plz help me
how to export/import SQL Database between 2 difference servers without using Enterprise Manager
plz show me the way to do that, are there any stored procedure? any way?
plz help me, tks so much
November 22, 2005 at 8:05 pm
1. Start a database backup.
2. While the backup is running, if you are replacing a database on the target server, generate a script from the target server with any database setting, such as recovery mode and any security rights that are unique.
After the backup completed, use the restore command.
Reset the database option or security with the previously generated script.
Finally, delete the backup file.
See Books OnLine for the syntax of commands backup, restore, sp_change_users_login
Example statements using servers named "Source" and "Target" that can be run under Query Analyzer:
Backup database MyDatabase to disk = 'e:\MyDatabase.bak'
restore filelistonly from disk = '\\Source\e$\MyDatabase.bak'
-- The filelistonly will list the logical file names and the physical files names on the source server.
restore database MyDBCopy
from disk = '\\Source\e$\MyDatabase.bak'
with replace -- olny to replace an existing database
, move 'DataLogicalFileName' to 'new file name'
, move 'LogLogicalFileName' to 'new file name'
SQL = Scarcely Qualifies as a Language
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply