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.
| Author |
Topic |
|
cpat
Starting Member
5 Posts |
Posted - 2003-08-26 : 15:38:59
|
| I need to generate a script of my entire database, and place the resulting file on a network drive. And I need to run it as a job. I created a SQL Server Agent job with a step that calls scptxfr.exe. But, the job fails because it doesn't recognize the network drive ("The system cannot find the path specified"). It works fine when I run the job and use my c drive as the file location. And, when I run scptxfr from the DOS prompt, it works fine when I use the network drive as the file location (using the same exact command line that I use in the sql job). It just doesn't work when I run it through a sql job. I've also tried using the full name (\\servername\share) - it didn't work.Any ideas? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-08-26 : 18:43:13
|
| Instead of using a network drive, how about you save it to a local drive, then copy the file to the network drive. I'm curious as to why you are doing this though. What is the requirement? We may be able to come up with a different solution. Is it just so that you have the database script on another server? If so, why don't you use source control instead. We use Source Safe to save our scripts.Tara |
 |
|
|
shsmonteiro
Constraint Violating Yak Guru
290 Posts |
Posted - 2003-08-26 : 21:54:17
|
| You SQL Server is running under Local System Account, which does not allow you to access shared drivers. IF, and this is a big IF, you really need to access a shared drive, then change SQL Service and SQL Agent Service to a domain account qith access to both destination and source servers.Regards,Sérgio MonteiroTrust in no Oracle |
 |
|
|
cpat
Starting Member
5 Posts |
Posted - 2003-08-27 : 09:33:04
|
| Thanks - that's the problem. SQL Server Agent didn't have access to the other server.Sérgio - I am copying the script to a network server for backup purposes. In case this server goes down, I want to be able to re-create the database on a standby server. We are using other backup methods, too. I am new at this (obviously), so please let me know if you have any suggestions. Thanks for your quick help. |
 |
|
|
shsmonteiro
Constraint Violating Yak Guru
290 Posts |
Posted - 2003-08-27 : 16:33:21
|
| There are some ways to achieve it. You can use a StandBy Database, or Log Shipping to keep database uptodate. In a failure you should reverse papers and start using the new server.Take a look on BOL, and on Microsoft SQL Server Site about High Availibility regards,Sérgio MonteiroTrust in no Oracle |
 |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2003-08-28 : 01:44:50
|
quote: Originally posted by cpatSérgio - I am copying the script to a network server for backup purposes. In case this server goes down, I want to be able to re-create the database on a standby server. We are using other backup methods, too. I am new at this (obviously), so please let me know if you have any suggestions.
Why don't you just send your database backups to that network share? If you are new to SQL, you can easily setup a maintenance plan that will handle this for you. Maintenance plans have their limitations, but they do abou 90% of what you want - and setting one up is a snap. Check BOL for information on this.-ec |
 |
|
|
|
|
|
|
|