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 |
bhushan_juare
Starting Member
45 Posts |
Posted - 2012-07-06 : 07:16:49
|
Hi Everyone,I have created a batch file which runs on remote server via SQL jobStep 1) Create connection string and Maintaince Plan i.e. SSIS packageStep 2) Unzip program using BATCH file and transfer ZIP file to other Remote Server.Now problem is when i execute BATCH file manually its working fine..But, when i created SQL job and use xp_cmdshell in it its goin worthless..i dont know what went wrong...Thanks.... |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-06 : 09:40:10
|
does service account you use for running job has enough privledges to execute cmdshell? are you getting any error messages in sql job history log?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2012-07-06 : 10:58:43
|
Type xp_cmdshell 'ipconfig' - for the appropriate logon . If you get something like : Msg 15281, Level 16, State 1, Procedure xp_cmdshell, Line 1SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. Then your permissions are inappropriateJack Vamvas--------------------http://www.sqlserver-dba.com |
|
|
bhushan_juare
Starting Member
45 Posts |
Posted - 2012-07-07 : 03:32:27
|
Where i suppose to type xp_cmdshell ?Could you please elaborate it... |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2012-07-08 : 01:29:09
|
Yes, open SSMS (although you could try with SQLCMD) , connect to SQL Server instance - and type the command posted aboveJack Vamvas--------------------http://www.sqlserver-dba.com |
|
|
IowaTechBear
Starting Member
2 Posts |
Posted - 2012-07-19 : 12:58:14
|
What do your error and server logs say? It could be a permissions problem, a configuration issue with xp_cmdshell. Either one will give different error messages. |
|
|
|
|
|