oracle資料庫建立後,使用者名稱跟密碼設定windows平台

來源:互聯網
上載者:User

一般來說,oracle資料庫安裝後,裡面有很多個預設帳號和密碼,比較常用的是:

帳號:scott 密碼:tiger   帳號:system 密碼:manager  帳號:sys  密碼:任一字元。

當我們想建立一個帳號時,可以使用sys登入sysdba後,建立使用者(需要授權),代碼如下

1 2 3 4 5 create  user  使用者名稱 identified  by  "密碼" ;   授權: grant  create  session  to  使用者名稱;                grant  create  table  to   使用者名稱;                grant  create  tablespace  to   使用者名稱;                grant  create  view  to   使用者名稱;     grant create sequence to  使用者名稱;

請輸入使用者名稱:  system
輸入口令:


串連到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create user QC identified by "qc";
使用者已建立。


SQL> grant create session to QC;
授權成功。


SQL> grant create table to QC;
授權成功。


SQL> grant create tablespace to QC;
授權成功。

SQL> grant create view to QC;
授權成功。

SQL>grant create sequence to QC;

授權成功。

之後就可以用新設定的使用者登入了。

我們一般使用的是用scott登入sysdba,這時候有可能出現賬戶未解鎖的狀態,這時候可以用

1 alter  user  scott account unlock;

來解鎖賬戶。解鎖之後可能會要求你改密碼:可以用

1 alter  user  scott identified  by  tiger;

再登入

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.