Potential causes of the "SQL Server does not exist or access denied" error message

下面是从microsoft的网站上转的,但是我的问题是这样解决的:

产生的原因是:我编码时,在datamodule里面留下了一些connectionstring,即有些connectionstring是有值的。

但是在一个客户端环境中connectionstring未必有作用,但是在创建datamodule的时候先读这些默认的值,如何才读到我动态设置的connectionstring值,所以先读到错误的connectionstring,然后报错。报错之后,因为我动态设置了connectionstring所以,程序再读正确的connectionstring,所以还是能读到我想要读到的数据。

View products that this article applies to.Article ID : 328306
Last Review : February 22, 2006
Revision : 13.0

This article was previously published under Q328306
On This Page

SUMMARY

MORE INFORMATION

Potential causes

Server-related causes

Client-related or application-related causes

Network-related or domain-related causes
SUMMARY
"SQL Server does not exist or access denied" is a generic Microsoft Data Access Components (MDAC) message that indicates that the computer that is running Microsoft SQL Server cannot be contacted. This generic message has many potential causes. Some of the most common causes are described in the "More Information" section.

Note The following error messages also have similar causes:
SQL Server is unavailable or does not exist
The specified SQL Server is not found  Back to the top

MORE INFORMATION
The "SQL Server does not exist or access denied" message does not indicate the following: • That the logon process to SQL Server failed.
• That SQL Server does not have the correct permissions to process the query.
• That you cannot use SQL Server authentication because only Windows authentication is permitted.
 Back to the top

Potential causes
Server-related causes
If no client computers can connect to the computer that is running SQL Server, there may be a server-side problem. • SQL Server is not installed on the computer that you specify in the connection string. Verify that SQL Server is actually installed on the computer that you specify in your connection string.
• SQL Server is not started. SQL Server must be running to accept connections.
• SQL Server is not listening on the protocol or port that you are using to connect. The Server Network Utility on the server determines which protocols SQL Server will use and on which TCP/IP ports SQL Server will listen. The Client Network Utility, an MDAC data source name (DSN), or your connection string determines which protocol and port your client uses when it connects. For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
289573 PRB: Configuring DSNs with SQL Server net-libraries
328383 SQL Server clients may change protocols when the client computers try to connect to an instance of SQL Server
• When SQL Server started, it could not listen on the specified TCP/IP port and is not accepting TCP/IP connections. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
293107 PRB: TCP/IP port in use by another application
• The SQL Server name is different from the computer name. For additional information about this issue for SQL Server 2000, click the following article number to view the article in the Microsoft Knowledge Base:
303774 BUG: "Renaming a server" topic in SQL Server Books Online is incomplete
For additional information about this issue for SQL Server 7.0, click the following article number to view the article in the Microsoft Knowledge Base:
195759 Frequently asked questions - SQL Server 7.0 - SQL Setup
For additional information about this issue for SQL Server in a clustered environment, click the following article number to view the article in the Microsoft Knowledge Base:
307336 How to change a clustered SQL Server network name
• For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
298822 FIX: MSDE connection may fail on a multihomed computer
• For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
306199 FIX: Dynamic IP addresses cannot connect to SQL Server 2000
• Starting with SQL Server Desktop Engine (also known as MSDE 2000) Service Pack 3 (SP3) or SP3a , only local connectivity is permitted, by default. If you want to permit remote connections to SQL Server Desktop Engine, follow the steps in the following article:
814130 How to help secure network connectivity for SQL Server 2000 local databases

Client-related or application-related causes
If some client computers or applications can connect but others cannot, you are probably experiencing a client-side problem. • The computer name does not exist. Double-check the spelling of the computer to which you are trying to connect.
• You are trying to access a named instance of SQL Server, but you are not specifying the correct instance name. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
265808 How to connect to a SQL Server 2000 named instance with the previous version's client tools
• The Windows-level security that you are using to connect is different from what you expect. For example, Microsoft Internet Information Services (IIS) uses IUSR_computername, not the account with which you log on to Windows or perhaps another account depending on how you configured IIS. Additionally, linked servers use the Windows-level security context of SQL Server Agent in some circumstances. The security context of the account that you are using may not have access to the computer on which SQL Server is installed.
• You are not using the correct protocol. Check your Client Network Utility (CNU) to verify the protocols that you are using (for earlier versions of MDAC, you set a default instead of enabling protocols). Additionally, verify whether there are any defined aliases in the CNU that specify a different protocol or port (or both) than you expect. For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
328383 SQL Server clients may change protocols when the client computers try to connect to an instance of SQL Server
289573 PRB: Configuring DSNs with SQL Server net-libraries
• You removed the Client for Microsoft Networks networking component from the network properties on the client. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
253959 Client for Microsoft Networks functions when unbound from network adapter
• If SQL Server is clustered, the network adapters may be incorrectly named or configured. If any network adapters are named with special characters or with mixed case, rename them. Verify that the network adapters on the computer are configured properly.
• You may be experiencing the side effects of an MDAC mismatch. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
307255 Component Checker: Diagnose problems and reconfigure MDAC installations
• Check the protocol that is specified in the following subkey:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MSSQLServer/Client/ConnectTo/DSQUERY
This value typically reflects the settings in the CNU, but sometimes it does not. If the value is DBNETLIB, it uses one of the protocols in the enabled protocols list of the CNU. If a specific protocol is listed, that protocol is used instead.
• You are trying to connect through named pipes, but either the named pipe on which SQL Server is listening has changed from the default, or you are using the incorrect pipe name.

For a default instance, use the following pipe in the Server Network Utility:
//./pipe/sql/query
For a named instance, use:
//./pipe/MSSQL$instancename/sql/query
• You have specified a DSN that is not of the correct type (file, user, or system). For additional information about the different types of DSNs, click the following article number to view the article in the Microsoft Knowledge Base:
213772 How to use system, user, and file data sources
• For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
290820 BUG: SQL Desktop Edition: Shared memory fails to connect after you install MDAC 2.6
 Back to the top

Network-related or domain-related causes
If you receive this error message only with computers that are in a specific domain, on a certain subnet, or behind a firewall, review the following issues. • A firewall or router is not configured properly or has been configured to block UDP port 1434. If UDP port 1434 is blocked, you may have to specify the port on which SQL Server is listening in your connection string from the client. For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
287932 TCP ports needed for communication to SQL Server through a firewall
318432 BUG: Cannot connect to a clustered named instance through a firewall
• The local security policy user rights assignment for your Windows account does not allow access from the network. The "Access this Computer from the Network" policy must be permitted. Additionally, the "Deny access to this computer from the network" right must not be granted.
• There is a domain trust problem, or one of the computers is in a workgroup and therefore has no access to the domain. In some cases, to work around this problem, you can create the same local Windows account on both computers with the same password for each account. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
321247 How to configure security for log shipping
• Your name resolution is not working. Check your settings in the name resolution system that you use (such as DNS, WINS, hosts, or lmhosts). For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
169790 How to troubleshoot basic TCP/IP problems
 Back to the top

APPLIES TO• Microsoft SQL Server 2000 Standard Edition
• Microsoft SQL Server 7.0 Standard Edition
• Microsoft SQL Server 2005 Standard Edition
• Microsoft SQL Server 2005 Express Edition
• Microsoft SQL Server 2005 Developer Edition
• Microsoft SQL Server 2005 Enterprise Edition
• Microsoft SQL Server 2005 Workgroup Edition
 Back to the top
Keywords:  kbinfo KB328306
 Back to the top 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值