Re: Backing up 2 databases..
From: Andrea Montanari (andrea.sqlDMO_at_virgilio.it)
Date: 04/20/04
- Next message: Sue Hoegemeier: "Re: Cannot open the SQL Server Books Online file SQL80.col"
- Previous message: dev: "Backing up 2 databases.."
- In reply to: dev: "Backing up 2 databases.."
- Next in thread: dev: "Re: Backing up 2 databases.."
- Reply: dev: "Re: Backing up 2 databases.."
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 20 Apr 2004 18:11:05 +0200
hi,
"dev" <anonymous@discussions.microsoft.com> ha scritto nel messaggio
news:9A3740A3-E7C2-44B6-B717-29682B262BD5@microsoft.com...
> Hi,
>
> Is it ok to backup 2 databases in one file. Our vb.net app uses 2
databases (created on MSDE) and we want to prompt user to do backup during
uninstallation but do not want to ask them twice (for each database). Then
later on we want to be able to restore from the backup files too.
>
> Any suggestions.
>
> Thanks
each backup file can contain more than 1 single database backup set, even
from multiple databases...
you have to specify the syntax as
BACKUP DATABASE databasename
TO DISK = N'c:\..\phisical path.bck'
WITH INIT
for the very first backup, in order to insure it overwrites any existing
one, while you have to omit the WITH INIT clause for additional database
backup set you want to include in the same backup device..
in order to restore from it, you have to use the syntax as
RESTORE DATABASE databasename
FROM DISK = N'c:\..\phisical path.bck'
WITH FILE = n
where n is the backup set file position within the backup device...
you can see the whole content of your backup device executing
RESTORE HEADERONLY
FROM DISK = N'c:\..\phisical path.bck'
hth
-- Andrea Montanari (Microsoft MVP - SQL Server) http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org DbaMgr2k ver 0.7.0 - DbaMgr ver 0.53.0 (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual interface) --------- remove DMO to reply
- Next message: Sue Hoegemeier: "Re: Cannot open the SQL Server Books Online file SQL80.col"
- Previous message: dev: "Backing up 2 databases.."
- In reply to: dev: "Backing up 2 databases.."
- Next in thread: dev: "Re: Backing up 2 databases.."
- Reply: dev: "Re: Backing up 2 databases.."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|