1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
Oracle 解析IP select utl_inaddr.get_host_address(‘google.com‘) from dual;
获取本机IP地址 select utl_inaddr.get_host_address from dual;
根据IP地址反向解析主机名 select utl_inaddr.get_host_name(‘*.*.*.*‘) from dual;
-- 获取系统信息 select banner from v$version where rownum=1 ; -- oracle versi --获取用户信息 select user from dual; -- current user select username from user_users; -- current user select username from all_users; -- all user , the current user can see... select username from dba_users; -- all user , need pris
-- 获取密码hash select name, password, astatus from sys.user$; -- password hash <=10g , need privs select name, password, spare4 from sys.user$; -- password has 11g , need privs
-- 数据库 select global_name from global_name; -- current database select sys.database_name from dual; -- current database select name from v$database; -- current database name , need privs select instance_name from v$instance; -- current database name , need privs
-- 模式 select distinct owner from all_tables; -- all schema
-- 表 select table_name from all_tables where owner=‘xxx‘; -- all table name
-- 列 select owner,table_name,column_name from all_tab_columns where table_name=‘xxx‘; select owner,table_name,column_name from all_tab_cols where table_name=‘xxx‘;
|