I am a newbie here, so please bear with me. I have installed SQL Server 2005 CTP on Machine A and MSDE on Machine B. Both these contain the PUBS database beside others. On Machine C, I have installed "ASP.Net Web Matrix" and I want to be able to connect to either Machine A or B to access the PUBS database. It connects to Machine B, when I put in the Servers IP address. But everytime I try to connect to Machine A, it gives me an error saying, "Unable to connect to the database. To connect to this server you must use SQL Server Management Studio or SQL Server Management objects(SMO) ".
I heard that connection strings are needed to access the SQL Server 2005 but I have no idea where to begin. Do I need to create special users to access the Server or will Windows authentication work ? Could anyone help me out in connecting to the SQL Server 2005 CTP?
Management studio is a separate install under management tools, within SQL Server you don't need permissions if you use integrated. When you install the management studio you can register the MSDE. Hope this helps.
|||I had no problems connecting to the MSDE-based server. It's the SQL Server 2005 that's the problem. Could you tell me what I have to do in Management Studio to get the ASP.Net Application that is running on a client machine to connect to it ? Is there some connection string I have to use ? What about this SMO thing ?|||Try the link below for a walk through tutorial and related link and I would not use SMO (SQL Server Management Object) it is Microsoft property and experience have thought me not to use Microsoft property in my code when using SQL Server. Hope this helps.
http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx|||I tried all that but nothing seems to work. Could the firewall cause a problem ? If yes, then what can I do to rectify it ?|||Yes the firewall usually removes either TCP/IP or Named Pipes from your protocol stack in SQL Server, right click in Management studio and go to properties then Network Configuration and make sure both TCP/IP and Named Pipes is enabled. Hope this helps.|||I get connected to the SQL Server 2000 from a client machine using Web Matrix. I do this by entering the Server name of the SQL Server, say X250-122 and then connecting to a database on that Server. It gives me no problem at all.
When I try the same but in this case trying to connect to an instance of MSDE instead, named NetSDK, i.e. X250-122\NetSDK, on the same Server where SQL Server 2k is installed, then it gives me the following error :
" Unable to connect to the database. SQL Server does not exist or access denied. ConnectionOpen(Connect())".
I tried everything in my capacity that I could but there doesn't seem to be any solution. The protocols ( TCP/IP, Named Pipes) are enabled too. Could you please tell me how to go about this dilemma I am in. Is there a specific way of connecting to an MSDE instance from a client machine ? Please help !!|||The problem was Asp.net account permissions on the MSDE, register it in the full version and go to the security section in Enterprise Manager and configure the server permissions and then to the database and configure the database permissions for Asp.net in the MSDE instance. Another option is to run sp_grantlogin and sp_grantdbaccess in Query Analyzer against the database in the MSDE instance. Hope this helps.
|||I tried doing what you asked and it was already set by default. Ok, let me give you some more details...
I have a local account on each of these machines A, B, C, named say ROOT. SQL Server 2000 and an instance of MSDE named NetSDK is installed on Machine A. All 3 machines have Windows XP Professional with SP 2. Now if I try connecting M/c B or M/c C to the SQL Server on M/c A through the ROOT logins on each of those machines and using ASP.Net Web Matrix, it connects without any problems. But if I do the same trying to connect to NetSDK, it gives me the error I told you about.
I have given ROOT permissions on the SQL Server and the MSDE instance too. But only SQL Server goes through. Thanks for the help, by the way. I appreciate it !!
P.S. By registering the MSDE instance, what did you mean ? I have to register it under Enterprise Manager right ? Because I did that and under Security, there are logins for Machine A\ASPNET, Machine A\ROOT, etc. These are exactly the same as the ones on the SQL Server.
|||Another Problem has just cropped up !! I tried connecting from Machine A to SQL Server 2005 installed on Machine B using the same ROOT login and it didn't work giving me the following error - Unable to connect to the Database. To connect to this Server you must use SQL Server Management Studio or SQL SMO.
But when I tried connecting to Machine B from Query Analyzer i.e. FILE > Connect > Machine B...it works fine. Could you resolve this problem too besides the MSDE one. Thanks !!|||
By registering a server you can access all SQL Server in your network as local access and you do that at the very top of Enterprise Manager. What you do under security is creating a user access to the server not server registration. I have registered 68 SQL Servers in one XP pro box so you will not run into problem with the few instances you have. hope this helps.
|||I did register both the SQL Server and the MSDE instance named NetSDK, but just the SQL Server is granting access to users over the network and it's giving the same error as before. Is my way of accessing correct...i.e. say X250-122\NetSDK ?|||I tried this too... I created a user named ASPNET on the SQL Server machine and I granted the user access under EM for the MSDE instance NetSDK on the same machine. Then I tried logging in from another machine through WebMatrix and it logged in only to the SQL Server and not the NetSDK instance, giving me this error...Unable to connect to the database, Login Failed. Not associated with a trusted SQL Server connection. What could be the reason for that. I am getting access through all the accounts to the SQL Server but not the MSDE instance !!|||Create a new database in the MSDE do an INSERT INTO from the old database then create permissions for the Server under the security section for Asp.net and for the database in the database. Then you may have to delete the old database, I think you have run into orphaned permissions that are created in the Master but not usable in the database. Run a search for orphaned permissions in the BOL (books online). Hope this helps.|||Thanks...it works fine now. I appreciate your help !!
No comments:
Post a Comment