SQL express 2005 - can not set up a database why?

Im a beginner in ASP.NET and SQL. Please tell me how to run and paste a few tags on "SQLCMD T-SQL execution command line utility" (\90\Tools\Binn). Its SQL Express 2005. I cant paste a tag of an ASP.NET beginners site http://www.asp.net/GuidedTour/default.aspx). I cant set up a data base without doing it.

When attempting to run this installer (SQLCMD T-SQL execution command line utility), I get the DOS screen but not the 1> command prompt. If I leave the screen alone, the DOD command window closes after about 5 seconds.

"C:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLCMD" -S "machine-name\SqlExpress"

If I retry the prompt, same thing happens. Attempts to Paste the script are unsuccessful, and the DOS command screen closes on it's own.

Tank you very much,

nuno vieira




Answer this question

SQL express 2005 - can not set up a database why?

  • chapel21

    Hi,

    try to open first a command windows (with cmd.exe) then paste the code first starting the SQLcmd prompt in the window. I guess you are getting an error for some reason which makes the DOS box to return and close again. With specifying the right server name (or if its local just ".\SQLExpress") you should get a error message that indicates what has gone wrong during the connection process. Just make sure that you are using Windows Authentication I would always implicitly define the "-E" parameter which lets you connect with Windows credentials rather than SQL Server authentication.

    HTH, jens Suessmeyer.


  • Johnbo

    Hi!

    Trying to set up a data base of the ASP.NET beginners site:

    http://www.asp.net/GuidedTour/default.aspx

    please paste in run: C:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLCMD -S localhost\SqlExpress Not: C:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLCMD" -S "machine-name\SqlExpress and the problem is solved.

    Tank you all



  • Con

    "C:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLCMD" -S "machine-name\SqlExpress"

    u need to substitue machine-name with your own PC name

    under control panel-> system.


  • GHSR

    most probably its due to the machinename....
  • SQL express 2005 - can not set up a database why?