轉至:
登入
c:\users\inmeditation>sqlplus
請輸入使用者名稱: scott
輸入口令:
檢視當前行長
sql>show linesize;
linesize 80
檢視當前頁長
sql>show pagesize;
pagesize 14
設定行長和頁長
sql>set linesize 100;
sql>set pagesize 20;
sql>show pagesize;
pagesize 20
檢視當前所在使用者
sql> show user;
user 為 "scott"
更改當前使用者的密碼
sql>alter user scott identified by scottpw;
使用者已更改。
通過互動方式更改當前使用者密碼
sql> passw
更改 scott 的口令
舊口令:
新口令:
重新鍵入新口令:
口令已更改
切換到超級使用者
sql>conn sys as sysdba
輸入口令:
已連線。
sql>conn system/sys
已連線。
解鎖scott使用者
sql>alter user scott account unlock;
使用者已更改。
強制更改scott賬戶的密碼
sql>alter user scott identified by scottpw;
使用者已更改。
退出當前資料庫
sql> disc
從 oracle database 11g enterprise edition release 11.2.0.1.0 - 64bit production
sql> show user;
user 為 ""
退出資料庫
sql> exit
c:\users\inmeditation>
sql> quit
從 oracle database 11g enterprise edition release 11.2.0.1.0 - 64bit production
c:\users\inmeditation>
授權給scott使用者 許可權
sql>grant connect,resource to scott;
授權成功。
sql>grant select any dictionary to scott;
授權成功。
在scott中執行命令查詢表結構
select a.owner 建表使用者,
a.table_name 表名,
a.column_name 列名,
a.data_type 資料型別,
a.data_length 預設長度,
a.data_precision 最大長度,
a.data_scale 小數字數,
a.nullable 可否為空,
a.column_id 列id
登入
c:\users\inmeditation>sqlplus
請輸入使用者名稱: scott
輸入口令:
檢視當前行長
sql>show linesize;
linesize 80
檢視當前頁長
sql>show pagesize;
pagesize 14
設定行長和頁長
sql>set linesize 100;
sql>set pagesize 20;
sql>show pagesize;
pagesize 20
檢視當前所在使用者
sql> show user;
user 為 "scott"
更改當前使用者的密碼
sql>alter user scott identified by scottpw;
使用者已更改。
通過互動方式更改當前使用者密碼
sql> passw
更改 scott 的口令
舊口令:
新口令:
重新鍵入新口令:
口令已更改
切換到超級使用者
sql>conn sys as sysdba
輸入口令:
已連線。
sql>conn system/sys
已連線。
解鎖scott使用者
sql>alter user scott account unlock;
使用者已更改。
強制更改scott賬戶的密碼
sql>alter user scott identified by scottpw;
使用者已更改。
退出當前資料庫
sql> disc
從 oracle database 11g enterprise edition release 11.2.0.1.0 - 64bit production
sql> show user;
user 為 ""
退出資料庫
sql> exit
c:\users\inmeditation>
sql> quit
從 oracle database 11g enterprise edition release 11.2.0.1.0 - 64bit production
c:\users\inmeditation>
授權給scott使用者 許可權
sql>grant connect,resource to scott;
授權成功。
sql>grant select any dictionary to scott;
授權成功。
在scott中執行命令查詢表結構
select a.owner 建表使用者,
a.table_name 表名,
a.column_name 列名,
a.data_type 資料型別,
a.data_length 預設長度,
a.data_precision 最大長度,
a.data_scale 小數字數,
a.nullable 可否為空,
a.column_id 列id
sqlplus簡單命令
1 shutdowm immediate 立即關閉資料庫 shutdowm normal 正常關閉 shutdown transactional 等所有事務處理完畢再關閉資料庫 shutdown abort 強制關閉資料庫,可能會丟失資料 2 startup 啟動例項,載入並開啟資料庫。startu...
SQL Plus的簡單使用之一
oracle在oracle 8.0.5之前都是使用字元介面來進行資料庫的操作與管理的。而那時候其他最重要的工具就是sql plus,它既可以編輯sql語句,也可以編輯和除錯pl sql的程式。下面我一步一步的來學習sql plus的基本使用 一 啟動sql plus 在unix linux系統下首先...
SQL Plus的簡單使用之一
oracle在oracle 8.0.5之前都是使用字元介面來進行資料庫的操作與管理的。而那時候其他最重要的工具就是sql plus,它既可以編輯sql語句,也可以編輯和除錯pl sql的程式。下面我一步一步的來學習sql plus的基本使用 一 啟動sql plus 在unix linux系統下首先...