SQOOP与ORACLE交互的时候,用户名和表名需呀大小,否则会不显示任何结果。
如下:

[hadoop@htbbs bin]$ ./sqoop  list-tables --connect "jdbc:oracle:thin:@htbbs:1521:htdb" --username YANSP --password test
Warning: /usr/lib/hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: $HADOOP_HOME is deprecated.


13/05/20 15:25:13 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
13/05/20 15:25:13 INFO manager.SqlManager: Using default fetchSize of 1000
13/05/20 15:25:13 INFO manager.OracleManager: Time zone has been set to GMT
T
TEST
ODCH_EXT_TABLE
[hadoop@htbbs bin]$ ./sqoop  list-tables --connect "jdbc:oracle:thin:@htbbs:1521:htdb" --username yansp --password test
Warning: /usr/lib/hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: $HADOOP_HOME is deprecated.


13/05/20 15:26:59 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
13/05/20 15:26:59 INFO manager.SqlManager: Using default fetchSize of 1000
13/05/20 15:26:59 INFO manager.OracleManager: Time zone has been set to GMT
[hadoop@htbbs bin]$ 

用户名用小写不会显示任何结果,大写是可以的。
这是因为在ORACLE中,用户名和表名存在数据库中默认是大写的。

如下:

SQL> show user
USER is "YANSP"
SQL> select table_name from user_tables;


TABLE_NAME
------------------------------------------------------------
T
TEST
ODCH_EXT_TABLE


SQL> SELECT USERNAME FROM USER_USERS;


USERNAME
------------------------------------------------------------
YANSP


SQL> 



仅供参考。


09-19 20:09