Oracle給使用者解鎖的方法

2021-08-30 07:23:55 字數 3307 閱讀 5472

紹oracle給使用者解鎖的方法,希望那個通過括在oracle中新增使用者、賦權、修改密碼、解鎖實現oracle給使用者解鎖。本文能給大家有所幫助。

新增使用者:(隨著使用者的建立,自動產生與使用者同名的schema)

create user "tester" profile "default" identified   

by "tester" default tablespace "testdata" temporary

tablespace "testtemp" account unlock;

賦權:

(這些許可權是開發中使用的許可權,如果使用者生產環境,請自行對於使用者建立相應的系統許可權)

據說生產環境下,只是connect resource這樣的角色就可以了。

grant "connect" to "tester";   

rant "resource" to "tester";

grant "dba" to "tester";

grant "exp_full_database" to "tester";

grant "imp_full_database" to "tester";

使用者修改密碼,oracle給使用者解鎖:

alter user "scott" identified by "*******"   

alter user "scott" account unlock

1.檢視所有使用者:

select * from dba_user;   

select * from all_users;

select * from user_users;

2.檢視使用者系統許可權:

select * from dba_sys_privs;   

select * from all_sys_privs;

select * from user_sys_privs;

3.檢視使用者物件許可權:

select * from dba_tab_privs;   

select * from all_tab_privs;

select * from user_tab_privs;

4.檢視所有角色:

select * from dba_roles;
5.檢視使用者所擁有的角色:

select * from dba_role_privs;   

select * from user_role_privs;

oracle中新建使用者名稱

連線oracle資料庫:

1、在oracle database assistant中建立自己的資料庫;

2、在oracle net8 easy config中建立連線與自己的資料庫的連線,取乙個service名,ip:為本地ip 127.0.0.1,database sid為你所建立的

資料庫的sid,使用者名為:system,密碼:manager或是自己設的密碼;

3、在sqlplus中連線自己的資料庫,使用者名為:system,密碼:manager或是自己設的密碼,tom:你剛建立的service名.

4、顯示當前連線使用者:show user;

5、新建使用者並授權:create user tom identified by 密碼;

grant connect,resource to tom;

6、在sqlplus中用剛建立的使用者:tom/密碼,連線;

7、建立表空間。

資料庫的初始化引數檔案:init+例項名.ora檔案,編輯此檔案中的內容,可以改變資料庫使用的方法和分配的資源.

啟動oracle資料庫,在dos方式下執行svrmgr30,然後輸入connect internal,密碼為:oracle,再輸入startup即可.

表空間的建立:storage manager

回滾段可在storage manager中建立

啟動oracle資料庫

在dos視窗下,輸入svrmgr30,啟動伺服器管理器,輸入connect internal,輸入密碼oracle,輸入shutdown,關閉資料庫,輸入startup,啟動資料庫.

1. oracle安裝完成後的初始口令?

internal/oracle   

sys/change_on_install

system/manager

scott/tiger

sysman/oem_temp

建立表空間

create tablespace test1 datafile 'd:tabletest1.dbf' size 1m;
建立名為wjq的使用者,其預設表空間為test1。在sql*plus以sys使用者連線資料庫,執行以下指令碼。

create user wjq identified by password default tablespace test1;
以使用者wjq連線sqlplus

建立表:

create table t1(empno number(5) primary key, ename   

varchar2(15) not null, job varchar2(10), mgr number

(5),hiredate

date default (sysdate), sal number(7,2), comm number(7,2));

建立表t2並指定此表的表空間為

test1:create table t2(empno number(5) primary key,ename varchar2(15) not null,   

job varchar2(10),mgr number(5),hiredate date default (sysdate),sal number(7,2),comm number(7,2)) tablespace

test1;

插入記錄:insert into t1 values(101,'wang','it',25,'',20,20);

插入日期:insert into t1 values(102,'wang','it',25,to_date('1980-12-17','yyyy-mm-dd'),20,20

Oracle使用者解鎖方法

oracle在安裝後一些user是預設鎖定的,例如常用到的scott user是lucked的,那我們要使用她就必須先設法給她unluck,本文將介紹怎麼手動給scoot user解鎖,當然你也可以在oracle的以系統管理員身份進入enterprise manager console中通過勾選解鎖...

在Oracle中給scott使用者解鎖

error the account is locked 學習 oracle 一般 scott 使用者 預設密碼為tiger 登入。scott 使用者被鎖定,可能是下面幾個原因。1.嘗試多次登入未成功 可能密碼不正確 2.此使用者被管理員手工鎖定 3.使用者密碼到期 未按時修改密碼,等等。解決方法 用...

oracle使用者解鎖

裝了乙個oracle,長時間不用,難免密碼啥的忘了 報錯 ocisessionbegin ora 28000 the account is locked 解決 alter user scott account unlock 解鎖 報錯 ocisessionbegin ora 28001 the pa...