sql cmd shell execution:

  • hi all

    i have a 3rd party demo software called Crystal Command which lets you execute a crystal report in the background using command shell and save it/email it etc

    what i want to do is execute the cmd shell cmds in sql, but when i execute the command the query simply seems to run forever with out ever saving the report.

    if i type the command into cmd prompt the application works but asks first if i want to continue in temp license mode - which i think may be my issue

    i can use cmd shell in sql to copy files to new locations etc which works fine

    but i dont want to take the chance of buying the software and finding i have the same issues - and its a similar issue i have experienced with openrowset on excel - it also just runs forever but actually does nothing (the query does not even cancel when i click stop)

    can anyone advise on maybe a system setup issue i may have? maybe i have to enable something in sql?

    any advise appreciated

    mal

  • malachyrafferty (6/16/2011)


    hi all

    i have a 3rd party demo software called Crystal Command which lets you execute a crystal report in the background using command shell and save it/email it etc

    what i want to do is execute the cmd shell cmds in sql, but when i execute the command the query simply seems to run forever with out ever saving the report.

    if i type the command into cmd prompt the application works but asks first if i want to continue in temp license mode - which i think may be my issue

    i can use cmd shell in sql to copy files to new locations etc which works fine

    but i dont want to take the chance of buying the software and finding i have the same issues - and its a similar issue i have experienced with openrowset on excel - it also just runs forever but actually does nothing (the query does not even cancel when i click stop)

    can anyone advise on maybe a system setup issue i may have? maybe i have to enable something in sql?

    any advise appreciated

    mal

    it sounds like you have to register the application on the server before you can continue. that popup has to be supressed.

    I think what is happening is the same dialog you identified... asking if you want to continue in temp license mode ...a popup...causes the cmd line to appear to run forever...it's stopped waiting for someone to click the yes/no dialog of that messagebox, but since it's command line that will never happen...its not even visible.

    since you don't want to buy it yet, is there some functionality, like a 30 day trial that is now expired, which started the popup ? maybe you can clean the registry so it's clean of whatever test teh popup used for a 30 day trial?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • hi lowell

    i just downloaded yesterday on advice from a friend (hes on hols in the usa so i dont want to bother him if he had the same issue) and it comes with 20 day trial - but every time you open the GUI or pass a cmd shell the demo prompt appears

    only reason im hesitant in buying the full version is because on the same sql server i cant use openrowset from excel - it behaves in very much the same way - just looking as if its executing and never ending with no output - have you ever seen that happen? i used to use open rowset all the time issue free with my previous employers

  • the hanging of the app from the command line is that messagebox dialog, guaranteed;

    I hate to say this, but you'll have to check the 3rd party apps documentation to supress that dialog/work with command prompt in Evaluation mode.

    you've proved a dialog comes up when you run it from a command prompt already, so that's the rock you have to look under first.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • yea i think your right, its not particularly expensive $350 but fingers crossed it works!

  • its the server 🙁

    just set it up on another sql server with a different report and it worked fine

  • i enabled ole automation and it now works yipeee 🙂

  • hmmmm...

    works some times and not other times, works all the time on another sql server !!

    any suggestions welcome!

    when i check sp_configure xp cmdshell has max value of 1 - what does this 1 mean?

  • some new developments

    i added some logging to my script which showed me

    17/06/2011 12:32:48.91 Starting...

    17/06/2011 12:32:48.91 Done.

    but the query took 16 mins to finish?

  • malachyrafferty (6/16/2011)


    when i check sp_configure xp cmdshell has max value of 1 - what does this 1 mean?

    It means what it says. There are two possible values for this setting. 0 and 1. What is the max of those two possible values? 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • i have since had to move my scripts and application to a sql 2000 server and link back to sql 2005 - this is working perfectly!

    but really its a bit worrying that our primary production server has these issues! so if anyone can help further please do 🙂

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply