Arcgis 空间数据库链接1. 使用ArcSDE服务连接空间数据库使用ArcSDE服务连接到空间数据库操作步骤如下:1) 在ArcCatalog的目录树,展开Database Connections文件夹.2) 双击添加Spatial Database Connection,打开“Spatial Database Connection P r operties”对话框.3) 在Server文本框中,输入服务器名称或者IP地址;4) 在Service文本框,输入服务名或者端口号。
如果想连接Oracle数据库中某用户方案的空间数据库,输入端口号和schema,并以冒号分隔,例如:5151:Geodata.5) 如果数据存储在SQL Server, IBM DB2, Informix, or PostgreSQL关系型数据库中,在Database文本框中,输入预连接的数据库的名称。
Oracle数据库跳过此步。
6) 如果使用数据库认证,输入数据库的用户名和密码。
需要保存用户和密码,勾选“save t he user name and password with this connection file”,否则不保存。
7) 如果使用操作系统认证,单击“Operating system authentication”按钮。
数据库认证不可用。
8) 如使用Oracle某用户的Schem a数据库或者使用SQL Server中的dbo-schem a数据库,必须在属性对话框中更改“Connection details”部分,从事务版本列表中选择空间数据库版本。
9) If you do not want to save the version connection information you provid ed in the last step, uncheck Save the version with the connection file. 如果不保存版本的连接信息,去掉“Save the version with the connection file”前的勾选。
10) 单击“Test Connection”按钮,执行连接测试. 测试成功,“Test Connection”按钮灰掉,否则,将无法从数据库中获取数据。
11) 单击OK按钮.12) 输入数据库连接名称.13) 回车.2. 直连Oracle空间数据库以下内容将介绍三种直连到Oracle空间数据库的方式:第一,使用数据库认证直连到Oracle 空间数据库;第二,使用操作系统认证直连到Oracle空间数据库;第三,如何连接到某用户方案的空间数据库。
使用数据库认证直连到Oracle空间数据库1) 在ArcCatalog的目录树,展开Database Connections文件夹.2) 双击添加Spatial Database Connection.3) Server,输入服务器名称或者IP地址;4) Service,根据Oracle客户端版本输入连接字符串。
连接Oracle9i, 输入:"sde:oracl e9i";连接Oracle 10g,输入: "sde:oracle10g";Oracle 11g, 输入: "sde:oracle11g".5) User Name,输入用户名.6) Password,输入密码及Oracle 网络服务名,格式:sde @oradb。
7) 单击OK按钮.8) 输入数据库连接名称。
9) 回车。
使用操作系统认证直连到Oracle空间数据库1) Double-click the Database Connections folder in the Catalog tree.2) Double-click Add Spatial Database Connection.3) In the Server text box, type the nam e of the server on which the Oracle database resides.4) If you're connecting to Oracle9i, in the Service text box, type "sde:oracle 9i:/;LOCAL=<SQL_Net_alias>".If you're connecting to Oracle 10g, type "sde:orac le10g:/;LOCAL=<SQL_Net_al ias>".The SQL Net alias was set when your computer was configured to use a direct connection. Contact your system administrator if you do not know what value to substitute here.5) Click the Operating system authentication button. The database authenti cation information becom es unavailable.6) Click OK.7) Type a new nam e for the spatial database connection.8) Press Enter.连接到指定用户的空间数据库1) Double-click the Database Connections folder in the Catalog tree.2) Double-click Add Spatial Database Connection.3) In the Server text box, type the nam e of the server on which the Oracle database resides.4) If you're connecting to Oracle9i, in the Service text box, type "sde:oracle 9i:/:<schema_name>".If you're connecting to Oracle 10g, type "sde:oracle10g:/:<schem a_name>".5) Type your user name in the User Name text box.6) Type your password, followed by @<oracle network service nam e>, in the Password text box.7) Uncheck Save usernam e and password if you don't want your login infor mation saved with the connection.8) Spatial database connections are m ade to the sde.DEFAULT version by de fault. You m ust change to a user-schem a version. Click Change in the Connect ion details section.9) When the Connection Details dialog box opens, choose the version of the user-schem a geodatabase to which you want to connect. This could be <sche ma>.DEFAULT or any other version of that geodatabase. For exam ple, if the s chem a the geodatabase is in is tubor, and you want to connect to the qa77 v ersion, choose tubor.qa77 from the transactional version list.10) Click OK on the Connection Details dialog box to close it.11) Click OK.12) Type a new nam e for the spatial database connection.13) Press Enter.3. 直连SQL Server空间数据库You can use a direct connection for an ArcSDE geodatabase stored in SQL Ser ver. When reading the steps, note that there are slight differences in how you m ake that direct connection based on the type of ArcSDE geodatabase.1) Double-click the Database Connections folder in the Catalog tree.2) Double-click Add Spatial Database Connection.3) In the Server text box, type the nam e of the server on which the SQL S erver database resides.4) To connect to an ArcSDE geodatabase on a default instance of SQL Serve r, type the following in the Service text box: "sde:sqlserver:<name or IP Addr ess of the server>".To connect to an ArcSDE geodatabase on a nam ed instance of SQL Server, ty pe the following in the Service text box: "sde:sqlserver:<name or IP Address of the server>\<instance_nam e>".If connecting to an ArcSDE geodatabase on SQL Server Express, type the follo wing in the Service text box: "sde:sqlserver:<server_name>\<instance_name> ".NOTE: You could also create a spatial dat abase connection to an ArcSDE geod atabase on SQL Server Express by right-clicking the geodatabase under the D atabase Servers node and clicking 。