- Error: Cannot connect to this Data Server...SQL Server does not exist or access denied.
- Error: Cannot Generate SSPI Context
- Error: Failed to connect to database Underlying DBMS error (Microsoft OLE DB Provider for SQL Server. Login failed for user '<username>'. The user is not associated with a trusted SQL Server connection.)
- Error: Failed to add feature class. <feature class name> is in load-only mode and cannot be added as a layer in this state.
- Error: Bad login user
- Error: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
- Error: Connection was attempted with an older version of SQL Server client communications software that is not compatible with the SQL Server database server
The following are suggested solutions to problems you may encounter when working with database servers or geodatabases on database servers.
Error: Cannot connect to this Data Server...SQL Server does not exist or access denied.
Possible reasons you received the error message:
- If the SQL Server Express instance has not been started, the remote client will not be able to locate it.
- If your user account was never set up on the database server or your user account was removed from the database server, you won't be able to query or connect to it.
- Remote clients must have a way to communicate with the SQL Server Express instance. If the network protocol is not set, that method of communication is not set, and there is no way for a connection to be made to the instance over a network.
- The SQL Server Browser service provides information about the SQL Server instances installed on the computer when it receives a request from a SQL Server client. If the SQL Browser is disabled, the client will not receive the names and ports used for each installed SQL Server instance and, therefore, cannot find the instance.
Fix:
First, ensure that the database server to which you are trying to connect is started. If it is, confirm that you have permissions to access this database server remotely. If the database server is started and you have rights to connect to and query it, the network protocols are probably not enabled on the database server. To re-enable network protocols, do the following:
- Open the Microsoft SQL Server Configuration Manager. This can be accessed from Start > All Programs > Microsoft SQL Server > Configuration Tools.
- Expand SQL Server Network Configuration in the tree and click the protocols for your SQL Server instance.
- Right-click the TCP/IP protocol and click Enable.
You will receive the following warning message:
Any changes made will be saved; however, they will not take effect until the service is stopped and restarted.
Stop and restart the service. If the network protocols are enabled and you still cannot connect to the database server from the remote client, the SQL Server Browser service is probably stopped. To start the SQL Server Browser service:
- Open the Microsoft SQL Server Configuration Manager.
- Click the SQL Server icon to see the SQL Server Browser service.
- If the state of the SQL Server Browser is paused, right-click it and click Resume. If the state of the SQL Server Browser is stopped, right-click it and click Start.
If all the context menu options except Properties and Help are disabled when you right-click the SQL Server Browser, your SQL Server Browser start mode is set to Disabled. To change this, do the following:
- Right-click the SQL Server Browser and click Properties.
- Click the Service tab.
- Click Start Mode.
- From the pull-down menu, choose either Automatic or Manual. Setting the start mode to Automatic means the SQL Server Browser service automatically starts when you reboot the machine.
- Click OK.
Now when you right-click the SQL Server Browser service, Start should be an available option.
Error: Cannot Generate SSPI Context
Possible reason you received the error message:
This error is most commonly encountered if you are working on a laptop and are logging on with your domain credentials but are not actually connecting to your domain. This might happen if you are plugged in at a client site (as opposed to your own network) or using your laptop while not connected to a network at all, such as working in the field. It is related to TCP/IP network protocol and Windows authentication. You could also consult the Microsoft website for a knowledge base article on how to troubleshoot the 'Cannot generate SSPI context' error message.
Fix/Workaround:
Make your connection to the database server on your local machine (Add Database Server) using the TCP/IP loopback of 127.0.0.1 rather than the domain name; for example: 127.0.0.1\sqlexpress.
This will work as long as the database server (the SQL Server Express instance) is installed on your local machine.
Error: Failed to connect to database Underlying DBMS error (Microsoft OLE DB Provider for SQL Server. Login failed for user '<username>'. The user is not associated with a trusted SQL Server connection.)
Possible reason you received the error message:
When the environment variables SDEUSER or SDEPASSWORD are set in the System Environment Variables, they will take precedence over your Windows login when connecting to a geodatabase. Do not set these variables if you are going to connect from that machine to a geodatabase on a database server or if you are going to connect to an enterprise geodatabase using operating system authentication.
Fix:
Make sure you do not have an SDEUSER or SDEPASSWORD environment variable set on the connecting client machine.
Error: Failed to add feature class. <feature class name> is in load-only mode and cannot be added as a layer in this state.
Possible reason you received the error message:
If the spatial grid size of a dataset is set to 0 when you try to import it to the geodatabase, the import fails, and the dataset can end up stuck in load-only input/output (I/O) mode. Recalculating the spatial index or dropping and re-creating the spatial index should put the feature class back in normal I/O mode, and you should then be able to work with it.
Fix/Workaround:
Recalculate or re-create the spatial index on the feature class.
- In the Catalog tree, right-click the feature class that is in load-only mode, click Properties, then click the Indexes tab on the Feature Class Properties dialog box.
- If your feature class uses the SQL Server geometry for geometry storage, you can recalculate the index. In the Spatial Index section, click Recalculate. If your feature class uses a binary data type or the SQL Server geography data type for geometry storage, re-create the spatial index. Click Delete then Create in the Spatial Index section to re-create the spatial index.
- Click OK close the Feature Class Properties dialog box.
Error: Bad login user
Possible reason you received the error message:
Most likely, you attempted to connect to a geodatabase on a database server using a database-authenticated user name and password.
Fix:
Connections to geodatabases on database servers only use Windows-authenticated logins. Therefore, choose the operating system authentication option on the Spatial Database Connection dialog box while logged in with a valid Windows login.
Error: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
Possible reasons you received the error message:
- You attempted to connect to a geodatabase on a remote database server while logged in with a local Windows account.
- You attempted to connect to a geodatabase on a database server with a domain account that has not been added to the database server.
Fix:
Log in to the client computer with a domain account that a server administrator has added to the database server.
Error: Connection was attempted with an older version of SQL Server client communications software that is not compatible with the SQL Server database server
Reason you received the error message:
The client computer from which you are connecting to the geodatabase does not have a supported version of the Microsoft SQL Native Client installed.
Fix:
Install on the client computer a version of the SQL Native Client application that is compatible with the SQL Server Express version you are using.