oracle常用命令

阅读更多

#直接进入SQLPLUS命令提示符

sqlplus /nolog

 

#以管理员登录

conn sys/orcl as sysdba

 

 

#创建表空间

create tablespace bds_dl datafile '/opt/oracle/11g/udb/bds_dl.dbf' size 100m autoextend on next 3m maxsize unlimited;

 

#创建用户

create user bds_dl identified by bds_dl default tablespace bds_dl;

 

#为用户授权

grant connect,resource,create database link to bds_dl;

 

 

#删除用户

drop user bds cascade;

#删除表空间

drop tablespace bds including contents and datafiles;

 

 

#解锁用户

alter user bds account unlock; --解开LOCKED

 

#关闭服务

shutdown immediate

 

#启动服务

startup

 

 

#查询数据库字符集

 select userenv('language') from dual;

 

你可能感兴趣的:(SQL,oracle)