none
SQLCMD error: "Native Client not installed correctly."

    问题

  • Just installed SQL 2008 server, enterprise with everything.

    Trying to set up Adventureworks using: sqlcmd -E -S %_instancename% -d master -i "%_sourcepath%AdventureWorks 2008 Data Warehouse\instawdwdb.sql"
    -b -v SqlSamplesSourceDataPath = "%_sourcepath%" -v SqlSamplesDatabasePath = "%_datapath%"

    and I get the above error. I checked if the native Client was installed under ODBC Data Sources>>Drivers, and it is there.

    Anyone have any thoughts of what I might try next?? Thanks!!


    --PhB
    • 已移动 Papy Normand 2009年4月9日 18:29 Better forum ( with agreement of the OP )
    2009年4月9日 15:22

答案

  • Thanks.

    Yes, I figured out the issue.

    1: Had to run each script in SSMS as a query script in SQLCMD Mode
    2: I was running in Windows Auth mode, so had to set to Mixed Mode and had to log in with sa account
    3: Had to enable named Piped in Server Config
    4: Restart Server--VOILA!
    --PhB
    2009年4月9日 18:56

全部回复

  • Hello,

    I think that CodePlex advices to execute instawdwdb.sql in SSMS not sqlcmd.
    Are you sure that the System Environment variables SqlSamplesSourceDataPath and SqlSamplesDatabasePath have the correct values and are defined on the level System ?

    Have a nice day

    PS : there is a forum special SQL Server Samples and Community Projects :
    http://social.msdn.microsoft.com/Forums/en-US/sqlserversamples/threads

    David Reed is "the" specialist of these kinds of questions 

    Do you want that a moderator moves this thread towards this Forum ?
    If you post that you agree, a moderator will do the move ASAP
    The new thread ( answered ) is here :
    http://social.msdn.microsoft.com/Forums/en-US/sqlserversamples/thread/babcf249-5cbf-4980-b764-d0e6350c134a

    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.
    2009年4月9日 16:40
  • Thanks! Yes, please move it.
    --PhB
    2009年4月9日 17:15
  • Hello PhrankBooth,

    Move done.
    I hope that you will find quickly a solution to your problem ( i am interested by the answer )

    Have a nice day
    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.
    2009年4月9日 18:31
  • Thanks.

    Yes, I figured out the issue.

    1: Had to run each script in SSMS as a query script in SQLCMD Mode
    2: I was running in Windows Auth mode, so had to set to Mixed Mode and had to log in with sa account
    3: Had to enable named Piped in Server Config
    4: Restart Server--VOILA!
    --PhB
    2009年4月9日 18:56
  • Hello,

    Thanks to post the good answer ( it is so rare , but so useful from other visitors having the same problem

    Have a nice day

    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.
    2009年4月9日 19:07