-
spool 方式导出成文本,上传hadoop服务器
然后进行load data -
sqoop import
–connect jdbc:oracle:thin:@oracle:1521:orac
–username chen
–password chen
-m 1
–table TEST
连接方式:
–connect jdbc:oracle:thin:@OracleServer:OraclePort:OracleSID
–connect jdbc:oracle:thin:@//OracleServer:OraclePort/OracleService
–connect jdbc:oracle:thin:@TNSName
参数解释:
Parameter / Component Description
jdbc:oracle:thin :The Data Connector for Oracle and Hadoop requires the connection string starts with jdbc:oracle.
The Data Connector for Oracle and Hadoop has been tested with the thin driver however it should work equally well with other drivers such as OCI.
OracleServer: The host name of the Oracle server.
OraclePort: The port to connect to the Oracle server.
OracleSID: The Oracle instance.
OracleService: The Oracle Service.
TNSName: The TNS name for the entry describing the connection to the Oracle server