Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Backup target filename alias

Status
Not open for further replies.

btturner

Programmer
May 17, 2001
175
US
Just inherited a new SQL 2000 DB -- the nitely FULL Backup job has an imbedded step which references a server & directory called (see entire script at end of this note):

\\CustDB\SQLBackups\FULL\Full_ApplData_01of04.bak'
\\CustDB\SQLBackups\FULL\Full_ApplData_02of04.bak'
\\CustDB\SQLBackups\FULL\Full_ApplData_03of04.bak'
\\CustDB\SQLBackups\FULL\Full_ApplData_04of04.bak'

When I log on to this SQL Server I do not see the directory called SQLBackups\FULL..... I do see the actual backup files in a directory called:

\\CustDB\Program Files\Microsoft SQL Server\MSSQL\backup\FULL

How is this configured? (Usually I'll see the directory name in Windows Explorer)

SCRIPT (imbedded as a job step):
Declare @str1 as nvarchar(100),@str2 as nvarchar(100),@str3 as nvarchar(100),@str4 as nvarchar(100)

Set str1='\\CustDB\SQLBackups\FULL\Full_ApplData_01of04.bak'
Set str2='\\CustDB\SQLBackups\FULL\Full_ApplData_02of04.bak'
Set str3='\\CustDB\SQLBackups\FULL\Full_ApplData_03of04.bak'
Set str4='\\CustDB\SQLBackups\FULL\Full_ApplData_04of04.bak'

Backup database Appl_Data
to disk=@str1, disk=@str2, disk=@str3, disk=@str4
with init, noformat
 
Code:
Set str1='\\CustDB\SQLBackups\FULL\Full_ApplData_01of04.bak'
wont work as wont the others - it needs to be -
Code:
Set @str1='\\CustDB\SQLBackups\FULL\Full_ApplData_01of04.bak'


[bandito] [blue]DBomrrsm[/blue] [bandito]
 
Typo - I forgot to add the "@" before the variable name in the above question. -- I found my answer: SQLBackups is the share name.

Is there a quick way to resolve a share name? that is, how can I quickly determnine that the share name "SQLBackups" is defined on:

E:\Program Files\Microsoft SQL Server\MSSQL\backups ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top