Wednesday, November 29, 2006

Four ways to play with SqlExpress

You can connect to a SqlExpress instance in many ways.

1. My friend Frank showed me how to use Query Analyzer with SqlExpress.
Select "Start / Sql Server 2005 / Configuration Tools / Sql Configuration Manager "
Then drill down in "SQL Server 2005 Network Configuration" and select "Protocols for SQLEXPRESS" and enable "Named Pipes" and "TCP/IP" by right clicking and selecting "enable".
Now restart the Sql Express service (aka "SQL Server (SQLEXPRESS)").
Open Query Analyzer and add the sql server instance "yourboxname\SQLEXPRESS"

2. You can also download the free SqlExpress tool from: http://msdn.microsoft.com/vstudio/express/sql/
by clicking on the link to "SQL Server Management Studio".

3.To connect to SqlExpress inside Visual Studio 2005, select "View / Server Explorer". Right click on "Data Connections" and add "yourboxname\SqlExpress".

4. To connect through the command line osql program
osql -S"mymachinename\sqlexpress" -Usa -P"mypassword" -Q"CREATE DATABASE SD20"

No comments: