Oracle 查看连接数

在数据库开发中,打开数据库连接是很慢的。怎样oracle当前的连接数呢? 只需要用下面的SQL语句查询一下就可以了。

select * from v$session where username is not null;

查看不同用户的连接数

select username,count(username) from v$session where username is not null group by username;
more ...

Oracle改ip后em启动不了

首先查看以下这两个文件

  • network/admin/listener.ora
  • network/admin/tnsnames.ora

如果是机器名的话可以不修改,如果是固定IP的话就要修改为机器当前的IP地址

1、重新配置监听,

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 当前IP地址)(PORT = 1521))
    )
  )

1、重新配置网络服务名,

ORACLE =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 当前IP地址)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = oracle)
    )
  )

在oracle的bin目录下调出cmd

set ORACLE_HOSTNAME={机器名}
emca -config dbcontrol ...
more ...