Making a direct connection from ArcGIS Desktop to a geodatabase in SQL Server
You have the option to use a direct connection from ArcGIS Desktop to your ArcSDE geodatabase. Perform the following steps to set up a direct connection from ArcGIS Desktop.
Expand the Database Connections folder in the Catalog tree. This can be accessed in one of two ways:
- Start ArcMap, ArcScene, or ArcGlobe, open the Catalog window, then double-click the Database Connections folder in the Catalog tree.
- Start ArcCatalog and double-click the Database Connections folder in the Catalog tree.
Double-click Add Spatial Database Connection.
This opens the Spatial Database Connection dialog box.
- In the Server text box, type the name of the server on which the SQL Server database resides.
Type sde:sqlserver:<sql_server_instance_name> in the Service text box.
- If you are connecting to a default instance of SQL Server, the instance name is the same as the server name.
- If you are connecting to a named instance of SQL Server, the SQL Server instance name is <server_name>\<instance>.
- Alternatively, you could specify the port number through which the SQL Server instance is listening for connections. In that case, you would specify the server name followed by the port number: sde:sqlserver:myserver,1433.
You can provide environment variables as part of this connection string. Variables are appended to the connection string and separated by semicolons.
For example, if you want to specify the location of SDEHOME, which in the case of direct connections is the client installation directory, you could type sde:sqlserver:myserver;SDEHOME=c:\Program Files\ArcGIS\Desktop.
- In the Database name field, type the name of the database to which you want to connect.
- If using database authentication, type your user name and password.
- Uncheck Save username and password if you do not want your login information saved with the connection.
If using operating system authentication, click the Operating system authentication button.
The database authentication information becomes unavailable.
If you are connecting to a geodatabase that uses a dbo-schema, you must change the version to which you are connecting. Click the Change button in the Connection details section.
- Choose the dbo.DEFAULT or another transactional version.
- Click OK on the Connection Details dialog box to close it.
- If you do not want to save the version connection information you provided in the last step, uncheck Save the version with the connection file.
Click Test Connection.
If the test is successful, the button becomes unavailable. If the test fails, you cannot access data in the geodatabase until you provide the correct information or the database problem has been resolved.
- Click OK.
- Type a new name for the spatial database connection.
- Press ENTER.
If there is an existing connection to an ArcSDE geodatabase in the ArcGIS Desktop instance, any subsequent connections matching the original server, instance, and authentication mode properties will use the original connection properties. This means that if you connect to the same ArcSDE geodatabase with a connection file that does not save user name and password or version and there is already a connection to the same ArcSDE geodatabase server and instance that does save the user name and password or version, you will not be prompted to fill in the missing properties; the properties from the original connection with the saved login or version will be used.