July 19, 2010 at 11:56 am
Hello,
I recently migrated the box of a SQL Server 2000 (32 bit) to a new Windows 2003 (64 bit) box. So far everything is covered by now but the issue of the mapped drives.
I have some mapped drives (F: to \\server\folder) and the SQL Server Agent uses that paths to read files, execute jobs and such.
If I restart the server, the mapped drives become "Unavailable" when reading it trough xp_cmdshell 'NET USE'. To fix that I have to manually disconnect/reconnect using NET USE command, this each time I restart the server.
The easiest way to fix that is to simply use UNC on the jobs instead to map the network drive. BUT! I cannot do that because the job perform certain DOS instructions that require a drive letter.
Are you familiar with something like this?
July 19, 2010 at 12:04 pm
Have you specified the /PERSISTENT switch in the NET USE command?
Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
Ramblings of a DBA (My SQL Server Blog)[/url]
Subscribe to my blog
July 19, 2010 at 12:07 pm
Sure. The problem is that the drive letter is there. However, is being reported with Unavailable status and cannot read anything from there until I remap and thus, the status is changed to Available.
August 2, 2010 at 9:03 am
I still haven't found a solution for this. If anyone have solved this please let me know.
What I did is a dirty trick that executes a batch file every hour deleting and remapping the drives to be sure that, if the server gets restarted will remap the drives in an "acceptable" period.
August 2, 2010 at 9:18 am
I haven't heard of this. Couple questions:
- Are the drives available in Windows and unavailable in SQL Server or unavailable in both?
- When you remap, what do you run?
August 2, 2010 at 9:28 am
Hi Steve,
The drives are tipically available on both Windows and SQL Server, however, when it becomes unavailable that's just inside SQL. If you login using the service account the shares are there and accesible, but if you go and try xp_cmdshell 'net use' the Unavail status is there.
For remapping what I do is:
xp_cmdshell 'net use F: /delete'
xp_cmdshell 'net use F: \\server\share /persistent:yes'
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply