Microsoft OLE DB Provider for SQL Server Error "80004005"

I migrated the classic ASP site to a new server and received the following error message.

I tried different connection strings, but none of them work.

I'm not even sure if the connection string is a problem

The new server is a Windows 2012 Server machine, SQL Server 2008 R2 Express.


Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

/scripts/dbcode.asp, line 31 

Application("C2M_ConnectionString") = "Provider=SQLNCLI10;Server=(local);Database=mysite_live;Uid=mysitec_Live;Pwd=mypass;"
+5
source share
11 answers

If it is an Express instance, it is most likely not a default instance, but rather a named instance. Therefore, you probably meant:

... "Provider=SQLNCLI10;Server=.\SQLEXPRESS; ...
--- instead of just (local) ---^^^^^^^^^^^^

Otherwise, you will need to show us the server properties in the SQL Server configuration manager on this computer so that we can tell you how to fix the connection string.

+8

, ( Sql , TCP/Ip). SSMS, , . , Sql?

, SQL Server. Sql , , "SQLNCLI" "SQLNCLI10"

+3

ping- . , , . , "localhost". , . , SQL.

= localhost; = DBNAME; Persist Security Info = True; User ID = MyUserName; Password = MyPassword;

+2

. , , SQL. / .

+2

:

EDIT: , SO-, , .

  • SSMS (Sql Server Management Studio) / . , /. , .
  • ( b/c, ) 31, , . , . , , . , , . , .
  • , Provider = SQLNCLI10 . SO , gbn.
  • ? - asp? , , . , .
  • SQL Server . , , .
  • , .

, - , !

!

+2

31:

cmd.ActiveConnection = Application("C2M_ConnectionString")

cmd?

, ConnectionString , , cmd - .

:

, IIS 7 IIS 8. ASP IIS 7 , " ". , ?

Option Strict On, - , . (, , .)

+2

- SQL Server OLE DB:

"Provider=sqloledb;Data Source=(local);Initial Catalog=mysite_live;User Id=mysitec_Live;Password=mypass;"

ODBC:

"Driver={SQL Server};Server=SERVERNAME;Trusted_Connection=no;Database=mysite_live;Uid=mysitec_Live;Pwd=mypass;"

, , , . , .

+2

x86/x64?

, , , () - 32- , 64- : http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/c701d510-90e5-4dd0-b14f-ca1d694d6615 ( , , )

.udl , x86, x64?

(http://blogs.msdn.com/b/farukcelik/archive/2007/12/31/udl-test-on-a-64-bit-machine.aspx), local udl:

  • 64- , ( , "C:\Program Files\Common Files\System\Ole DB\oledb32.dll", OpenDSLFile C:\\test.udl
  • 32- C:\Windows\syswow64\rundll32.exe "C:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll", OpenDSLFile C:\\test. UDL

, , : http://msdn.microsoft.com/en-us/library/ms190445(v=sql.105).aspx

+2

IP- "(local)"? - " Server = 192.168.1.1;" (, IP- )

IP- , "SQL-Server configurator", SQL Server IP-, . ( SQL Server)

, /:

  • , DB SQL Server , .
  • , TCP/IP SQL Server?
  • SQL Server , TCP/IP-?
+2

SQL Server . . . " SQL Server" , .

, TCP/IP ( ), 127.0.01, < port number > .

+2

Step-1: enable TCP / IP protocol Start → All programs → Microsoft SQL Server → Configuration Tools → SQL Server Configuration Manager → SQL Server Network Configuration → Protocols for MSSQLSERVER → right-click “TCP / IP” and select “Enable”.

Step-2: change the name of a specific machine in the attributes of the data source. A value (local) will resolve the ni SQL SERVER 2012 problem.

+2
source

All Articles