Solved

Clearing of remembered mapped drives in SQL server for backuping up to netowrk drives

Posted on 2014-09-17
4
540 Views
Last Modified: 2014-11-04
In the past I have been backing up my SQL databases to a removable or network mapped drive. I had to enable xp_cmdshell etc and when I try to map a drive the SQL states that this is a remembered drive, even though it doesn't exist. I would like to clear out those remembered drives without it messing up my SQL server install.

Does anyone know a command to do this? Also I don't know much SQL, but the output of the Remembered drive asks about overwriting it. However I don't know the syntax to do that.
0
Comment
Question by:donebert
  • 2
  • 2
4 Comments
 
LVL 26

Expert Comment

by:Zberteoc
ID: 40328546
If you are running the dos commands from SQL with xp_cmdshell it is possible that the OS is waiting for a response that is not provided(you can't provide feedback through xp_cmdshell). You can try to run the command directly in prompt window and give all the requested answers.
0
 
LVL 1

Author Comment

by:donebert
ID: 40328575
That is correct the OS is waiting for a response to overwrite the remembered connection Y/N. No valid response was provided, therefore it does not allow me to see that drive in SQL disk backup. It states it has a remembered connection. Not sure if xp cmd shell has something to clear out remembered mapped drives.
0
 
LVL 1

Author Comment

by:donebert
ID: 40328585
Here is what sql query shows
sql-drive-map-error.docx
0
 
LVL 26

Accepted Solution

by:
Zberteoc earned 500 total points
ID: 40328669
That is exactly what I was referring to. If you run the same command in OS prompt window it waits for your answer for the "want to override the rememberred connection?( Y/N)" question, which you can't provide with xm_cmdshell. If you run it in windows you can type Y/N, depending on what you want.

If you want to default to Yes very time you can try to add

/p:yes

to your command executed by xp_cmdshell.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now