April 5, 2004 at 6:44 am
How do I run CVS commands through sql server xp_cmdshell. If I run eg. xp_cmdshell 'cvs -d :pserver:xxxx@xxx.xxx.xxx.xxx:/usr/local/cvsroot login' is not giving result. I run this command and wait for 10 minutes I have not got any answer so I stopped. How do I run this.
April 6, 2004 at 8:44 am
I am not familliar with cvs, but there might be a couple of things you can check.
Do you need to be in a special directory to issue this command? xp_cmdshell runs in \Windows\System32 on my machine. ie if you run xp_cmdshell 'dir' you get the contents of the system32 directory. if you issue the command xp_cmdshell 'pushd C:\ && dir && popd' you get the contents of the c:\ directory. You might need to string a couple of commands together to issue the cvs command, or like ftp you might have to create a script to issue the commands for the cvs session and then run the script from xp_cmdshell.
Do you need to be logged in as a particular user to issue this command? You might check the account context in which the xp_cmdshell is running to ensure it has permissions to issue the cvs command.
IF you need a persistent connection through the cmd shell, xp_cmdshell does not provide persistence between executions. ie If I were going to issue a series of ftp commands, I would need to create the ftp script and then issue a series of commands with the && symbol to run the ftp script. I could not use xp_cmdshell 'ftp [port]' and then expect to use xp_cmdshell again to issue the logon information.
Hope this helps.
Steve
April 7, 2004 at 4:40 am
Hi Steve,
Thanks for your kind answer. My CVS.exe is in PATH. So, I could able to run CVS --help through xp_cmdshell. But, If I run any other commands like login, execution is going to infinite. Even I could not able to stop cvs from process list.
Please give any clue if you have.
Thanks
Sreedhar
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy