Wednesday, March 7, 2012

backup and restore MSDE database

Hello,
We are currently migrating from NT to 2K servers and I
have been assigned to port over an MSDE database from the
NT environment to Windows 2000 Server.
Can someone please point me to a tutorial on how to backup
and restore an MSDE database..
Thanks,
niv
Hi ,
There is no syntax difference in backup and restore commands for a regular
sql server installation and msde.
You can use the following sample commands to perform backup and restore
Examples
A. Back up the entire MyNwind database
Note The MyNwind database is shown for illustration only.
This example creates a logical backup device in which a full backup of the
MyNwind database is placed.
-- Create a logical backup device for the full MyNwind backup.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwind_1',
DISK ='c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwind_1.dat'
-- Back up the full MyNwind database.
BACKUP DATABASE MyNwind TO MyNwind_1
B. Back up the database and log
This example creates both a full database and log backup. The database is
backed up to a logical backup device called MyNwind_2, and then the log is
backed up to a logical backup device called MyNwindLog1.
Note Creating a logical backup device needs to be done only once.
-- Create the backup device for the full MyNwind backup.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwind_2',
'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwind_2.dat'
--Create the log backup device.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwindLog1',
'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwindLog1.dat'
-- Back up the full MyNwind database.
BACKUP DATABASE MyNwind TO MyNwind_2
-- Update activity has occurred since the full database backup.
-- Back up the log of the MyNwind database.
BACKUP LOG MyNwind
TO MyNwindLog1
http://msdn.microsoft.com/library/de...us/adminsql/ad
_bkprst_8v3n.asp - Detailed informatin about backup and restore operations
along with examples.

No comments:

Post a Comment