Hi,
I need to prepare an Installshield project that restore a database on
my target machine.
No problem with script
RESTORE DATABASE BIGStudio FROM DISK=MyDir\MyBackup.bak'
WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10, MOVE 'DB_dat' TO
'\Data\DB_Data.mdf',
MOVE 'DB__log' TO '\Data\DB_log.ldf'.
But in my target machine I can have SQL Server 2000, SQL Server 2005,
MSDE 2000...
I've tried to restore DB on my INSTALL dir but I receive an access
denied error. How can I restore my DB to the default SQL Server data
directory on my target machine?
Thank you
Gianluca DhoYou may need to obtain this info dynamically?
Check out xp_instance_regread
Immy
"Gianluca Dho" <gianluca.dho@.gmail.com> wrote in message
news:1159535209.992156.163070@.b28g2000cwb.googlegroups.com...
> Hi,
> I need to prepare an Installshield project that restore a database on
> my target machine.
> No problem with script
> RESTORE DATABASE BIGStudio FROM DISK=MyDir\MyBackup.bak'
> WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10, MOVE 'DB_dat' TO
> '\Data\DB_Data.mdf',
> MOVE 'DB__log' TO '\Data\DB_log.ldf'.
> But in my target machine I can have SQL Server 2000, SQL Server 2005,
> MSDE 2000...
> I've tried to restore DB on my INSTALL dir but I receive an access
> denied error. How can I restore my DB to the default SQL Server data
> directory on my target machine?
> Thank you
> Gianluca Dho
>
No comments:
Post a Comment