开发者

Connecting to a fresh SQL Server installation

I know mysql, and I'd like to learn sqlserver. I'm currently stuck on the basics of bas开发者_如何转开发ics:

  1. How to install and configure sql server
  2. How to connect to it

I installed Sql Server through Web Platform Installer, and have Visual Studio 2008 installed. Still, I can't understand how to connect to my server:

  1. I see that the SQL service itself (SQLEXPRESS) is running in both in services.msc and Sql Server Configuration Manager
  2. I try to connect to it via the Management Studio, but I don't understand what to do.

Where do I begin?


Start Management Studio and Select Database Engine as your SqlExpress instance then choose Windows Authentication and press connect. After that in object explorer you will see your databases if you want to create one right click databases and create new one.

You can look at http://msdn.microsoft.com/en-us/library/ms186312.aspx


There are two types of ways you can install a SQL Server instance: 1. Named Instance 2. Default Instance

When you use the default instance, and it's the only instance on the machine, the server would listen directly on the port 1433 which is the default SQL Server port. This is what you'd expect if you come from a mysql background.

When you "name" an instance, such as SQLEXPRESS, it works differently. You connect to a special service (SQL Server Browser Service) which now listens on that port, and points the client to the "correct" port of the named instance. I hope I'm being accurate about this one, but that's what happens in general.

You could connect directly to the named instance if you see what port it binds to in the SQL Server error log, and if you could choose the port in the client application.

Read more about this here: http://msdn.microsoft.com/en-us/library/ms181087.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜