Home Database Mysql Tutorial Oracle管理与维护.配置文件的简要分析

Oracle管理与维护.配置文件的简要分析

Jun 07, 2016 pm 04:55 PM
oracle number

db_name(创建参数)是Oracle数据库(Oracle database)的唯一标识。这个方法对于单机数据库是足够的,但是随着分布式数据库(由多个数

一、Oracle的一些疑难概念

Oracle配置文件众多,欲理清思路,须要区别如下一些容易混淆的概念。

db_name(创建参数)是Oracle数据库(Oracle database)的唯一标识。这个方法对于单机数据库是足够的,但是随着分布式数据库(由多个数据库构成的)的发展,各个数据库可能存在重名,这样造成了管理上的混乱。

于是引入db_domain参数,,这样数据库标识由db_name和db_domain两个参数共同决定,避免了因为数据库重名而造成的混乱。这类似于互连网上机器名的管理。我们用db_name.db_domain 表示一个数据库,这个名称称为global_name,扩展了db_name。
 
 select * from v$parameter where name like '%db_name%';
 db_name参数创建数据库后很难更改,须要重建控制文件等。


db_domain(初始化参数)

 定义数据库所在的域,这个域与我们常说的互联网域和服务器域没有什么关系,只是为了更好的
 管理分布式数据库。
 
 select * from v$parameter where name like '%domain%';
 db_domain可以通过alter system进行修改。
 alter system set db_domain = 'liwei.com' scope=spfile;


global_name

 Oracle建议用此方法命令数据库。缺省值为db_name.db_domain。创建数据库后修改参数文件中
 db_domain不会影响global_name的值,可以用alter database rename global_name to  db_domain>进行修改,然后修改相应db_name和db_domain参数。
 
 select * from global_name;
 alter database rename global_name to TEST.LIWEI.COM;


sid(Oracle System Identifier) = instance_name (初始化参数)

 Oracle使用sid(Oracle System Identifier)标识数据库一个实例。sid也是Oracle与外部交互的实例
 标识。dbca创建数据库时,首先须要指定global_name与sid。我们看下面的文件列表:
 [oracle@liwei dbs]$ ll
 total 52
 -rw-rw----    1 oracle   oradba       1544 May  2 02:32 hc_temp.dat
 -rw-rw----    1 oracle   oradba       1544 May  1 12:40 hc_test.dat
 -rw-r-----    1 oracle   oradba      12920 May  3  2001 initdw.ora
 -rw-r-----    1 oracle   oradba       8385 Sep 11  1998 init.ora
 -rw-r--r--    1 oracle   oradba        848 May  2 02:30 inittest.ora
 -rw-rw----    1 oracle   oradba         24 May  1 12:40 lkTEST
 -rw-r-----    1 oracle   oradba       1536 May  1 19:38 orapwtest
 -rw-r-----    1 oracle   oradba       2560 May  2 02:37 spfiletest.ora
 显然Oracle实例相关配置文件都是使用sid进行文件命名。tnsnames.ora里可以使用( CONNECT_DATA =
 (SID = test) )进行连接数据库。sid值即为v$parameter中的instance_name。
 
 select * from v$parameter where name like 'instance%';
 alter system set instance_name='testins' scope=spfile;
 
 注意:修改instance_name后,tnsnames.ora的SID名称也须要与之对应。

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How long will Oracle database logs be kept? How long will Oracle database logs be kept? May 10, 2024 am 03:27 AM

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

The order of the oracle database startup steps is The order of the oracle database startup steps is May 10, 2024 am 01:48 AM

The Oracle database startup sequence is: 1. Check the preconditions; 2. Start the listener; 3. Start the database instance; 4. Wait for the database to open; 5. Connect to the database; 6. Verify the database status; 7. Enable the service (if necessary ); 8. Test the connection.

Oracle database server hardware configuration requirements Oracle database server hardware configuration requirements May 10, 2024 am 04:00 AM

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

How much memory does oracle require? How much memory does oracle require? May 10, 2024 am 04:12 AM

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

Oracle scheduled tasks execute the creation step once a day Oracle scheduled tasks execute the creation step once a day May 10, 2024 am 03:03 AM

To create a scheduled task in Oracle that executes once a day, you need to perform the following three steps: Create a job. Add a subjob to the job and set its schedule expression to "INTERVAL 1 DAY". Enable the job.

How much memory is needed to use oracle database How much memory is needed to use oracle database May 10, 2024 am 03:42 AM

The amount of memory required for an Oracle database depends on the database size, workload type, and number of concurrent users. General recommendations: Small databases: 16-32 GB, Medium databases: 32-64 GB, Large databases: 64 GB or more. Other factors to consider include database version, memory optimization options, virtualization, and best practices (monitor memory usage, adjust allocations).

How to read dbf file in oracle How to read dbf file in oracle May 10, 2024 am 01:27 AM

Oracle can read dbf files through the following steps: create an external table and reference the dbf file; query the external table to retrieve data; import the data into the Oracle table.

How much memory does an oracle database require? How much memory does an oracle database require? May 10, 2024 am 02:09 AM

Oracle Database memory requirements depend on the following factors: database size, number of active users, concurrent queries, enabled features, and system hardware configuration. Steps in determining memory requirements include determining database size, estimating the number of active users, understanding concurrent queries, considering enabled features, and examining system hardware configuration.

See all articles