Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
 How to Remotely Establish Connection to SqlServer2005
Posted by Mohan.D on  2/6/2010 11:41:03 PM Category: ADO.NET
Add to my favorites
Email to friend
Hi Friends,

I have installed sqlserver2005 Express edition in my computer for developing my applications with database activities.....I don't have problem in working with sqlserver2005 in my administrator account(i.e., where i have installed the sqlserver2005),but when using in my limited account(i.e.,Remotely) i unable to access sqlserver2005.

I m able to create the database and related tables in sqlserver2005,but when access it in my application,it shows error like:

--> Access to the database cann't be done...Unable to connect to the server...Login Failed for the User.....
-->I hav reinstalled the sqlserver2005 express all again and did all the changes in configuration manager and surface area configuration also ......

Also,I hav read the article in aspdotnetcodes for my querry and followed the procedure,but no use....

So,Any help will be appreciated greatfull......

Thanks in advance........


Post Your Reply Post New Question

 Viewer's Reply
Connect to Remote SQL Server 2005
Answered By Moderator1 on 2/8/2010 2:30:05 AM

After you done the setup, you restart the SQL Server (SQL Express) service again. This may solve your problem.

Also make sure you can connect the SQL Server Express system, through remote client, by ping or telnet method.
Still cann't be accessed via remote account...
Answered By Mohan.D on 2/8/2010 2:51:20 AM

I have tried this before itself,but no use.I again tried it,but the same result.The error shown is as follows:

Cannot open database "UserWorks" requested by the login. The login failed.
Login failed for user 'UNICORE\Uni_core'.

Can u tell how to ping the sqlserver with my system....
Check the login id has access rights to the database
Answered By Moderator1 on 2/9/2010 12:44:04 AM

So there is no problem in connection between the client and server. No need to ping. The problem is while logging in with the user id you specified. Make sure 'UNICORE\Uni_core' has proper rights to access your database.
Are you using Window's Authentication?
Can u tell me how to check the rights of the Logins in the system for using the sqlserver2005.
Answered By Mohan.D on 2/9/2010 1:07:07 AM
Thanks for the reply...

Mostly,i use windows authentication in the admin and limited account....

The User UNICORE\Uni_Core is a limited account service in the system,will it hav rights to access the database or we should specify the rights to work properly...

As,I told u already that sqlserver can be opened via both windows and sql Authentication and the database can be created and manipulated in limited account service in the system. But,while using in the application it shows error.

so,plz tell how to change the rights......

Remote Connection Establishment Regards..
Answered By Mohan.D on 2/10/2010 12:10:47 AM
Thanks Dude,

Nw its working fine,I hav granted the permission to the limited users and everthing going fine after that......

Really ur suggestion helped me a lot.I was scratching everyone for a week to this issue.......

Thanks again. Good job.....

Steps to Grand Permission for Limited Account
Answered By Moderator1 on 2/10/2010 2:53:59 AM
Hi Mohan,

Its all your effort for your success. Wish you more success.

Could you please kindly post the steps, how to grant permission for Limited Account below, so that it will help other viewers also. Sure they will give credit to you. Thanks.
Steps to be Follwed to Establish Remote Connections:
Answered By Mohan.D on 2/10/2010 9:23:37 PM
Steps to be Follwed:

1. Login as Administrator into ur system...Open the SSME(SqlServerManagementStudio) from Start->All programs Menu...

2. Connect to Server dialog box appears...Use Windows or Sql Server authentication to login into the SSME....

3. In Object Explorer,Expand the Security Tab...In the Security tab-->Expand Logins, we will come to see all the available logins in our system...

4. Right click the BULITIN\Users and select the Properties....
-->Click the Server Roles and select the Public Option...
-->Click the User Mapping and Map the required Databases.. Below assign the role for the databases as Public..
-->Click the Status and check whether Premission to the Database is granted and the Login is Enabled.

5. Restart the Sql Server Services and Sql Server Browser and start working with Sql server normally....

1. Open Configuration Tools....
1.a) Select Sql Server Network Configuration...
Click the Protocols-->In the Protocols,See to that Named Pipes and TCP/IP is Enabled.

1.b) Select Sql Native Client Configuration...
Click Client Protocols-->In this, See to that TCP/IP and Named Pipes is Enabled in Order.

1.c) Select Sql Server Surface Area Configuration...
Select SqlServer Services and Connection...Expand SQLEXPRESS --->
Database Engine -->Remote Connectoins-->select Local and Remote Connections using Both TCP/IP and Named Pipes.

2. Restart the Sql Server from Services.msc and also restart the Sql Server Services and Sql Server Browser.

Follow the above steps for other logins to which you want to provide the access rights,
provided if necessary to you....

user grant command in sql server
Answered By charan on 3/17/2010 6:31:48 AM
in sql server give the prmission for or what error it giving for the user

for that user grant him permission .like use grant command for that user in sql server so it will not show u the error
Post Your Reply If you still have problem, post it again under this reply for better response.

Sponsored by
Washington Technology
Speech Technology Magazine
Oracle Magazine