Alibabacloud.com offers a wide variety of articles about sql server connection string timeout, easily find your sql server connection string timeout information here online.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or could not be accessed. Verify that the instance name is correct, and that SQL Server is configured to
' 80004005 '.[Microsoft] The [ODBC SQL Server Driver] timeout has expired.
First, let's take a look at the diagram below to see what is different about using ODBC and using OLE DB to connect to SQL Server.
In practice, the application creates and uses various ADO objects, a
):Oconn. Open "DSN = mysystemdsn ;"_"Uid = myusername ;"_"Pwd = mypassword"If the connection fails, we only need to combine the connection string in the program according to the method shown inCheck to solve the problem. Note the following:1. When configuring the ODBC data source, click the "client" configuration option to let us specify the network library used
replacement string points.
Note:
remote server, HTTP, and UNC path names are not supported.
the database name must be specified using the keyword "Database" (or one of its aliases) as follows: "attachdbfilename = | datadirectory | \ data \ yourdb. MDF; Integrated Security = true; database = yourdatabase " If the log fi
1) Manager does not actively refresh, need to manually refresh to see the latest status (performance considerations)2) In rare cases, the recovery process is suspended. This time assume that you want to recover and return to the accessible state, to execute:RESTORE Database dbnameWith recoveryThis allows the recovery process to end completely.3) If you want to continue to restore the log files later, you do need to put the database in the "Restoring State",This is usually done with the following
, if set to True,yes or SSPI, this can not appear uid and PWD, The database will be logged in the Windows user Province. It is highly recommended to use the latter form for higher security.c.integrated security and Persist Security info appear at the same time, which is set to false to guarantee information security.For more string connection descriptions, see MSDN:http://msdn.microsoft.com/library/default.
encountered in the application, such as:
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB] [ConnectionOpen (Connect ()).] Specified SQL Server not found.
Microsoft OLE DB Provider for SQL Server (0x80004005)
User
associated with a trusted SQL server connection.Microsoft ole db provider for ODBC drivers error '20140901 '.[Microsoft] [odbc SQL Server Driver] timeout has expired.First, let's take a closer look at the differences between using ODBC and using ole db to connect to
user SA failed. Cause: it is not associated with a trusted SQL server connection.Microsoft ole db provider for ODBC drivers error 80004005.[Microsoft] [odbc SQL Server Driver] timeout has expired.First, let's take a closer look at the differences between using ODBC and usin
property specifies the server on which the service resides and the ports to monitor:Stateconnectionstring= "tcpip=myserver:42424"Cookieless= "false" timeout= "/>"In this example, the State service runs on a 42424 port (the default port) of a machine named MyServer. To change the port on the server, you can edit the Hkey_local_machine\system\currentcontrolset\ser
interface. For SQL Server, This is the network name of SQL Server (servername or servername \ instancename. For Oracle, this is an alias for SQL * Net. For the MS Access and MSExcel, this is the full path and name of the file. For the ODBC data source, this is the system DS
is usually recommended to do this in the query analyzer, because by default, the timeout setting for registering another SQL server through the Enterprise Manager is 4 seconds, and the query analyzer is 15 seconds.
Modify the default connection timeout method:
Enterprise
service and connection, and select remote control in the database engine, change the local connection and remote connection to use TCP/IP and named pipes at the same time! Save. Close the connection to the database server and click "reconnect!
2. The data source in the da
be connected to the database. Only primary data files with. mdf Extensions support AttachDBFilename.If the primary data file is read-only, the additional operation fails.This path can be an absolute or relative path, depending on whether to use DataDirectory to replace the string. If DataDirectory is used, the corresponding database file must exist in the subdirectory to which the replacement string points
. Resetting the connection string will reconfigure the values of all connection strings, including passwords. The default value is false.
Pooling(Pool ):Determine whether to use the connection pool. If the value is true, the connection will be obtained from the appropriat
.
Provider: named pipeline provider, error: 40-unable to open the connection to SQL Server more likely to first check whether the MSSQLSERVER service is enabled
Check whether the connection string is correct. If the Instance name is correct, the database
; client network tools. Make sure that the client TCP/IP protocol is enabled, as in the server network utility, and the default port is 1433 (or other ports, consistent with the server ).
4. In the Enterprise Manager or query the analyzer connection test
Enterprise Manager-> right-click sqlserver group-> Create sqlserver registration-> next-> Write Remote IP->
--
Script used to obtain the connection information of the SQL Server server (based on the original shard creation and writing)
Declare@ Dbname sysname,-- The name of the database to be queried (empty for all). The connection information of all databases is queried by defau
tools, and similar error messages are encountered in the application, such as:
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB] [ConnectionOpen (Connect ()).] Specified SQL Server not found.
Microsoft OLE DB Provider for SQL
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.