-- oracle
sqlplus /nolog
conn username/password
select table_name from user_tables; --查看当前登录的用户的表:
SET LONG 3000;
SET PAGESIZE 0;
SELECT DBMS_METADATA.GET_DDL('TABLE','table_name') from dual; -- 查看表结构
SQL>@/home/oracle/oracle_20190726-2019080902.sql --执行test脚本文件
expdp razor/razor@172.16.144.165 /home/oracle/20190920/database.dmp
expdp razor/razor dumpfile=/home/oracle/app/oracle/admin/razor/dpdump/cobub3_29190920.dmp logfile=/home/oracle/app/oracle/admin/razor/dpdump/cobub3_29190920.log schemas=razor;
-- db2
db2 connect to razor
db2 "select name from sysibm.systables where TYPE = 'T' and name like 'RAZOR%' " -- 查看所有表
db2 "select name from sysibm.systables where TYPE = 'T' "
db2 "select tabname from syscat.tables where tabschema = current schema " -- 获取当前模式下面的所有用户表
db2 "select * from sysibm.columns where table_schema = 'razor' and table_name = 'RAZOR_USERS'" -- 查看表结构
-- mysql
mysql -h ip:port -u root -ppassword
show databases;
use test_db;
show tables;
desc test_tab;
网友评论