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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Share Access From SSMS SQl 2005 2

Status
Not open for further replies.

rebelknight

Technical User
Jul 4, 2007
35
US
There is a share on a seperate file server that my SQL Server machine can access. When I sign on to the SQL Server I can see the share in windows and copy files toi and from it within file explorer.

However, when I browse for the drive letter assigned to the mapping from SQL Serverfor any task....I am not given the drive letter as an option.

If I also issue a T-SQL backup command to the drive it i not recognized.

Code:
BACKUP DATABASE [Test] TO  DISK = 'X:\Test.BAK'  
WITH  INIT ,  
NOUNLOAD ,  
NAME = 'Test backup',  
NOSKIP ,  
STATS = 10,  
DESCRIPTION = 'Test',  
NOFORMAT


Any clue why I cannot see the share from SQl Server Managemnet Studio but I can from windows?
 
I do not believe you can use a "mapped" drive in this manner.

You will need to use the UNC as in:

\\TargetServer\MyTargetFolder\

Thanks

J. Kusch
 
Also make sure the target folder on the remote server has access set for the account you are running SQL under.

Thanks

J. Kusch
 
J is correct, Mapped drives can't be accessed by the SQL Server.

There is no way to guarantee that the mapped drive will always be there, so SQL ignores them. Also the mapped drive is created in your session, not the SQL Servers. It probably doesn't have a mapped drive under it's account.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
I found that I needed to backup to the UNC and share name.

\\TargetServer\MyShareName\MyTargetFolder\

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top