| Author |
Topic |
|
rohans
Posting Yak Master
194 Posts |
Posted - 2003-11-19 : 15:46:13
|
| I have a share drive on a NAS server. I want to backup to this share drive.is this possible? If not then what is the solution?Thank youAll help appreciated. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-11-19 : 15:51:15
|
| Just use the UNC path in Query Analyzer. You can not do it in Enterprise Manager, well at least you can't navigate to it.BACKUP DATABASE DBNameGoesHereTO DISK = '\\Server1\ShareName\DBNameGoesHere.BAKWITH INITTara |
 |
|
|
rohans
Posting Yak Master
194 Posts |
Posted - 2003-11-19 : 16:12:05
|
| That is great but what if i want to do it as a scheduled job, like in my maintenance Plan. Although a single job could work I guess.All help appreciated. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-11-19 : 16:14:17
|
| I have not done it as a maintenance plan. Just copy the path into the maintenance plan and see if it works. But why do you need to use maintenance plans. Why not just schedule the command?Tara |
 |
|
|
rohans
Posting Yak Master
194 Posts |
Posted - 2003-12-12 : 12:14:54
|
| I tried doing the backup as a script in Query Analyser using a map drive eg "x:\sql\databasename.bak". This failed due to error accessing the share. I used a profile that has permission to the share to start the SQL services and it is still failing. I want to know if there is a strored procedure to tell the account that is starting the sql services? the error is as follows:Server: Msg 3201, Level 16, State 1, Line 1Cannot open backup device 'z:\sql\pro01.bak'. Device error or device off-line. See the SQL Server error log for more details.Server: Msg 3013, Level 16, State 1, Line 1BACKUP DATABASE is terminating abnormally.I also tried this workaround at microsoft http://support.microsoft.com/default.aspx?scid=kb;en-us;207187All help appreciated. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-12-12 : 12:18:34
|
| Put that path (Z:\sql) into Start..Run and see if you get an error. If you do, post the error here. If you don't, then the problem is with the account that you logged into Query Analyzer with. It doesn't use the sql service account until you schedule it as a job.Tara |
 |
|
|
rohans
Posting Yak Master
194 Posts |
Posted - 2003-12-12 : 17:13:44
|
| It works when I do it from the physical SQL server, but not from my workstation. why is this? It also seems that the changes take a while to propagate the network as the same script was failing even after I adjusted the profile that started the services.All help appreciated. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-12-12 : 17:25:45
|
| What changes take a while to propagate? You are just running a backup to a networked drive, there isn't anything to propagate.Also, what do you mean it doesn't work from your workstation? If you connect to the database server from your client machine using Query Analyzer, what error do you get? Please explain as it should work from both. The mapped drive must exist on the database server though even if you run the command from your machine.BTW, you should use UNC paths instead of mapped drives, like in my example.Tara |
 |
|
|
rohans
Posting Yak Master
194 Posts |
Posted - 2003-12-13 : 14:02:52
|
| The fact that the username starting the sql server has permissions to the shared folder. From the work station it didn't work because the permission did not seem to propagate. It working now and I will try the UNC path when I get in office.All help appreciated. |
 |
|
|
|