Oracle常见DBA操作
Oracle常见DBA操作
修改语言环境
将中文环境修改为英文环境
alter session set als_language = ‘AMERICAN’;
将英文环境修改为中文环境
alter session set nls_language = ‘SIMPLIFIED CHINESE’;
查询该用户拥有哪些表
select table_name from user_tables;
查询oracle下数据字典表名称及用途
select * from dictionary;
查询oracle下有多少张视图
select index_name from user_views;
查询该用户拥有哪些数据库对象,包括约束等
select object_name from user_objects;
dictionary的操作
desc user_tables;
select table_name from user_tables;
select index_name from user_indexes;
select view_name from user_views;
select * from dictionary;
备份和恢复
exp
imp
创建新用户
create user haungfang identified by huangfang default tablespace users quota 10M on users
grant connect, resource, create view, create trigger to huangfang
drop user liuchao cascade;