Linux 下 Oracle 重启问题 查询 nginx 重启

[oracle@localhost ~]$   su - oracle   

[oracle@localhost ~]$ sqlplus / as sysdba

SQL> startup

报错:ORA-00845: MEMORY_TARGET not supported on this system

SQL> show parameter memory_target
 
NAME                                 TYPE        VALUE
----------------------------------------------- ------------------------------
memory_target                        big integer 1344M
--这里的memory_target 有1344M。


1、调整MEMORY_TARGET(11G)或者SGA_TARGET(9i,10G)大小(不建议)。

2、调整/dev/shm的大小。
   修改/etc/fstab,重新mount /dev/shm,然后就可以启动数据库了。

(1)查看/dev/shm 大小
     df -k /dev/shm
     Filesystem 1K-blocks Used Available Use% Mounted on
     tmpfs       4089416   0     4089416  0%  /dev/shm
(2)调整/dev/shm大小
     vi /etc/fstab
     #tmpfs /dev/shm tmpfs defaults 0 0
      tmpfs /dev/shm tmpfs defaults,size=10240M 0 0
(3)重新加载
     umount /dev/shm
     mount /dev/shm
     df -k /dev/shm
(4)登陆测试
     sqlplus / as sysdba


1.查看Oracle最大连接数 
SQL>show parameter processes                                            #最大连接数

2.修改最大连接数 
SQL>alter system set processes=value scope=spfile        #value为需要设置的连接数的值

重启数据库后,即可查看到修改的最大连接已经生效

3.查看当前连接数 
SQL>select * from V$SESSION where username is not null   #查看当前连接数

4.查看不同用户的连接数 
SQL>select username,count(username) from V$SESSION where username is not null group by username                    
  
5.查看并发连接数 
SQL>select count(*) from V$SESSION where status='ACTIVE'               #查看并发连接数

6.查指定程序的连接数 
SQL>select count(*) from V$SESSION where program='JDBC Thin Client'     #JDBC连接Oracle的数目




nginx   重启  安装目录  配置文件  /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf






1、查看用户使用的缺省表空间名称
你一定知道你登陆的用户名是吧,
以sysdba登陆。
sqlplus / as sysdba
select username,default_tablespace from dba_users;
2、查看表空间总大小,及其已使用大小
select a.tablespace_name,a.bytes/1024/1024 "Sum MB",(a.bytes-b.bytes)/1024/1024 "used MB",b.bytes/1024/1024 "free MB",
round(((a.bytes-b.bytes)/a.bytes)*100,2) "percent_used"
from
(select tablespace_name,sum(bytes) bytes from dba_data_files group by tablespace_name) a,
(select tablespace_name,sum(bytes) bytes,max(bytes) largest from dba_free_space group by tablespace_name) b
where a.tablespace_name=b.tablespace_name
order by ((a.bytes-b.bytes)/a.bytes) desc; 

Guess you like

Origin blog.csdn.net/a1179785335/article/details/42394847