日期:2014-05-16  浏览次数:20371 次

如何创建及其连接空间数据库连接
1.    使用ArcSDE服务连接空间数据库
使用ArcSDE服务连接到空间数据库操作步骤如下:
1)    在ArcCatalog的目录树,展开Database Connections文件夹.
2)    双击添加 Spatial Database Connection,打开 “Spatial Database Connection Properties”对话框.
3)    在Server文本框中,输入服务器名称或者IP地址;
4)    在Service文本框,输入服务名或者端口号。如果想连接Oracle数据库中某用户方案的空间数据库,输入端口号和schema,并以冒号分隔,例如:5151:Geodata.
5)    如果数据存储在SQL Server, IBM DB2, Informix, or PostgreSQL关系型数据库中,在Database文本框中,输入预连接的数据库的名称。Oracle数据库跳过此步。
6)    如果使用数据库认证,输入数据库的用户名和密码。需要保存用户和密码,勾选“save the user name and password with this connection file”,否则不保存。
7)    如果使用操作系统认证,单击“Operating system authentication”按钮。数据库认证不可用。
8)    如使用Oracle某用户的Schema数据库或者使用SQL Server中的dbo-schema数据库,必须在属性对话框中更改“Connection details”部分,从事务版本列表中选择空间数据库版本。
9)    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. 如果不保存版本的连接信息,去掉“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:oracle9i";连接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 name of the server on which the Oracle database resides.
4)    If you're connecting to Oracle9i, in the Service text box, type "sde:oracle9i:/;LOCAL=<SQL_Net_alias>".
If you're connecting to Oracle 10g, type "sde:oracle10g:/;LOCAL=<SQL_Net_alias>".
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 authentication information becomes unavailable.
6)    Click OK.
7)    Type a new name 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 name of the server on which the Oracle database resides.
4)    If you're connecting to Oracle9i, in the Service text box, type "sde:oracle9i:/:<schema_name>".
If you're connecting to Oracle 10g, type "sde:oracle10g:/:<schema_name>".
5)    Type your user name in the User Name text box.
6)    Type your password, followed by @<oracle network service name>, in the Password text box.
7)    Uncheck Save username and password if you don't want your login information saved with the connection.
8)    Spatial database