Oracle入侵常用操作命令整理
更新時間:2008年05月21日 22:36:41 作者:
入侵命令收集整理,方便大家學習怎么防范
1、su – oracle 不是必需,適合于沒有DBA密碼時使用,可以不用密碼來進入sqlplus界面。
2、sqlplus /nolog 或sqlplus system/manager 或./sqlplus system/manager@ora9i;
3、SQL>connect / as sysdba ;(as sysoper)或
connect internal/oracle AS SYSDBA ;(scott/tiger)
conn sys/change_on_install as sysdba;
4、SQL>startup; 啟動數(shù)據庫實例
5、查看當前的所有數(shù)據庫: select * from v$database;
select name from v$database;
6、desc v$databases; 查看數(shù)據庫結構字段
7、怎樣查看哪些用戶擁有SYSDBA、SYSOPER權限:
SQL>select * from V_$PWFILE_USERS;
Show user;查看當前數(shù)據庫連接用戶
8、進入test數(shù)據庫:database test;
9、查看所有的數(shù)據庫實例:select * from v$instance;
如:ora9i
10、查看當前庫的所有數(shù)據表:
SQL> select TABLE_NAME from all_tables;
select * from all_tables;
SQL> select table_name from all_tables where table_name like '%u%';
TABLE_NAME
------------------------------
_default_auditing_options_
11、查看表結構:desc all_tables;
12、顯示CQI.T_BBS_XUSER的所有字段結構:
desc CQI.T_BBS_XUSER;
13、獲得CQI.T_BBS_XUSER表中的記錄:
select * from CQI.T_BBS_XUSER;
14、增加數(shù)據庫用戶:(test11/test)
create user test11 identified by test default tablespace users Temporary TABLESPACE Temp;
15、用戶授權:
grant connect,resource,dba to test11;
grant sysdba to test11;
commit;
16、更改數(shù)據庫用戶的密碼:(將sys與system的密碼改為test.)
alter user sys indentified by test;
alter user system indentified by test;
2、sqlplus /nolog 或sqlplus system/manager 或./sqlplus system/manager@ora9i;
3、SQL>connect / as sysdba ;(as sysoper)或
connect internal/oracle AS SYSDBA ;(scott/tiger)
conn sys/change_on_install as sysdba;
4、SQL>startup; 啟動數(shù)據庫實例
5、查看當前的所有數(shù)據庫: select * from v$database;
select name from v$database;
6、desc v$databases; 查看數(shù)據庫結構字段
7、怎樣查看哪些用戶擁有SYSDBA、SYSOPER權限:
SQL>select * from V_$PWFILE_USERS;
Show user;查看當前數(shù)據庫連接用戶
8、進入test數(shù)據庫:database test;
9、查看所有的數(shù)據庫實例:select * from v$instance;
如:ora9i
10、查看當前庫的所有數(shù)據表:
SQL> select TABLE_NAME from all_tables;
select * from all_tables;
SQL> select table_name from all_tables where table_name like '%u%';
TABLE_NAME
------------------------------
_default_auditing_options_
11、查看表結構:desc all_tables;
12、顯示CQI.T_BBS_XUSER的所有字段結構:
desc CQI.T_BBS_XUSER;
13、獲得CQI.T_BBS_XUSER表中的記錄:
select * from CQI.T_BBS_XUSER;
14、增加數(shù)據庫用戶:(test11/test)
create user test11 identified by test default tablespace users Temporary TABLESPACE Temp;
15、用戶授權:
grant connect,resource,dba to test11;
grant sysdba to test11;
commit;
16、更改數(shù)據庫用戶的密碼:(將sys與system的密碼改為test.)
alter user sys indentified by test;
alter user system indentified by test;
相關文章
Oracle中nvl()和nvl2()函數(shù)實例詳解
NVL函數(shù)的功能是實現(xiàn)空值的轉換,根據第一個表達式的值是否為空值來返回響應的列名或表達式,下面這篇文章主要給大家介紹了關于Oracle中nvl()和nvl2()函數(shù)的相關資料,需要的朋友可以參考下2022-05-05
oracle分區(qū)表之hash分區(qū)表的使用及擴展
Hash分區(qū)是Oracle實現(xiàn)表分區(qū)的三種基本分區(qū)方式之一。對于那些無法有效劃分分區(qū)范圍的大表,或者出于某些特殊考慮的設計,需要使用Hash分區(qū),下面介紹使用方法2014-01-01

