How to connect the SQL with TCP/IP ?

  • I have 2 Window 2000 servers. A server is a web server (IIS 5.0). B server is a MS SQL 2000 database server.

    I use the following connection string to connect the B DB server from the A server successfully.

    ....

    cnstr = "Provider=SQLOLEDB;Persist Security Info=False;UID=xxxx;PWD=xxxx;Data Source=xxx.xxx.xxx.xxx;Initial Catalog=DDDDD;"

    Set conn = Server.CreateObject("ADODB.Connection")

    conn.Open cnstr

    ......

    But, I change the connection string to the following (it just only be added "Network=DBMSSOCN;", it is connecting with TCP/IP). It is failed !

    ....

    cnstr = "Provider=SQLOLEDB;Persist Security Info=False;UID=xxxx;PWD=xxxx;Data Source=xxx.xxx.xxx.xxx;Initial Catalog=DDDDD;Network=DBMSSOCN;"

    Set conn = Server.CreateObject("ADODB.Connection")

    conn.Open cnstr

    ......

    The error message is :

    Microsoft OLE DB Provider for SQL Server error '80004005'

    [DBNETLIB][ConnectionOpen (Connect()).] General network error.Check your network document

    /TCPIP_Test.asp, line 14

    Then, I use the same connection string (TCP/IP) to connect the B DB server from an other C web server successfully.

    I do more tests on the A server as followings:

    1. ping -a : test OK !

    2. telnet 1433 : test OK !

    3. osql -Uxxxx -S : test OK !

    4. run a VB6 program (I write a simple VB6 programe, jusk connect to the B server with the TCP connection string) : test OK !

    What is problem in my A web server ?

Viewing post 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply