决定一个人富有的三个条件,一是出身,二是运气,三是努力
If you can dream it,you can do it! Nothing Impossible~
posts - 145,comments - 245,views - 63万

1 创建表空间

View Code
1 CREATE TABLESPACE CPORTAL LOGGING DATAFILE '/dev/raw/raw1' SIZE 30000M REUSE EXTENT MANAGEMENT LOCAL


2 创建用户

复制代码
View Code
1 CREATE USER CPORTAL PROFILE DEFAULT IDENTIFIED BY CPORTAL DEFAULT
2
3 TABLESPACE CPORTAL TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;
4
5 GRANT CONNECT TO CPORTAL;
6
7 GRANT RESOURCE TO CPORTAL;
复制代码


3 参数修改

复制代码
View Code
 1 ALTER SYSTEM SET sga_target 1000M SCOPESPFILE;
2
3 ALTER SYSTEM SET pga_aggregate_target 200M SCOPESPFILE;
4
5 ALTER SYSTEM SET OPEN_CURSORS500 SCOPESPFILE;
6
7 ALTER SYSTEM SET processes200 SCOPESPFILE;
8
9 ALTER SYSTEM SET remote_login_passwordfile NONE
10
11 SCOPESPFILE;
12
13 create pfile from spfile;
14
15 -- Modify the other oracle parameter!
16
17 ALTER DATABASE TEMPFILE '/opt/oracle/oradata/cportal/temp01.dbf' RESIZE 1024M;
18
19 ALTER DATABASE DATAFILE '/opt/oracle/oradata/cportal/undotbs01.dbf' RESIZE 1024M;
20
21 ALTER DATABASE DATAFILE '/opt/oracle/oradata/cportal/undotbs01.dbf' AUTOEXTEND ON MAXSIZE 10240M
复制代码


4 查看表空间名称和大小

View Code
1 select t.tablespace_name,round(sum(bytes/(1024*1024)),0) ts_size from dba_tablespaces t dba_data_files d
2
3 where t.tablespace_name = d.tablespace_name
4
5 group by t.tablespace_name;


5 查看表空间的使用情况

View Code
1 select sum(bytes)/(1024*1024)as free_space,tablespace_name from dba_free_spacegroup by tablespace_name;

 

6、查看表空间物理文件的名称及大小

复制代码
View Code
1 select tablespace_name,file_id,file_name,
2
3 round(bytes/(1024*1024),0) total_space
4
5 from dba_data_files
6
7 order by tablespace_name;
复制代码


7、查看数据库库对象

View Code
1 select owner,object_type,status,count(*)count# from all_objects group by owner,object_type,status;


8、查看控制文件

View Code
1 select name from v$controlfile;


9、查看日志文件

View Code
1 select member from v$logfile;


10 、结束用户会话

View Code
1 alter system kill session 'SID,SERIAL#';
2
3 select sid,serial#,username,program,machine,status from v$session;


 

posted on   ZEKELOVE  阅读(456)  评论(0编辑  收藏  举报
编辑推荐:
· 你所不知道的 C/C++ 宏知识
· 聊一聊 操作系统蓝屏 c0000102 的故障分析
· SQL Server 内存占用高分析
· .NET Core GC计划阶段(plan_phase)底层原理浅谈
· .NET开发智能桌面机器人:用.NET IoT库编写驱动控制两个屏幕
阅读排行:
· 我干了两个月的大项目,开源了!
· 千万级的大表,如何做性能调优?
· 盘点!HelloGitHub 年度热门开源项目
· Phi小模型开发教程:用C#开发本地部署AI聊天工具,只需CPU,不需要GPU,3G内存就可以运行,
· 你所不知道的 C/C++ 宏知识——基于《C/C++ 宏编程的艺术》
< 2012年2月 >
29 30 31 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 1 2 3
4 5 6 7 8 9 10

点击右上角即可分享
微信分享提示