SQL Server Connection Problem
-
Hi , I am supposed to work on an already developed project (in VS and SQL 2005). When I open this project on my machine (Project was developed on some other machine), I get the following error (on pages which are connected to DB) An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) In my web.config, Connection string goes like connectionString="DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\RealEstate.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" Anybody facing similar problem before ??? Please help then , its urgent .. Thanks Kaliem
-
Hi , I am supposed to work on an already developed project (in VS and SQL 2005). When I open this project on my machine (Project was developed on some other machine), I get the following error (on pages which are connected to DB) An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) In my web.config, Connection string goes like connectionString="DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\RealEstate.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" Anybody facing similar problem before ??? Please help then , its urgent .. Thanks Kaliem
Can you connect to the database with Windows Authentification? If not connect with SQL Server Authentification, then right click the connection in Object Explorer, go to the seurity tab and in the "Server Authentification" section select both authentification modes. If you want your db to be accessable from a remote connection you must change the default option that SQL Server 2005 has: Go to Start Programs -> sql server 2005 -> configuration tools -> Sql Server Surface Area Configuration. On the "Surface Area Configuration for Services and Connection" option, under SQLEXPRESS -> Database engine -> Remote connections, check "Local and remote connections" and then "Using Both TCP and named pipes.
regards, Mircea Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
-
Can you connect to the database with Windows Authentification? If not connect with SQL Server Authentification, then right click the connection in Object Explorer, go to the seurity tab and in the "Server Authentification" section select both authentification modes. If you want your db to be accessable from a remote connection you must change the default option that SQL Server 2005 has: Go to Start Programs -> sql server 2005 -> configuration tools -> Sql Server Surface Area Configuration. On the "Surface Area Configuration for Services and Connection" option, under SQLEXPRESS -> Database engine -> Remote connections, check "Local and remote connections" and then "Using Both TCP and named pipes.
regards, Mircea Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
SQL got installed on my machine by VS 2005 installer. Now, when I open "Surface Area Configuration for Services and Connection" as you said, "NO SQL Server 2005 components were found on this computer" :( Do I need to install VS 2005 again after un-installing SQL and VS ??? But Installer is same as before ... btw, same error appears when i open my .mdf file in VS environment ...
-
SQL got installed on my machine by VS 2005 installer. Now, when I open "Surface Area Configuration for Services and Connection" as you said, "NO SQL Server 2005 components were found on this computer" :( Do I need to install VS 2005 again after un-installing SQL and VS ??? But Installer is same as before ... btw, same error appears when i open my .mdf file in VS environment ...
kaliem wrote:
Do I need to install VS 2005 again after un-installing SQL and VS ??? But Installer is same as before ...
I don't understand what you mean. Have you uninstalled SQL Express?
regards, Mircea Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
-
kaliem wrote:
Do I need to install VS 2005 again after un-installing SQL and VS ??? But Installer is same as before ...
I don't understand what you mean. Have you uninstalled SQL Express?
regards, Mircea Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
Mircea Grelus wrote:
Have you uninstalled SQL Express?
No, I havent un-installed anything ... I ran VS 2005 Installer and SQL 2005 was installed by this setup. Now, I get error "No SQL Server 2005 components were found on this computer" I am asking you what should i do now ??? and btw, VS 2005 setup didnt ask me for anything (sa password or server name etc) as it happens with Manual Installation of SQL Express ...
-
Mircea Grelus wrote:
Have you uninstalled SQL Express?
No, I havent un-installed anything ... I ran VS 2005 Installer and SQL 2005 was installed by this setup. Now, I get error "No SQL Server 2005 components were found on this computer" I am asking you what should i do now ??? and btw, VS 2005 setup didnt ask me for anything (sa password or server name etc) as it happens with Manual Installation of SQL Express ...
Fire up SQL Express with Microsoft SQL Server Management Studio Express[^] and see how that goes. Maybe your installation of SQL Server is corrupted. Btw, do you have any other SQL Server installed? 2000? In order for two versions of SQL Server to coexist on one machine, only one can be set as default instance, the other/s must be installed as named instances.
regards, Mircea Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.