Oracle installation notes (K1) « Różności …

Różności …

28 grudnia 2010

Oracle installation notes (K1)

Zaszufladkowany do: Bazy danych,Oracle — Tagi: — Jacek @ 13:11

You can install and run multiple versions of Oracle on a single-server machine. AllOracle products use a directory referred to by the environment or system variable ORACLE_HOME to find the base directory for the software they will use.

A rolling upgrade allows you to bring down some of the nodes of the cluster, upgrade their software, and then bring them back online as part of the cluster.

Online transaction processing (OLTP) systems usually have a larger number of users performing smaller transactions, while data warehouses usually have a smaller number of users performing larger queries.

With Automatic Storage Management (ASM), introduced in Oracle Database 10g, you can add additional disk space or take away disks without interrupting database service.

The Automatic Workload Repository (AWR), first available in Oracle Database 10g, maintains a history of workload and performance measurements, which are used by the Automatic Database Diagnostic Monitor (ADDM) to spot performance anomalies. You can also use AWR to track ongoing changes in workload.

Oracle Database Configuration Assistant
Tworzenie ze skryptów: The Oracle software CD-ROM also includes a sample scriptcalled BUILD_DB.SQL

A version of Oracle Net runs on the client machine and on the database server, andallows clients and servers to communicate over a network using virtually any popularnetwork protocol.
Local name resolution – TNSNAMES.ORA
Oracle Names service -  przestarzały 9i
Oracle Internet Directory – Lightweight Directory Access Protocol (LDAP). Oracle Internet Directory (OID) is a part of FusionMiddleware. The OID is also used for a variety of other purposes, such as enabling single sign-on for the Oracle Application Server Portal.
Host naming

These name resolution options are not mutually exclusive. For example, you can use Oracle Internet Directory and local name resolution (TNSNAMES.ORA files)together. In this case, you specify the order Oracle should use in resolving names inthe SQLNET.ORA file.

Oracle Net requires several configuration files. The default location for the files usedto configure an Oracle Net network are as follows:
• On Windows, ORACLE_HOME\net80\admin for Oracle8
and ORACLE_HOME\network\ admin for Oracle8i and more current releases
• On Unix, ORACLE_HOME/network/admin

Youcan place these files in another location, in which case youmu st set an environment or system variable called TNS_ADMIN to the nondefault location.
The files that form a simple Oracle Net configuration are as follows:
LISTENER.ORA –  Contains details for configuring the Oracle Net Listener, such as which instances or services the Listener is servicing.
TNSNAMES.ORA –  Decodes a service name into a specific machine address and Oracle instance for the connection request.
SQLNET.ORA – Provides important defaults and miscellaneous configuration details. Default domain name for your network.
LDAP.ORA - For Oracle8i and later releases, the LDAP.ORA file contains the configuration information needed to use an LDAP directory, such as the Oracle Internet Directory.

The SPFILE can also be kept on a shared disk, so that it can be used to initialize multiple instances in an Oracle Real Application Clusters configuration.

Start bazy danych:
- start instancji - Oracle reads the instance initialization parameters from the SPFILE or INIT.ORA file on the server. Oracle then allocates memory for the System Global Area and starts the background processes of the instance. At this point, none of the physical files in the database have been opened, and the instance is in the NOMOUNT state.
- montowanie bazy danych –  The instance opens the database’s control files. At this point, only the control files are open. This is called the MOUNT state.
- otwarcie bazy danych –  The instance opens the redo log files and datafiles using the information in the control file.

Zamknięcie bazy danych
- zamknięcie bazy –  Oracle flushes any modified database blocks that haven’t yet been written to the disk from the SGA cache to the datafiles. Oracle also writes out any relevant redo information remaining in the redo log buffer. Oracle then checkpoints the datafiles, marking the datafile headers as “current” as of the time the database was closed, and closes the datafiles and redo log files.
- odmontowanie bazy - Oracle updates the relevant entries in the control files to record a clean shutdown and then closes them. At this point, the entire database is closed; only the instance remains.
- zamknięcie instancji - The Oracle software stops the background processes of the instance and frees, or deallocates, the shared memory used for the SGA.

The matchmaker that arranges marriages between Oracle clients and server processes is called the Oracle Net Listener. The Listener detects an incoming request and introduces the requesting client to an Oracle server process. The Listener steps out of the way and lets the client and server communicate directly.

Multi-Threaded Server (MTS) in Oracle7, known as the shared server since Oracle9i. Shared servers allow the Oracle instance to share a set of server processes across a larger group of users. Dispatchers - Clients directly connect to their dispatchers instead of to a server. The dispatchers accept requests from clients and place them in a request queue, which is a memory structure in the SGA. Shared servers - The shared server processes read from the request queue, process the requests, and place the results in the response queue for the appropriate dispatcher.

Program Global Area (PGA) - state information contains information about the SQL statements executed by the session. When youu se a dedicated server, this state is stored in the private memory used by the dedicated server. If you’re using the shared servers, however, any server can work on behalf of a specific client. The session state cannot be stored in the PGA of the shared server process. All servers must be able to access the session state because the session can migrate between different shared servers. For this reason, Oracle places this state information in the System Global Area (SGA). By default, the memory for the shared server session state comes from the shared pool (z SGA). Alternatively, you cou ld also configure something called the large pool as a separate area of memory for shared servers. Oracle Database 11g introduced automated memory management of the SGA and PGA size by default when you set the MEMORY_TARGET initialization parameter.

MTS można sprawdzić w:
- V$SHARED_SERVER_MONITOR - This view contains dynamic information about the shared servers, such as highwater marks for connections and how many shared servers have been started and stopped in response to load variations.
- V$DISPATCHER
- V$SHARED_SERVER
- V$CIRCUIT - Youcan think of the route from a client to its dispatcher and from the dispatcher to the shared server (using the queues) as a virtual circuit. This view details these virtual circuits for user connections.

Data Manipulation Language (DML)
System Change Number (SCN) - A key factor in preserving database integrity is an awareness of which transaction came first. For example, if Oracle is to prevent a later transaction from unwittingly overwriting an earlier transaction’s changes, it must know which transaction began first.
Rollback segments –  Rollback segments are structures in the Oracle database used to store “undo” information for transactions, in case of rollback. When a transaction starts changing some data in a block, it first writes the old image of the data to a rollback segment. A rollback segment is not the same as a redo log. The redo log is used to log all transactions to the database and to recover the database in the event of a system failure, while the rollback segment provides rollback for transactions and read consistency. Blocks of rollback segments are cached in the SGA just like blocks of tables and indexes. In Oracle9i, youhad the option of specifying automatic management of all rollback segments through the use of an undo tablespace.

The server process copies the old image of the employee data about to be changed to a rollback segment and to a redo seqment. The rollback segment changes are part of the redo. This may seem a bit odd, but remember that redo is generated for all changes resulting from the transaction.

Oracle can do one of two things to get the changes into the database on the disk:
• Write all the database blocks the transaction changed to their respective datafiles.
• Write only the redo information, which typically involves much less I/O than writing the database blocks. This recording of the changes can be replayed to reproduce all the transaction’s changes later, if they are needed due to a failure.
To provide maximum performance without risking transactional integrity, Oracle writes out only the redo information.

In Oracle9i, rollback segments were also used to implement a feature called Flashback Query. Remember that rollback segments are used to provide a consistent image of the data in your Oracle database at a previous point in time. With Flashback Query, you can direct Oracle to return the results for a SQL query at a specific point in time.
• Flashback Database, to roll back the entire database to a consistent state
• Flashback Table, to roll back a specific table
• Flashback Drop to roll back a DROP operation
• Flashback Versions Query, to retrieve changes to one or more rows

Brak komentarzy

Brak komentarzy.

Kanał RSS z komentarzami do tego wpisu.

Przepraszamy, możliwość dodawania komentarzy jest obecnie wyłączona.

Strona startowa: www.jaceksen.pl