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
 SQL Server Administration (2005)
 [SQL2005] Use an environment variable in a backup

Author  Topic 

juerisnai
Starting Member

1 Post

Posted - 2008-06-27 : 05:30:46
Hi!

I have to backup a lot of databases and I only use two directories to save that files. My idea is to create an environment variable to store the path.
Ex:
backup1 --> C:\backup\backup1
backup2 --> C:\backup\backup2

Is it possible?

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2008-06-27 : 07:16:23
There is no such thing as environment or global variables in sql server.

- Lumbago
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-27 : 08:04:31
Do you mean you want to have Timestamp on each backup files?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-27 : 12:42:05
Check out isp_Backup: http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-27 : 12:44:12
quote:
Originally posted by Lumbago

There is no such thing as environment or global variables in sql server.

- Lumbago



There is in SSIS or DTS Packages.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-28 : 00:33:01
Will you backup db in ssis or dts?
Go to Top of Page
   

- Advertisement -