SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Calling Netbackup from SQL Job


Calling Netbackup from SQL Job

Author
Message
matt.gyton
matt.gyton
SSC-Addicted
SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)

Group: General Forum Members
Points: 496 Visits: 295
Hi there,

I am trying to initiate a Netbackup task from a SQL Job using the following CmdExec code:

"C:\Program Files\VERITAS\NetBackup\bin\dbbackex.exe" -f "C:\Program Files\Veritas\NetBackup\DbExt\MsSql\<Filename.bch>" -p <profilename> -u <username> -pw <password> -s <server> -np

If I run it from a Command Prompt window it works fine, however if I copy the exact same code into a SQL Job and use the job type 'Operating System (CmdExec)' it fails to run. All I get in the Job History is:

"Executed as user: Domain\Username. The step did not generate any output. Process Exit Code 2. The step failed."

I have managed to get this to work on another almost identical server using the same accounts and everything but for some reason it won't run on the one I'm currently using.

Any suggestions? Anything that needs to be enabled on the server perhaps?

Thanks,

Matt
TheGreenShepherd
TheGreenShepherd
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1684 Visits: 608
If you right click on SQL Server Agent in SSMS and then go to Properties -> Job System, is the box checked to use a non-admin proxy account?
matt.gyton
matt.gyton
SSC-Addicted
SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)

Group: General Forum Members
Points: 496 Visits: 295
No, it's actually greyed out (presumably because we don't have any)....although on the server it is working on it's also the same.
matt.gyton
matt.gyton
SSC-Addicted
SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)SSC-Addicted (496 reputation)

Group: General Forum Members
Points: 496 Visits: 295
Just in case anyone is interested I managed to resolve this issue....

I simply added the account running SQL Agent to the local admin group on the server, then restarted the SQL Agent service :-)
alanspeckman
alanspeckman
Right there with Babe
Right there with Babe (758 reputation)Right there with Babe (758 reputation)Right there with Babe (758 reputation)Right there with Babe (758 reputation)Right there with Babe (758 reputation)Right there with Babe (758 reputation)Right there with Babe (758 reputation)Right there with Babe (758 reputation)

Group: General Forum Members
Points: 758 Visits: 768
Rather than giving the agent account administrative rights to the entire server, it might help if you read this.

http://fixunix.com/veritas-net-backup/481537-start-netbackup-sqlserveragent.html


SQL Agent needs rights to create temporary ODBC connections. So you modify the registry permssions and give the Agent Account full access to the Veritas folder.
GeoffRuble-976616
GeoffRuble-976616
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 172
This worked for me. Thanks! I did know about the registry permissions mentioned in the comment below and that has worked for me in the past, but that didn't work this time, so I tried your fix and that did it. Thanks again.
alanspeckman
alanspeckman
Right there with Babe
Right there with Babe (758 reputation)Right there with Babe (758 reputation)Right there with Babe (758 reputation)Right there with Babe (758 reputation)Right there with Babe (758 reputation)Right there with Babe (758 reputation)Right there with Babe (758 reputation)Right there with Babe (758 reputation)

Group: General Forum Members
Points: 758 Visits: 768
which fix are you referring to?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search