Oracle 登入切換使用者 檢視狀態等

2021-10-01 19:11:10 字數 1722 閱讀 7174

1、檢視當前機器上是否安裝了oracle:

tnsping orcl
2、檢視oracle的狀態:

lsnrctl status
3、啟動oracle:

lsnrctl start
4、停止oracle:

lsnrctl stop
5、執行sql:

sqlplus
6、登入使用者:

#作業系統認證

conn /as sysdba

#一般都是登上去啟動/停止資料庫,如果沒有/nolog引數,sqlplus會提示你輸入使用者名稱和密碼

sqlplus /nolog

7、切換連線使用者:

conn root/root
8、查詢當前登入使用者新:

select * from user_users;
9、建立(新)使用者:

create user username identified by password;
10、建立表空間:

#tablespacename:表空間的名字

#  d:\data.dbf':表空間的儲存位置

# ***表空間的大小,m單位為兆(m)

create tablespace tablespacename datafile 'd:\data.dbf' size ***m;

11、將空間分配給使用者:

#將名字為tablespacename的表空間分配給username 

alert user username default tablespace tablespacename;

12、給使用者授權:

grant create session,create table,unlimited tablespace to username;

grant dba to username

grant connect to username;

grant create indextype to username;

grant create job to username;

grant create materialized view to username;

grant create procedure to username;

grant create public synonym to username;

grant create sequence to username;

grant create session to username;

grant create table to username;

grant create trigger to username;

grant create type to username;

grant create view to username;

grant unlimited tablespace to username;

alter user usernamequota unlimited on tbs_name;

Vagrant 切換使用者

在虛擬機器 vagrantfile 的目錄位置 開啟控制台,輸入 vagrant ssh config host k8s m1 hostname 127.0 0.1 user vagrant port 2222 userknownhostsfile dev null stricthostkeyche...

GitHub Git 切換使用者

windows 直接上控制面板,賬號管理,網路證書,把github的證書刪掉 接下來push 會直接彈出登入視窗。windows不需要要設定什麼亂七八糟的以下內容 git config global user.name your username git config global user.ema...

linux centos 使用者管理 切換使用者

組管理使用者,用家目錄規定,某個使用者可以在某個目錄下使用。cd home 切換到 home資料夾下。useradd xm 新增使用者 mkdir tiger 建立乙個叫tiger的資料夾。useradd d home tiger xh 在home的指定資料夾下建立使用者。passwd xh 對使用...