Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to avoid that SQL remembers the last backup po

Author  Topic 

SQLMark
Starting Member

18 Posts

Posted - 2010-04-30 : 05:07:29
Hi guys,
I have create a small setup program that allow the end user to make a backup of database using the T-SQL command:

BACKUP DATABASE [MyDB] TO DISK = N'C:\Backup\Db.bak'

As you know, SQL Server (inside Management Studio) remembers the last database position: infact, when you make a backup using the IDE, next time you will find the previous path you have been used.
So, if I create a backup manually (i.e. inside "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup") and then I use my software that launch the T-SQL backup under "C:\Backup\", the next time in Management Studio I will be confused because I will find "C:\Backup\" that is not what I've setted...

Is there a way to avoid this?
Where does SQL Server store every last backup path?

Thanks!
   

- Advertisement -