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 |
ravis
Starting Member
7 Posts |
Posted - 2009-06-01 : 03:37:56
|
Hi,I want to run jar file which is reside on remote server using Xp_cmdshell. I tried the following approach , but it is not able to succeed.xp_cmdshell "cd RMIxp_cmdshell set path=c:\jdk1.6.0_10\binxp_cmdshell 'java RmiClient 172.10.3.114 3232 java -jar /Users/laser/Desktop/RMI/XML_Creator.jar'"it gives error as,Server: Msg 103, Level 15, State 7, Line 1The identifier that starts with 'cdxp_cmdshell cd RMxp_cmdshell set path=c:\jdk1.6.0_10\binxp_cmdshell 'java RmiClient 172.10.3.114 3232 java -jar ' is too long. Maximum length is 128.Any one help on this. Thanks in advance.RAVIS |
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-06-01 : 04:33:52
|
Ravi,Combine all the statement as a batch file, ask mohan to create a batch file, and execute a .bat file using xp_cmdshellSenthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceled |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-06-01 : 04:35:58
|
xp_cmdshell the statements are not persistent. When you execute the first statement xp_cmdshell "cd RMI" that command is only good for the duration of the xp_cmdshell call therefore when you execute the next command xp_cmdshell "c:\jdk1.6.0_10\bin" the cd RMI is no longer valid.Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceled |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-06-01 : 04:38:54
|
quote: Originally posted by senthil_nagore Ravi,Combine all the statement as a batch file, ask mohan to create a batch file, and execute a .bat file using xp_cmdshellSenthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceled
Who is mohan?MadhivananFailing to plan is Planning to fail |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-06-01 : 04:39:24
|
Not similar, the same project they continue!Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceled |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2009-06-01 : 04:40:25
|
he is front end programmer in my ex-team!Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceled |
|
|
ravis
Starting Member
7 Posts |
Posted - 2009-06-01 : 06:23:14
|
Hi Senthil,MadhivananI got it and it is working now. Thanks.Ravi.S |
|
|
|
|
|
|
|