Jeffrey Palermo (.com)

Sponsors

The Lounge

Wicked Cool Jobs

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
How to use SQL Server Express (where's the UI?) - level 200

If you are used to working with SQL Server 2000, you may expect to find a tool similar to Enterprise Manager and Query Analyzer.  SQL Express is a free product, and it shows, but you get an awful lot for free. . . but you don't get it all.  I think that's perfectly fine.  I'd rather have something for free than nothing.

Here's a few tips to get you started:

  • SQL Express installs as a local instance named "SQLEXPRESS", so your connection string needs to include the instance name:  ".\SQLEXPRESS" or "localhost\SQLEXPRESS".
  • SQL Server Configuration Manager isn't the UI you want to add databases, tables, etc.
  • Use any of the Visual Studio Express products as your database UI.  They all have the database manager built in.
    • Use the Server Explorer window to add your database instance.  Then you can use it to add a new database and add tables to that database. 
    • If you have database create scripts, you can run them inside Visual Studio Express.  If you are used to hitting F5 in Query Analyzer, then you'll want to map a shortcut key to the "Run Selection" command: Right click -> Run Selection.
    • You can create all your database objects here.
    • You can run and step through stored procedures for debugging.
  • You can also use osql.exe to manager your database.  This is useful when you want to automate database scripts using NAnt.
  • You have the option of how you want to connect to a SQL Express database:
    • Through the SqlClient provider: Data Source=localhost\sqlexpress;Initial Catalog=MyNewTestDatabase;Integrated Security=True;Pooling=False
    • Through a file reference: Data Source=.\SQLEXPRESS;AttachDbFilename=C:\opensvn\development\ezweb\trunk\src\website\App_Data\ASPNETDB.MDF;Integrated Security=True;User Instance=True
    • If using ASP.NET, you already have a connection string you can use: LocalSqlServer:  Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated Security=True;User Instance=True

See http://www.aspfaq.com/sql2005/show.asp?id=3 for more information.  There are other, non-Microsoft, tools that can be used to manager SQL Express as well.

UPDATE:  There is a November 2005 CTP of SQL Server 2005 Express Management Studio available.  This version is being linked to right off the SQL Server express download page.


Posted Fri, Nov 4 2005 7:58 AM by Jeffrey Palermo

[Advertisement]

Comments

Sheldon wrote re: How to use SQL Server Express (where's the UI?) - level 200
on Fri, Nov 4 2005 11:34 AM
You mention osql, but that implies a configured ODBC datasource. What about sqlcmd? It uses SQLBrowser to detect a local connection, potentially requiring no configuration at all.

I ask as well as suggest, as I am currently automating the database setup for my unit tests, and I am hoping I'm on the right path.

Sheldon
Jeffrey Palermo wrote re: How to use SQL Server Express (where's the UI?) - level 200
on Fri, Nov 4 2005 11:43 AM
Yes, sqlcmd works as well, and it is listed in the page:
http://www.aspfaq.com/sql2005/show.asp?id=3

Thanks for the input.
Chris Wallace wrote re: How to use SQL Server Express (where's the UI?) - level 200
on Mon, Nov 7 2005 7:27 AM
There was a free Express manager beta at one time but it appears MS has taken down the download page.
Danny wrote re: How to use SQL Server Express (where's the UI?) - level 200
on Mon, Nov 7 2005 2:22 PM
Jeffrey Palermo wrote re: How to use SQL Server Express (where's the UI?) - level 200
on Mon, Nov 7 2005 2:36 PM
Yeah, but it looks like it's been rolled into the Express IDEs as an add-in. It remains to be seen whether MS will release it as a stand-alone tool.
Rajeev Gopal wrote re: How to use SQL Server Express (where's the UI?) - level 200
on Mon, Nov 14 2005 1:26 PM
Jeff,

I think you need to get the SQL Management Studio, which is in CTP right now.

Thanks,
Rajeev
Rick.Stavanja.com wrote Link-O-Rama
on Sun, Nov 27 2005 5:40 PM
Rick.Stavanja.com wrote Link-O-Rama
on Sun, Nov 27 2005 5:46 PM
Rick.Stavanja.com wrote Link-O-Rama
on Sun, Nov 27 2005 8:35 PM
Dinis Cruz @ Owasp .Net Project wrote FireFox Tab Dump – 14 Dec 2005
on Tue, Dec 13 2005 10:46 PM

Since FireFox just
stopped responding (i.e. opening up new pages, but at least didn't
die (like it...
Ethan Allen wrote re: How to use SQL Server Express (where's the UI?) - level 200
on Wed, Dec 14 2005 5:55 PM
Does anyone know if any of the Express line is available for download at present ? I get this message when I try any download :

The download you requested is unavailable. If you continue to see this message when trying to access this download, go to the "Search for a Download" area on the Download Center home page.

Thanks for any clues ...
Rick.Stavanja.com wrote Link-O-Rama (November 2005)
on Thu, Sep 14 2006 1:42 AM

Some of the stuff on my radar screen the past couple of weeks... Local/Regional Steve Eugster's Blog

Devlicio.us