USE FMP
EXEC sp_addumpdevice 'disk', 'MyNwind_1', 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\man\MyNwind_1.BAK'
Explanation---sp_addumpdevice is a stored procedure used to add a dummy device on your disk that accept 3 parameter
1.Place where you want to create adummy device.Here disk
2.Name of dummydevice-----MyNwind_1
3.Absolute Path of the Device--C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\man\MyNwind_1.BAK'
Here bold 1 is the name of database file.
After Executing Query,Your Device is Created.Then Execute the following Query
BACKUP DATABASE FMP TO MyNwind_1
This Query takes the backup of DataBase name 'FMP' to device MyNwind_1 with a name of MyNwind_1.BAK
EXEC sp_addumpdevice 'disk', 'MyNwind_1', 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\man\MyNwind_1.BAK'
Explanation---sp_addumpdevice is a stored procedure used to add a dummy device on your disk that accept 3 parameter
1.Place where you want to create adummy device.Here disk
2.Name of dummydevice-----MyNwind_1
3.Absolute Path of the Device--C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\man\MyNwind_1.BAK'
Here bold 1 is the name of database file.
After Executing Query,Your Device is Created.Then Execute the following Query
BACKUP DATABASE FMP TO MyNwind_1
This Query takes the backup of DataBase name 'FMP' to device MyNwind_1 with a name of MyNwind_1.BAK
Comments