Results 1 to 4 of 4

Thread: xp_cmdshell problem with SQL server 6.5?

  1. #1
    Jason Lam Guest

    xp_cmdshell problem with SQL server 6.5?

    I have an external program which runs by the xp_cmdshell. This program get data from serial port and then store it back to the database (directly, by JDBC) It seems to me that when xp_cmdshell is running a program, the whole SQL server stop responding to any other request. (Is this normal?) Anyways, I insert a record into a table and this triggers an external program to run. But then the whole SQL server is hold at that stage. Logins are ok but no SQL or T-SQL commands are accepted. It seems to me like the SQL server (xp_cmdshell in specific) is waiting for the external program to terminate but the external program is waiting for the server is be ready to accept data. They are both waiting for each other. Any suggestions here?

  2. #2
    Kenneth Wilhelmsson Guest

    xp_cmdshell problem with SQL server 6.5? (reply)

    What happens if you run it from a command prompt instead of xp_cmdshell? Is it waiting for some kind of input?
    What is the CPU usage at this point? Are you sure the called programs are behaving like they should?

    No, it's not normal for SQL Server to stop responding because you use xp_cmdshell. It's a cumbersome action that requires a lot of overhead, but not that much for a single (or two) use.

    /Kenneth

    ------------
    Jason Lam at 3/19/99 11:43:01 PM

    I have an external program which runs by the xp_cmdshell. This program get data from serial port and then store it back to the database (directly, by JDBC) It seems to me that when xp_cmdshell is running a program, the whole SQL server stop responding to any other request. (Is this normal?) Anyways, I insert a record into a table and this triggers an external program to run. But then the whole SQL server is hold at that stage. Logins are ok but no SQL or T-SQL commands are accepted. It seems to me like the SQL server (xp_cmdshell in specific) is waiting for the external program to terminate but the external program is waiting for the server is be ready to accept data. They are both waiting for each other. Any suggestions here?

  3. #3
    Jason Lam Guest

    xp_cmdshell problem with SQL server 6.5? (reply)

    When I run it from command prompt, everything seems to be fine. The program will run (get data input from serial then insert into database by JDBC) and then terminate in a normal manner. After I used xp_cmdshell, that process just got stuck somewhere and wouldn't terminate.




    ------------
    Kenneth Wilhelmsson at 3/20/99 11:05:11 AM

    What happens if you run it from a command prompt instead of xp_cmdshell? Is it waiting for some kind of input?
    What is the CPU usage at this point? Are you sure the called programs are behaving like they should?

    No, it's not normal for SQL Server to stop responding because you use xp_cmdshell. It's a cumbersome action that requires a lot of overhead, but not that much for a single (or two) use.

    /Kenneth



  4. #4
    Jason Lam Guest

    xp_cmdshell problem with SQL server 6.5? (reply)

    I have pin pointed to where the problems is, the Java external program is where the problem is and not the other part. I tried to write a SIMPLE java database program that do a SELECT * FROM tablename, that doesn't work either. I have also tried other java programs to run on SQL server, they are all fine. So this problem should be due to SQL server locking up after the execution of a JDBC app.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •