Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 362
  • Last Modified:

WebServer cannot access SQL 2008 server

I am upgrading my application from using SQL 2000 to SQL 2008. The db server's IP address is 1.1.1.1.
When I installed SQL 2008, because SQL 2000 has the default instance name, I make SQL 2008 instance as 1.1.1.1/SQL2008.
My application on the db server can access 1.1.1.1/SQL2008 perfectly.
However, my asp.net web server in DMZ that cannot access the new SQL 2008 databae.
I configure the web.confg to put the server name as 1.1.1.1/SQL2008 but the connection does not work.
Then I added a new IP address, 1.1.1.2 on my db server and configured as a new SQL 2008's IP address in server configuration tool.
I could use ODBC to connect to 1.1.1.2 from my web server and establish an ODBC connection successfully. Thus, I know the firewall is not blocking the ports.
However, I still cannot confgiure my web.config to connect to the 2008 database by using 1.1.1.2 because SQL2000  is answering all the request before SQL 2008.
How can I make SQL 2000 to ignore all request that goes to 1.1.1.2 from my web server?
0
atlasdev
Asked:
atlasdev
  • 2
1 Solution
 
c1nmoCommented:
Should be a backslash between server and instance name?

Connecting to an SQL Server instance
The syntax of specifying the server instance in the value of the server key is the same for all connection strings for SQL Server.Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=True;
0
 
atlasdevAuthor Commented:
It was my typo in this issue. I did backslash.
Can Web.Config use DSN to connect to the db server?
0
 
c1nmoCommented:
Here's an example I use in web.config:

  <connectionStrings>
            <add name="dbCENConnectionString" connectionString="Data Source=S153\SQLEXPRESS;Initial Catalog=dbCEN;Integrated Security=True;Connect Timeout=200; pooling='true'; Max Pool Size=200" providerName="System.Data.SqlClient" />
    </connectionStrings>

0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now