Hi NG,
I have to backup several different databases, where the user can choose the
names of the backup image (bck).
In order to restore the correct database I have to distinguish between these
database images. I cannot assume that the backup image name says anything
about the database content. The user just likes to select a database image
file (bck) and restore it automatically. I solved this first by adding file
properties, but unfortunately such additional information got lost wehn
copying a backup image file to a USB memory stick.
My idea now is to write into the backup image with the DESCRIPTION option of
the BACKUP DATABASE command.
How can I retrieve this DESCRIPTION information in order to restore it to
the correct database?
Any idea?
thanks rene
You probably don't have to add anything. Just use RESTORE HEADERONLY to get database name etc from
the backup set.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Re Fo" <xrefox@.xnospamxesec.com> wrote in message news:%23tv73Kq3EHA.2804@.TK2MSFTNGP15.phx.gbl...
> Hi NG,
> I have to backup several different databases, where the user can choose the
> names of the backup image (bck).
> In order to restore the correct database I have to distinguish between these
> database images. I cannot assume that the backup image name says anything
> about the database content. The user just likes to select a database image
> file (bck) and restore it automatically. I solved this first by adding file
> properties, but unfortunately such additional information got lost wehn
> copying a backup image file to a USB memory stick.
> My idea now is to write into the backup image with the DESCRIPTION option of
> the BACKUP DATABASE command.
> How can I retrieve this DESCRIPTION information in order to restore it to
> the correct database?
> Any idea?
> thanks rene
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment