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 |
|
a5972s
Starting Member
4 Posts |
Posted - 2007-10-16 : 12:01:14
|
| Hi,I'm trying to execute a command line script to backup a database using dbbackex.exeCan someone cast an eye over the script and let me know what the issue is. I end up with NULL output.--Turn on Advanced featuresEXEC sp_configure 'show advanced options', 1reconfigurego--Turn on xp_cmdshellEXEC sp_configure 'xp_cmdshell', 1reconfigurego--Run scriptexec master.dbo.xp_cmdshell '"C:\Program Files\Veritas\NetBackup\bin\dbbackex.exe" -f ''"C:\Program Files\VERITAS\NetBackup\DbExt\MsSql\NBU_Full.bch"'' -p Test_Sql -u username -pw password -np', no_outputgo--Turn off xp_cmdshellEXEC sp_configure 'xp_cmdshell', 0reconfigurego--Turn off advanced optionsEXEC sp_configure 'show advanced options', 0reconfigurego |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-10-16 : 12:13:19
|
Guessing:exec master.dbo.xp_cmdshell '"C:\Program Files\Veritas\NetBackup\bin\dbbackex.exe" -f ''"C:\Program Files\VERITAS\NetBackup\DbExt\MsSql\NBU_Full.bch"'' -p Test_Sql -u username -pw password -np', no_output Do you need that (doubled up) single quote in there?Kristen |
 |
|
|
a5972s
Starting Member
4 Posts |
Posted - 2007-10-16 : 12:26:12
|
| I get the error...'C:\Program' is not a recognized as an internal or external command,operable program or batch file.NULL..when I amend to read...exec master.dbo.xp_cmdshell '"C:\Program%20Files\Veritas\NetBackup\bin\dbbackex.exe" -f ''"C:\Program Files\VERITAS\NetBackup\DbExt\MsSql\NBU_Full.bch"'' -p Test_Sql -u username -pw password -np'..I get the following...The filename, directory name, or volume label syntax is incorrect.NULLHELP!! |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-10-16 : 12:34:27
|
| its the ones I marked up in RED that I think need removing ... or was that what you tried?Kristen |
 |
|
|
a5972s
Starting Member
4 Posts |
Posted - 2007-10-16 : 12:38:22
|
| ..I get the following when quotes are removed...The filename, directory name, or volume label syntax is incorrect.NULL |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-10-16 : 12:45:05
|
| (I don't think the %20 will help, as that's for a URL which probably won't be interpretted corectyl in this scenario)Please show me the [exact] command you are trying, because what you posted earlier still has the single quotes in it.Kristen |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-10-16 : 12:46:34
|
| Actually probably save time if I show you the command I was meaning. You may have been using that one, but to avoid confusion:exec master.dbo.xp_cmdshell '"C:\Program Files\Veritas\NetBackup\bin\dbbackex.exe" -f "C:\Program Files\VERITAS\NetBackup\DbExt\MsSql\NBU_Full.bch" -p Test_Sql -u username -pw password -np', no_outputif that doesn;t work what do you get when you type this into a Command Prompt:"C:\Program Files\Veritas\NetBackup\bin\dbbackex.exe" -f "C:\Program Files\VERITAS\NetBackup\DbExt\MsSql\NBU_Full.bch" -p Test_Sql -u username -pw password -npKristen |
 |
|
|
a5972s
Starting Member
4 Posts |
Posted - 2007-10-16 : 12:47:35
|
| exec master.dbo.xp_cmdshell '"C:\Program Files\Veritas\NetBackup\bin\dbbackex.exe" -f "C:\Program Files\VERITAS\NetBackup\DbExt\MsSql\NBU_Full.bch" -p Test_Sql -u username -pw password -np'goHope this helps |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-10-16 : 13:38:41
|
| OK, well that's identical to what I hoped you were running.You'll need to try running the actual command from a Command Prompt and seeing what that says. if you can debug that then you can put whatever changes you find you need to make back into the xp_cmdshell version.Kristen |
 |
|
|
|
|
|
|
|