Little Star Blog

路在脚下,心向远方

Oracle Database 常用命令

常用操作 用户相关 创建表空间以新用户 重启数据库实例 shutdown immediate; startup mount; alter database open; 创建表空间 CREATE TABLESPACE lxg DATAFILE 'F:\tablespace\demo' size 800M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO; 创建索引表空间 CREATE TABLESPACE lxg_index DATAFILE 'F:\tablespace\demo' size 512M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT

Oracle Database 用户相关

使用sysdba登陆 sqlplus sys/oracle as sysdba 查询DBA权限用户 select GRANTEE as username,admin_option from dba_role_privs where GRANTED_ROLE='DBA' 使用账号密码登录 sqlplus username/password 如:普通用户登录 sqlplus scott/tiger sqlplus username/password as sysdba 如:sqlplus sys/admin as sysdba sqlplus username/password@net_service_name 如