【Oracle】service_name和service_names的关系

从oracle9i开始,后台进程PMON自动在监听器中注册初始化参数SERVICE_NAMES中定义的服务名,SERVICE_NAMES默认为db_name.db_dimain。客户端tns配置中SERVICE_NAME的名称必须是SERVICE_NAMES或其中的一个NAME。

1 listenter.ora文件中的 GLOBAL_DBNAME和tnsnames.ora文件SERVICE_NAME的配置一样时,GLOBAL_DBNAME = A, 连接串中的SERVICE_NAME = A,此时就可以连接上数据库。根据tnsnames.ora文件中的连接串中的SERVICE_NAME = A 找到监听器listener.ora中的SID_DESC = (GLOBAL_DBNAME= A),之后在找到SID_NAME, 来连接到数据库实例。

2listenter.ora文件中的 GLOBAL_DBNAME和tnsnames.ora文件的SERVICE_NAME的配置一样时,tnsnames.ora中的SERVICE_NAME要与参数文件中的SERVICE_NAMES 参数一样或者是其中之一,否则无法通过tns连接到数据库。

tnsnames.ora文件中的service_name 和 listener.oar文件中的GLOBAL_DBNAME一样的情况:

查看tnsnames.ora文件的配置信息:

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>cat tnsnames.ora 

# tnsnames.ora Network Configuration File: /opt/oracle/11.2.0/alifpre/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

YANGDB =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = yangdb)

    )

  )

YANGDB1 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = yangdb1)

    )

  )

YANGDB2 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = yangdb2)

    )

  )

YANGDB3 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = yangdb3)

    )

  )

RAC =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.250.7.200)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = rac)

    )

  )

 监听文件中的配置信息:

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>cat listener.ora 

# listener.ora Network Configuration File: /opt/oracle/11.2.0/alifpre/network/admin/listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

      (SID_LIST =

         (SID_DESC =

           (SID_NAME = PLSExtProc)

             (ORACLE_HOME = /opt/oracle/11.2.0/alifpre)

           (PROGRAM = extproc)

         )

        (SID_DESC =

          (GLOBAL_DBNAME = yangdb)

           (ORACLE_HOME = /opt/oracle/11.2.0/alifpre)

          (SID_NAME = yangdb)

         )

     ) 

yangdb =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    )

  )

ADR_BASE_LISTENER = /opt/oracle

参数service_names是静态的,必须重启机器才能够生效。

oracle@rac3:/home/oracle>sqlplus "/as sysdba"

SYS@yangdb-rac3> alter system set service_names='yangdb,yangdb1,yangdb2,yangdb3' scope=both;

System altered.

SYS@yangdb-rac3> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SYS@yangdb-rac3> startup 

ORACLE instance started.

Database mounted.

Database opened.

SYS@yangdb-rac3> show parameter service_names

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

service_names                        string      yangdb,yangdb1,yangdb2,yangdb3

进行连接测试:

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>sqlplus yang/yang@yangdb1

SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 20 11:12:13 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

YANG@yangdb-rac3> show parameter service_ 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

service_names                        string      yangdb,yangdb1,yangdb2,yangdb3

YANG@yangdb-rac3> exit

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>sqlplus yang/yang@yangdb2

SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 20 11:57:26 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

YANG@yangdb-rac3> show parameter service_

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

service_names                        string      yangdb,yangdb1,yangdb2,yangdb3

YANG@yangdb-rac3> exit

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>sqlplus yang/yang@yangdb3

SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 20 11:57:38 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:

YANG@yangdb-rac3> show parameter service_

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

service_names                        string      yangdb,yangdb1,yangdb2,yangdb3

YANG@yangdb-rac3> exit

查看监听服务状态,可以知道共有6个监听服务名

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>lsnrctl service

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-OCT-2011 11:59:11

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:0 refused:0

         LOCAL SERVER

Service "yangdb" has 2 instance(s).

  Instance "yangdb", status UNKNOWN, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:0 refused:0

         LOCAL SERVER

  Instance "yangdb", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:4 refused:0 state:ready

         LOCAL SERVER

Service "yangdb1" has 1 instance(s).

  Instance "yangdb", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:4 refused:0 state:ready

         LOCAL SERVER

Service "yangdb2" has 1 instance(s).

  Instance "yangdb", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:4 refused:0 state:ready

         LOCAL SERVER

Service "yangdb3" has 1 instance(s).

  Instance "yangdb", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:4 refused:0 state:ready

         LOCAL SERVER

Service "yangdbXDB" has 1 instance(s).

  Instance "yangdb", status READY, has 1 handler(s) for this service...

    Handler(s):

      "D000" established:0 refused:0 current:0 max:1022 state:ready

         DISPATCHER

         (ADDRESS=(PROTOCOL=tcp)(HOST=rac3)(PORT=45357))

The command completed successfully

tnsnames.ora文件中的service_name 和 参数文件中的service_name不一样的情况:

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>vi tnsnames.ora 

# tnsnames.ora Network Configuration File: /opt/oracle/11.2.0/alifpre/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

lily =   ----连接标识,可以为任意值

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = lily)

    )

  )

YANGDB1 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = yangdb1)

    )

  )

YANGDB2 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = yangdb2)

    )

  )

YANGDB3 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = yangdb3)

    )

  )

"tnsnames.ora" 60L, 1198C 已写入                            

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>vi listener.ora 

# listener.ora Network Configuration File: /opt/oracle/11.2.0/alifpre/network/admin/listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

      (SID_LIST =

         (SID_DESC =

           (SID_NAME = PLSExtProc)

             (ORACLE_HOME = /opt/oracle/11.2.0/alifpre)

           (PROGRAM = extproc)

         )

        (SID_DESC =

          (GLOBAL_DBNAME = lily)

           (ORACLE_HOME = /opt/oracle/11.2.0/alifpre)

          (SID_NAME = yangdb)

         )

     )

yangdb =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    )

  )

ADR_BASE_LISTENER = /opt/oracle

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-OCT-2011 10:58:30

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production

Start Date                27-SEP-2011 21:47:16

Uptime                    22 days 13 hr. 11 min. 14 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /opt/oracle/11.2.0/alifpre/network/admin/listener.ora

Listener Log File         /opt/oracle/diag/tnslsnr/rac3/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac3)(PORT=1521)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "yangdb" has 2 instance(s).

  Instance "yangdb", status UNKNOWN, has 1 handler(s) for this service...

  Instance "yangdb", status READY, has 1 handler(s) for this service...

Service "yangdb1" has 1 instance(s).

  Instance "yangdb", status READY, has 1 handler(s) for this service...

Service "yangdb2" has 1 instance(s).

  Instance "yangdb", status READY, has 1 handler(s) for this service...

Service "yangdb3" has 1 instance(s).

  Instance "yangdb", status READY, has 1 handler(s) for this service...

Service "yangdbXDB" has 1 instance(s).

  Instance "yangdb", status READY, has 1 handler(s) for this service...

The command completed successfully

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>lsnrctl service

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-OCT-2011 10:58:37

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:0 refused:0

         LOCAL SERVER

Service "yangdb" has 2 instance(s).

  Instance "yangdb", status UNKNOWN, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:0 refused:0

         LOCAL SERVER

  Instance "yangdb", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:4 refused:0 state:ready

         LOCAL SERVER

Service "yangdb1" has 1 instance(s).

  Instance "yangdb", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:4 refused:0 state:ready

         LOCAL SERVER

Service "yangdb2" has 1 instance(s).

  Instance "yangdb", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:4 refused:0 state:ready

         LOCAL SERVER

Service "yangdb3" has 1 instance(s).

  Instance "yangdb", status READY, has 1 handler(s) for this service...

    Handler(s):

      "DEDICATED" established:4 refused:0 state:ready

         LOCAL SERVER

Service "yangdbXDB" has 1 instance(s).

  Instance "yangdb", status READY, has 1 handler(s) for this service...

    Handler(s):

      "D000" established:0 refused:0 current:0 max:1022 state:ready

         DISPATCHER

         (ADDRESS=(PROTOCOL=tcp)(HOST=rac3)(PORT=45357))

The command completed successfully

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>lsnrctl reload

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-OCT-2011 10:58:45

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

The command completed successfully

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>

更改tnsnames.ora文件中的service_name的值 yangdb为lily,并相应的修改listener.ora文件中的global_dbname的值为lily ,也可以成功连接数据库。

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>vi tnsnames.ora 

# tnsnames.ora Network Configuration File: /opt/oracle/11.2.0/alifpre/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

lily =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = lily)

    )

  )

YANGDB1 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = yangdb1)

    )

  )

YANGDB2 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = yangdb2)

    )

  )

YANGDB3 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = yangdb3)

    )

  )

"tnsnames.ora" 60L, 1196C 已写入

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>sqlplus yang/yang@lily 

SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 20 11:00:11 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

YANG@yangdb-rac3> show parameter service_        

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

service_names                        string      yangdb,yangdb1,yangdb2,yangdb3  --动态监听里面没有lily 这样的服务

YANG@yangdb-rac3> exit

说明:如果 参数文件中的service_names没有lily这个值,但是listener.ora文件中有与之对应的GLOBAL_DBNAME,并且已经启动了静态监听服务,则sqlplus通过@lily也可以连接数据库。

如果没有启动静态监听,即没有lily 这样的service,则不可以连接数据库,(当然修改过之后没有执行reload 或没有重启监听,则还可以连接,因为之前存在,这样的例子不讨论)

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>vi listener.ora     

# listener.ora Network Configuration File: /opt/oracle/11.2.0/alifpre/network/admin/listener.ora

# Generated by Oracle configuration tools.

# SID_LIST_LISTENER =

#      (SID_LIST =

#         (SID_DESC =

#           (SID_NAME = PLSExtProc)

#             (ORACLE_HOME = /opt/oracle/11.2.0/alifpre)

#           (PROGRAM = extproc)

#         )

#        (SID_DESC =

#          (GLOBAL_DBNAME = lily)

#           (ORACLE_HOME = /opt/oracle/11.2.0/alifpre)

#          (SID_NAME = yangdb)

#         )

#     ) 

yangdb =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))

    )

  )

ADR_BASE_LISTENER = /opt/oracle    

编辑过之后重新启动数据库(可选),重启监听,目的重新注册服务,去掉静态监听的服务。

 SYS@yangdb-rac3> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SYS@yangdb-rac3>  startup 

Database mounted.

Database opened. 

SYS@yangdb-rac3> 

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-OCT-2011 11:11:24

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /opt/oracle/11.2.0/alifpre/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production

System parameter file is /opt/oracle/11.2.0/alifpre/network/admin/listener.ora

Log messages written to /opt/oracle/diag/tnslsnr/rac3/listener/alert/log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac3)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production

Start Date                20-OCT-2011 11:11:24

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /opt/oracle/11.2.0/alifpre/network/admin/listener.ora

Listener Log File         /opt/oracle/diag/tnslsnr/rac3/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac3)(PORT=1521)))

The listener supports no services  --没有静态监听服务,这时只能通过动态监听的服务来连接到数据库。

The command completed successfully

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>sqlplus yang/yang@lily

SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 20 11:11:35 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:

ORA-12514: TNS:listener does not currently know of service requested in connect 

descriptor --报错,监听没有lily这样的服务

Enter user-name: ^[[ 

--通过pmon动态监听的服务名来连接数据库。

oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>sqlplus yang/yang@yangdb1

SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 20 11:12:13 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

YANG@yangdb-rac3> show parameter service_ 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

service_names                        string      yangdb,yangdb1,yangdb2,yangdb3

时间: 2024-09-29 07:21:50

【Oracle】service_name和service_names的关系的相关文章

Oracle 10g列掩码与关系视图比较

在前面的文章,我为大家介绍了如何使用Oracle 10g的虚拟私有数据库特征(VPD)掩藏某列数据TechRepublic的成员BrooklynPennyPincher建议我写一篇关于VPD与关系视图的比较文章. 前面文章中小技巧的任务是如果department_id的值等于60,那么掩藏报告中的salary和commission_pct列.因为谓词是一个静态值,所以一个关系视图肯定也能够完成同样的任务. 列表A显示了使用选择器CASE语句(这个语句在Oracle SQL的8i版本有了)比较de

Oracle SCN与数据恢复的关系

Oracle内部主要存在以下四种SCN 1.系统检查点(system checkpoint)SCN 每当一个 检查点完成时,Oracle就把该检查点对应的SCN记录到控制文件中,可以用以下语句查看当前 数据库的检查点SCN: select CHECKPOINT_CHANGE# from v$database; CHECKPOINT_CHANGE# ------------------ 6627441168 2.数据文件头 SCN(数据文件的启动SCN) 该SCN记录在每个数据文件头中,正常情况下

【Oracle】TNS-12154 错误解析

ORA-12514: TNS:监听程序当前无法识别连接描述符中请求的服务 这个提示在一定程度上导致产生误解,让人认为数据库服务名SERVICE NAME本身有问题,其实它指的是tnsnames.ora中配置的别名ALIAS所对应的SERVICE_NAME与在监听程序listener的注册的服务名中找不到匹配的服务名,当然如果只是配置了动态监听,则可能一个也没有(也可能一个也没有,比如只配置了动态监听). tnsnames.ora中的服务名SERVICE_NAME的可选值为静态和动态注册的服务名(

配置ORACLE 客户端连接到数据库

       --================================= -- 配置ORACLE 客户端连接到数据库 --=================================       Oracle 客户端连接到Oracle 数据库服务器貌似不同于SQL serve中的网络配置,其实不然,只不过所有的SQL server 运行于Windows平台,故很多配置直接集成到了操作系统之中.所以无需配置客户端即可连接到服务器.Oracle 客户端连接到数据库依赖于Oracle

Oracle DBA常用sql分享

链接:http://blog.itpub.net/28602568/viewspace-1396081/ 标题: Oracle DBA常用sql分享 作者:lōττéry版权所有[文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.] 本文主要分享Oracle DBA 工作中常用的一些sql 1.Oracle 查询每天执行慢的SQL 2.Oracle 查询锁之间的依赖关系 3.Oracle 查找锁之间依赖关系的最源头SID  4.Oracle 查询各表空间使用情况--完善篇 5.Orac

Oracle Tuning的一些总结

oracle     关于Oracle的性能调整,一般包括两个方面,一是指Oracle数据库本身的调整,比如SGA.PGA的优化设置,二是连接Oracle的应用程序以及SQL语句的优化.做好这两个方面的优化,就可以使一套完整的Oracle应用系统处于良好的运行状态.         本文主要是把一些Oracle Tuning的文章作了一个简单的总结,力求以实际可操作为目的,配合讲解部分理论知识,使大部分具有一般Oracle知识的使用者能够对Oracle Tuning有所了解,并且能够根据实际情况

Oracle专家高级编程学习笔记( 二)

oracle|笔记|编程|高级 Oracle体系结构的3个主要组件:1.文件:组成数据库实例的5个文件(参数文件,控制文件,数据文件,临时数据文件,重做日志文件)2.系统全局区域SGA( System Global Area): Java池,共享池等3.物理进程与线程: 在数据库上运行3种不同类型的进程(服务器server进程,后台backgroud进程,从属slave进程) 术语解释:数据库: 物理操作系统文件的集合实例: 一组oracle进程和SGA二者关系:一个数据库可以被多个实例装载mo

JAVA与Oracle存储过程(二)

在前一篇文章中简单介绍了JAVA程序如何调用Oracle存储过程的基本语法程序结构, 本文将介绍JAVA跟Oracle的另一种关系,即通过JAVA编写Oracle存储过程. 通常情况下,我们都是使用Oracle数据库系统中的ps/sql语句来为oracle编写各种存储过程,不过,在Oracle的第八个版本8之后,为我们提供了编写存储过程的另一种新的选择,那就是使用JAVA来编写Oracle存储过程.从Oracle8.0版本开始,在Oracle数据库系统中自带了java虚拟机jvm,因此使得Ora

MySQL DBA技术难度低为什么工资比Oracle高?

编辑手记:前几天在知乎上出现了一个很热的帖子,话题是"MySQL DBA技术难度低为什么工资比oracle高?",这个话题很快引起了热烈的讨论.从回帖的情况来看,大部分人几乎都默认了MySQL DBA工资的确高这个事实,那么原因是什么,我们节选MySQL专家刘伟的回帖跟大家分享. 以下是他回帖的原文: 主要有以下两个原因: 1.市场供需关系 2.技术要求相对高 这两个因素一直没有得到改善,导致现在市场的行情是:招MySQL DBA难,招称心的MySQL DBA就更难. 先说一个工资议价