Download The following example creates a text initialization parameter file from

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Microsoft SQL Server wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Concurrency control wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Database wikipedia , lookup

Relational model wikipedia , lookup

Clusterpoint wikipedia , lookup

Database model wikipedia , lookup

Object-relational impedance mismatch wikipedia , lookup

Oracle Database wikipedia , lookup

Transcript
PARAMETERS IN ORACLE
The server parameter file is initially created from a text initialization parameter file (init.ora). It
must be created prior to its use in the STARTUP command. The create SPFILE statement is used
to create a server parameter file. The following example creates a server parameter file from an
initialization parameter file:
CREATE SPFILE FROM
PFILE='/u01/oracle/product/920/dbs/initRAC1.ora';
The following example creates a text initialization parameter file from the server parameter file.
Since no paths are specified, the files will be located in $ORACLE_HOME/database or its
equivalent:
CREATE PFILE FROM SPFILE;
The example below creates a text initialization parameter file from a server parameter file, where
the names of the files are specified:
CREATE PFILE='/u01/oracle/product/920/dbs/racdb_init.ora'
FROM SPFILE='/u01/oracle/product/dbs/racdb_spfile.ora';
Some initialization parameters are dynamic since they can be modified using the ALTER
SESSION or ALTER SYSTEM statement while an instance is running. Use the following syntax
to dynamically alter initialization parameters:
ALTER SESSION SET parameter_name = value
ALTER SYSTEM SET parameter_name = value [DEFERRED]
When an Oracle Instance is started, the characteristics of the Instance are established
by parameters specified within the initialization parameter file. These initialization
parameters are either stored in a PFILE or SPFILE. SPFILEs are available in Oracle 9i
and above. All prior releases of Oracle are using PFILEs.
What is Pfile
A PFILE is a static, client-side text file that must be updated with a standard text
editor like "notepad" or "vi". This file normally reside on the server, however, you
need a local copy if you want to start Oracle from a remote machine. DBA's commonly
refer to this file as the INIT.ORA file.
What is an SPFile
An SPFILE (Server Parameter File), on the other hand, is a persistent server-side
binary file that can only be modified with the "ALTER SYSTEM SET" command. This
means you no longer need a local copy of the pfile to start the database from a
remote machine. Editing an SPFILE will corrupt it, and you will not be able to start
your database anymore.
Viewing Parameters Settings:
One can view parameter values using one of the following methods (regardless if they were set
via PFILE or SPFILE):
The "SHOW PARAMETERS" command from SQL*Plus (i.e.: SHOW
PARAMETERS timed_statistics)
o
V$PARAMETER view - display the currently in effect parameter values
o
Select name, value from v$parameter
To view a specific parameter we can use the LIKE keyword
o SHOW PARAMETERS LIKE “parameter_name”
To save the paremeters externally for reference
spool filename
show parameters
spool off
Changing SPFILE parameter values:
While a PFILE can be edited with any text editor, the SPFILE is a binary file. The
"ALTER SYSTEM SET" and "ALTER SYSTEM RESET" commands can be used to change
parameter values in an SPFILE. Look at these examples:
SQL> ALTER SYSTEM SET open_cursors=300 SCOPE=SPFILE;
SQL> ALTER SYSTEM SET timed_statistics=TRUE
COMMENT='Changed by Frank on 1 June 2003'
SCOPE=BOTH
SID='*';
VARIOUS PARAMETERS IN ORACLE:
INITIALIZATION PARAMETERS:
DB_CREATE_FILE_DEST : Specifies the directory location where database datafiles
will be created if the Oracle Managed Files feature is used.
DB_CREATE_ONLINE_LOG_DEST_n: Specifies the location(s) where the database redo log
files
will be created if the Oracle Managed Files feature is used.
DB_DOMAIN: Specifies the logical location of the database on the network.
DB_NAME: Specifies the name of the database that is mounted by
the instance.
DB_RECOVERY_FILE_DEST: Specifies the location where recovery files will be written if
the Flash Recovery feature is used.
DB_RECOVERY_FILE_DEST_SIZE: Specifies the amount of disk space available for storing
Flash Recovery files.
DB_UNIQUE_NAME: Specifies a globally unique name for the database within
the enterprise.
INSTANCE_NUMBER: Identifies the instance in a Real Application Clusters (RAC)
environment.
JOB_QUEUE_PROCESSES: Specifies the number of background processes to start
for handling jobs submitted via Enterprise Manager or
DBMS_JOBS.
LOG_ARCHIVE_DEST_n: Specifies as many as nine locations where archived redo
log files are to be written.
LOG_ARCHIVE_DEST_STATE_n: Indicates how the specified locations should be used for
log archiving.
NLS_LANGUAGE: Specifies the default language of the database.
NLS_TERRITORY: Specifies the default region or territory of the database.
OPEN_CURSORS: Sets the maximum number of cursors that an individual
session can have open at one time.
PGA_AGGREGATE_TARGET: Establishes the overall amount of memory that all PGA
processes
are allowed to consume.
PROCESSES: Specifies the maximum number of operating system processes
that can connect to the instance.
REMOTE_LISTENER: Specifies a network name that points to the address or list
of addresses of remote Oracle Net listeners.
REMOTE_LOGIN_PASSWORDFILE: Determines whether the instance uses a password file
and what type.
ROLLBACK_SEGMENTS: Specifies only if Automatic Undo Management is not
being used.
SESSIONS: Determines the maximum number of sessions that can
connect to the database.
SGA_TARGET: Establishes the maximum size of the SGA, within which
space is automatically allocated to each SGA component when automatic memory management
is used.
SHARED_SERVERS: Specifies the number of Shared Server processes to start
when the instance is started.
.
UNDO_MANAGEMENT: Establishes whether system undo is automatically or manually
managed.
UNDO_TABLESPACE: Specifies which tablespace stores undo segments if the
Automatic Undo Management option is used
Parameters for the Listening Location Section of listener.ora
LISTENER: Indicates the starting point of a listener definition. This is actually the
name of the listener being defined. The default name is LISTENER.
DESCRIPTION: Describes each of the listening locations
ADDRESS_LIST: Contains address information about the locations where the listener is
listening.
PROTOCOL: Designates the protocol for this listening location.
HOST: Holds the name of the machine on which the listener resides.
PORT: Contains the address on which the listener is listening.
SID_LIST_LISTENER: Defines the list of Oracle services for which the listener is configured.
SID_DESC: Describes each Oracle SID.
GLOBAL_DBNAME: Identifies the global database name. This entry should match the
SERVICE_NAMES entry in the init.ora file for the Oracle service.
ORACLE_HOME: Shows the location of the Oracle executables on the server.
SID_NAME: Contains the name of the Oracle SID for the Oracle instance.
Log File: Specifies where a listener will write log information. This is ON by default and
defaults to %ORACLE_HOME%\
network\log\listener.log.
Trace File: Specifies the location of listener trace information. Defaults to
$ORACLE_HOME\network\trace\ listener.trc.
The tnsnames.ora Parameters
DESCRIPTION: Starts the connect descriptor section of the file.
ADDRESS_LIST: Starts a list of all connect descriptor address information.
ADDRESS: Specifies the connect descriptor for the net service name.
PROTOCOL: Specifies the protocol used, such as TCP/IP.
HOST: Specifies the name of the machine on which the listener is running. An IP
address can also be specified in TCP/IP.
PORT: Specifies the listening location of the listener specific to TCP/IP.
CONNECT_DATA: Starts the services section for this net service name.
SERVICE_NAME: Replaces the SID parameter from older releases of Oracle. Defines which
service to connect to, which can be the same as the ORACLE_SID or the global
database name. Databases can now be referred to by more than a single
service name.
Data Pump Export Parameters
full=y Specifies a database mode export.
schemas=schema_list Specifies a schema mode export where schema_list is a
comma-delimited list of schemas to export.
tables=table_list Specifies a table mode export where table_list is a
comma-delimited list of tables to export.
tablesspaces=tablespace_list Specifies a tablespace mode export where tablespace_
list is a comma-delimited list of tablespaces to export.
content=content_option Specifies whether data, metadata, or both are exported.
Valid values are: DATA_ONLY (data only), METADATA_ONLY
(metadata only), or the default ALL (both).
network_link=db_link Specifies that a remote database accessed via the database
link db_link should be used as the export source.
dumpfile=dir:file Specifies the dump file location and name. dir is a database
directory object. file is the filename. If the filename
includes a %U substitution variable, the database will substitute
a two-digit file sequence number starting with 00.
filesize=size_limit Specifies the maximum size of each dump file. Can be specified
in bytes, kilobytes, megabytes, or gigabytes. The
default is bytes.
logfile=dir:file Specifies the log file location and name. dir is a database
directory object and file is the filename.
directory=dir Specifies the file location to use for both the dump file and
log file. dir is a database directory object.
nologfile=y Specifies that no log file should be written.
job_name=identifier Specifies a name for the import job. This name is visible
from data dictionary views. The default is system generated.
parallel=degree Specifies the maximum number of active threads/processes
operating on behalf of the import. The default is 1.
parfile= dir:file Specifies the file location and name of the parameter file
that Data Pump import should use. dir is a database directory
object. file is the filename.