开发者

Creating a database through Server Explorer in Visual Studio 2010

So, I am using Visual Studio 2010 and was trying to create a new database that I could use in my project. I have vague idea of having used the Server Explorer in the past, although I'm not that sure about it. My experience with MSSQL is almost non-existent, anyway.

I don't remember having to configure anything, but it seems I have a server called Xyz already set up, as can be seen in the next 开发者_如何学Cpicture:

Creating a database through Server Explorer in Visual Studio 2010

I've tried to to create a new database, but I am getting the following error:

Creating a database through Server Explorer in Visual Studio 2010

What might be wrong? What tools should I make sure are correctly running? Isn't there something like Oracle's Sql Developer which allows me easily to inspect what's happening with my databases?

Also, what about the authentication? I can't recall having configured anything when installing Visual Studio. Maybe I still have to configure something?

Creating a database through Server Explorer in Visual Studio 2010

I'm quite lost here, I'd appreciate some light shed up on me on this issue. Thanks!


Sounds like you don't have a SQL server or you're lacking some permissions.


On the server go Start->Run and type in services.msc and look to see if you have the SQL Server process and it is running. Also verify it is not a named instance. If you see "SQL Server (MSSQLSERVER)" it is a default instance and you should be able to reference it using the server name. If you see "SQL Server (SomethingElse)" you have to reference it using servername\SomethingElse

You also need to verify you have named pipes enabled by running the SQL Server Configuration Manager -> SQL Server Network Configuration -> Client Protocols.

If the sql server is new, it is probably because named pipes isn't enabled.

Or it could be like Mrchief stated and you don't have permissions to access that server.

Actually I think you would get a permissions error if that was the case. Your error is specific to connecting to the sql box.


I had similar problem with the same set up. This article helped: http://support.microsoft.com/kb/823938

It turns out that SQL Server 2008 is shipped with TSP/IP disabled by default and nobody can connect to it via network, even from localhost. Here is the solution:

You can check in registry this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQLServer\SuperSocketNetLib\Tcp\Enabled
It must be set to 1 for SQL Server to be listening for network connection. If it is set to 0, change it to 1 and restart SQLSERVER service.

Run this on master database to see error log on the server:
exec Go Xp_readerrorlog
You should look for SQL server listening on X.X.X.X: Y This will be an indicator if network connections are allowed in the Server

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜