建立伺服器連線檔案 (OracleToSQL)
您可以在指令檔的伺服器區段或個別的伺服器連接檔中指定伺服器資訊。 伺服器連接檔的命令列參數為 -c <serverconnectionfile>
。 如果指令檔和伺服器連接檔中都存在相同的伺服器識別碼,則會考慮指令檔中的伺服器定義。
範例:1
<!--Sample of server connection file commands -->
<oracle name="<source-server-unique-name>">
<tns-name-mode>
<connection-provider value="OracleClient"/>
<service-name value="(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = <host-name>)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = <service-name>)))"/>
<user-id value="<user-name>"/>
<password value="<password>"/>
</tns-name-mode>
</oracle>
<sql-server name="<target-server-unique-name>">
<sql-server-authentication>
<server value="<server-name>"/>
<database value="<database-name>"/>
<user-id value="<user-name>"/>
<password value="<password>"/>
<encrypt value="<true/false>"/>
<trust-server-certificate value="<true/false>"/>
</sql-server-authentication>
</sql-server>
範例:2
<!--Sample of server connection file commands -->
<oracle name="<source-server-unique-name>">
<connection-string-mode>
<connection-provider value="OleDB Provider"/>
<custom-connection-string value="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<host-name>)(PORT=1521))(CONNECT_DATA=(SID=<instance-name>)));User ID=<user-name>;Password=<password>"/>
</connection-string-mode>
</oracle>
<sql-server name="<target-server-unique-name>">
<sql-server-authentication>
<server value="<server-name>"/>
<database value="<database-name>"/>
<user-id value="<user-name>"/>
<password value="<password>"/>
</sql-server-authentication>
</sql-server>
後續步驟
操作主控台的下一個步驟是執行 SSMA 主控台 (OracleToSQL)