469,307 Members | 2,239 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

How to access database from another machine?

11
I have installed an application on machine X, this application is a C# application and stores the data on sql server 2008 and it is working perfectly on Machine X.
Now my problem is I trying to acces this application from machine Y and I could not access it and this error I got when I tried access this application:

System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a on to SQL Server.The server was not found or was not accessible.Verify that the instance name is correct and that SQL Server is configured to allow remote connections.(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

so please can any one help on this error

Thanks,
Bougie
Dec 9 '10 #1
9 3347
Goto: "Start > All programs > Microsoft SQL Server 2008 > Configuration Tools > SQL Server Configuration Manager"

Open SQL Server Network Configuration and choose your protocol, mine is MSSQLSERVER then enable Named Pipes, I recommand enabling TCP/IP also if its disabled.

-B
Dec 9 '10 #2
bougie
11
I didn't find any protocols in Sql Server Network Configuration... By the way I have the Sql Server 2008 Express Edition is it related to this problem...
Thanks,
Bougie
Dec 9 '10 #3
What did you find?

I have listed:
-Protocols for MSSQLSERVER
-Protocols for SQLEXPRESS

B.
Dec 9 '10 #4
bougie
11
I opened the Sql Server Network Configuration and I didnt find any thing in it..!!
thanks
bougie
Dec 9 '10 #5
Strange, this is on Machine X right?

B.
Dec 9 '10 #6
bougie
11
yes this is on mashine x..

thanks, any way
bougie
Dec 9 '10 #7
Is the user you use allowed to open a connection to the DB? and does your DB allow connections from outside?

B.
Dec 9 '10 #8
bougie
11
Actually I dont know, do you have any way that I can check these things ?
thanks,
Bougie
Dec 9 '10 #9
First for the user:
In SQL Server Management Studio go to Security > Logins and right-click on your user.

On the left, select the page: Status
You see the permission there, the setting should be Grant and Login Enabled. (Radiobuttons)

For the Database:
Right-click on your database and click on Properties. Choose the Permissions page.

Now you should see the user you connect with in the list underneath "Users or roles:"

Click once on your user and check the permissions:
"Connect" should be "Grant"-ed and I would also check if "View definition" is granted.

B.
Dec 9 '10 #10

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Paul Copeland | last post: by
7 posts views Thread by Lian | last post: by
2 posts views Thread by Dan Tallent | last post: by
2 posts views Thread by DavidR | last post: by
12 posts views Thread by zMisc | last post: by
reply views Thread by Gantlet | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.