Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2006
    Posts
    26

    Unanswered: Want to run Database script from Dos

    Hi,

    I want to run the database script from the dos prompt. how can i ?

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    you want to read about the osql command line utility.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Sep 2006
    Posts
    21
    You can use the OSQL utility.

    osql -E -i inputfilename -o outputfilename

    -E is the trusted connection
    input filename is where you save the script that you want to run on the server.

    outputfile name is , the output is stored.

    Thanks

  4. #4
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    if you are using 2005, check out sqlcmd.exe. it's the new and improved osql.

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Quote Originally Posted by jezemine
    it's the new and improved osql.
    ...which was the new and improved isql.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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