Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Posts
    2

    Unanswered: sqlcmd not found in binn folder

    hi

    i was trying to execute a sql script which i had developed for our use through sqlcmd in following format :-

    "c:/Program Files/Microsoft SQL Server/90/Tools/binn/sqlcmd.exe name.sql"

    but i get a msg saying that

    "'SQLCMD' is not recognized as an internal or external command,
    operable program or batch file."

    where exactly is sqlcmd stored if it is not present in binn folder ,i am not that much proficient inSQL DB ,from internet i found that this is format to run sql scripts through command line ,

    pls guide regarding this issue,looking forward for some guidance from experts

    regards,
    rahul

  2. #2
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    if you installed the SQL Server client tools in the default location, it should be in C:\Program Files\Microsoft SQL Server\90\Tools\Binn

    try typing this at the cmd line and see what you get:

    where sqlcmd.exe

  3. #3
    Join Date
    Jul 2009
    Posts
    2
    it says

    "INFO: Could not find files for the given pattern(s)."

    can the solution be to enter the path untill bin folder in PATH SYSTEM variable in env variable

    actually i am executing this script on a server ,we dont have access to see path variables ,so i have read on net that bin folder path should be entered in PATH SYSTEM variable

    any idea about this line of thought ?

    regards,
    rahul

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    If you are running this script on a workstation instead of the server, you must first install the SQL 2005 Client tools on the workstation before you can run any SQL scripts from that workstation.

    If you are running this script on the machine that is running SQL Server, then it ought to run and you should be able to type the word PATH at a command prompt to see the current search path.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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