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 2012 Forums
 Transact-SQL (2012)
 SQL Net Use Error

Author  Topic 

Pete_N
Posting Yak Master

181 Posts

Posted - 2014-12-12 : 06:28:29
SQL2014 trying to use a shared drive to make daily backups

EXEC xp_cmdshell 'NET USE Y:\ \\FX1\Drobo Backup\Backups\SQL Backups\CBN abc12324 /USER:SQLNaster /PERSISTENT:yes'

Keep getting the error

output
The syntax of this command is:
NULL
NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
[/USER:[domainname\]username]
[/USER:[dotted domain name\]username]
[/USER:[username@dotted domain name]
[/SMARTCARD]
[/SAVECRED]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]
NULL
NET USE {devicename | *} [password | *] /HOME
NULL
NET USE [/PERSISTENT:{YES | NO}]
NULL
NULL

and when trying to back up to Y i get xp_create_subdir() returned error 3, 'The system cannot find the path specified.'

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-12-12 : 09:00:02
Your command begins with:
NET USE Y:\

Yet the documentation and the error message clearly say "devicename". In Windows, a devicename is a letter followed by a colon. The backslash is invalid.
Go to Top of Page

Pete_N
Posting Yak Master

181 Posts

Posted - 2014-12-12 : 09:31:46
HI,

I have tried with and without the backslash, both get the same error
Go to Top of Page

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-12-12 : 09:49:31
Does the same command work at the command line?
Go to Top of Page
   

- Advertisement -