Monday, April 16, 2007

Oracle9i DBA -- Database: Fundamentals I (7)

Maintaining Redo Log Files

##CONTINUE##

  • The minimum size of a online redo log file is 50 KB. The maximum size is specific to the OS.
  • Redo log files are used only for recovery. Rollback segments provide the database with a read consistency method.
  • Archiving can be accomplished automatically by ARCn and manually through SQL statements. They can be multiplexed.
  • FAST_START_MTTR_TARGET parameter 700 : Recovery from an instance failure will not take more than 700 seconds. The number of buffers being written by DBWn is determined by the FAST_START_MTTR_TARGET parameter, if specified.
  • Archived Redo Log files can be accomplished automatically by ARCn and the maximum number of ARCn processes in an instance is 10
  • If the ARCn cannot write to the archive destination, oracle will write a message to the alert file and all database operations are stopped. Operations are resumed after a successful writing operation on the archived log file.
  • V$LOGFILE the value of the STATUS column could be one of the following:

    O INVALID indicates that the file is inaccessible.

    O STALE indicates that contents of the file are incomplete.

    O DELETED indicates that the file is no longer used.

    O Blank indicates that the file is in use.

  • Automatic archiving can be set by the parameter LOG_ARCHIVE_START = TRUE which is available in V$PARAMTER c is used to automate ARCn process only when the database is already in the ARCHIVELOG mode.
  • The ALTER DATABASE ARCHIVELOG is used when database is in mount stage.
  • %S specifies the log sequence number with leading zero filled. Eg: arch_%s -> arch_0000001
  • The CKPT writes checkpoint information in control files and data file headers.
  • The ARCHIVELOG mode does not start the ARChiver process, rather it states that the database may use archive logs. Hence it ensures that the complete recovery is possible even if the redo logs are overwritten through a log switch.
  • LOG_CHECKPOINT_TO_TRACE = true means that the information about the log switches will be stored in alert_sid.ora file.

  • When the oracle server starts, it assigns the same sequence number to a group, that may contain multiple members and all of them have the same sequence number.

Oracle9i DBA -- Database: Fundamentals I (6)

Maintaining the Control File

##CONTINUE##

  • Multiplexing the control file using spfile step

1. Alter the spfile

2. Showdown normal

3. Create additional control files

4. Start the database

  • Multiplexing the Control File Using init.ora(pfile)

1. Shutdown normal

2. create additional control files

3. Add the new control file name to init.ora

4. Start the database

  • V$PARAMETER lists the status and location of all parameters (eg. Control files names)

V$CONTROLFILE_RECORD_SECTION provides information about control file record sections.

V$CONTROLFILE provides information about the name and status of all control files.

SHOW PARAMETER CONTROLFILES

  • The database has to be in the NOMOUNT state to create the control file.
  • The recommended way is to have 3 control file copies on separate disks to provide fault tolerance. The maximum level of multiplexing control files is 8 , minimum is 2. But in OMF only up to 5
  • The Redo Log files and Control files creation share the common parameter DB_CREATE_ONLINE_LOG_DEST_n parameter through OMF, while datafiles use DB_CREATE_FILE_DEST.
  • DB_CREATE_FILE_DEST sets the default location for datafile, control file, and online log creation.
  • When available control file is failed, Recover the database using SQL>STARTUP RECOVER or RMAN>RECOVERY DATABASE

Oracle9i DBA -- Database: Fundamentals I (5)

Data Dictionary Content and Usage

##CONTINUE##

  • The DICTIONARY view can also be queried by using its synonym DICT. And also static view.
  • Data Dictionary Views
    1. DBA_ : show what is in all schemas.
    2. USER_ : show what is in the user’s schema
    3. ALL_ : show what the user can access
  • User SYS is the owner of the dynamic performance tables. User SYSTEM is the owner of additional tables and views.
  • To get an overview of the columns in the data dictionary and dynamic performance views, the DICT_COLUMNS view can be queried. To get an overview of the data dictionary and dynamic performance views, the DICTIONARY view or its synonym DICT can be queried.
  • Information about tables can be obtained by querying the data dictionary. 1. DBA_TABLES 2.DBA_OBJECTS
  • Scripts starting with :
    1. cat*.sql are used to create data dictionary views.
    2. Dbms*.sql are used for database package specification
    3. Utl*.sql are used to create additional views and tables.
    4. Prvt*plb are used to creating database package code.
  • Base table are created using sql.bsq script and is automatically run at the time of database creation. The data dictionary views are created using the catalog.sql script.
  • The control files contains such information as location of datafiles, redo log files, dynamic performance view, etc.
  • Dynamic performance views obtain availability of an object, information about locks, active state of a session
  • The V$PWFILE_USERS view can be used to gather information on all users with SYSDBA or SYSOPER privileges.
  • V$LOG status field shows CLEARING when an ALTER DATABASE CLEAR LOGFILE command is issued. CLEARING_CURRENT means the current logfile is being cleared of a closed thread.
  • LOG_CHECKPOINT_INTERVAL specifies the number of redo blocks after which the checkpoint will be caused
  • LOG_CHECKPOINT_TIMEOUT indicates the seconds to resist before causing a checkpoint.
  • FAST_START_IO_TARGET indicates the target IO manipulation.
  • The AUD$ is a base table. Base tables end up with a $ mark and are created at the time of db create.
  • The USER_SOURCE data dictionary view contains the actual program text used to write a stored procedure.
  • The data dictionary provides information about: Logical and physical database structure, Definitions and space allocations of objects, Integrity constraints, Users, Roles, Privileges, Auditing.

Oracle9i DBA -- Database: Fundamentals I (4)

Creating a Database

##CONTINUE##

  • Redo Log Buffers, Tablespaces, Datafiles can be viewed details of the database defined by a template.
  • REMOTE_LOGIN_PASSWORD

    1. None : remote login is not enabled

    2. Exclusive : remote login accessibility is exclusive

    3. Shared : remote login accessibility is shared

  • The maximum log file groups is specified in the MAXLOGFILES
  • The ORAPWD utility is used to create the password file.
  • Oracle Database Configuration Assistant is used for creation of the database. Oracle Enterprise Manager provides various administering tools. Oracle Database Migration Assistant is used to migrate from an earlier version of the database.
  • The various ways of creating a database are by using ORACLE Universal Installer, ODCA and the create database command.
  • These environment variable is needed to be set while creating a database. ORACLE_HOME, ORACLE_SID, LD_LIBRARY_PATH, PATH, ORACLE_BASE, ORA_NLS33
  • In OMF %g -> Log Group names for Redo logs

    %t -> the tablespace name in data file name

    %u -> eight-character string that guardantees uniqueness

  • Create a database the instance must be started in the nomount mode.
  • Consider the characteristics of the data to be stored before determining the structure appropriate for your database, in order to:
    1. Minimize fragmentation
    2. Minimize disk contention
    3. Separate objects


Oracle9i DBA -- Database: Fundamentals I (3)

Managing an Oracle Instance

##CONTINUE##

  • IFILE can additional files be added to the PFILE.
  • STARTUP and SHUTDOWN of database are the option available to SYSDBA and SYSOPER.
  • IFILE is a handy way to modularize and version the parameter files, but there is a limit of specifying only three nesting levels. If exceeded Oracle will generate an error.
  • DB_NAME is a database identifier of eight characters or less.
  • V$SESSION obtained the information about SID and the Serial#
  • The alert_SID.log location is defined by the BACKGROUND_DUMP_DEST initialization parameter. The default location on Unix is $ORACLE_HOME/rdbms/log.
  • In the read-only mode DB recovery can take place.
  • PROCESS initialization parameter: It determines the maximum no of OS processes that can connect to the instance.It determines the value for the number of background processes.
  • For maximum compatibility the UNDO_MANAGEMENT INITIALIZATION parameter of Oracle 9i Database should to be set to manual.
  • LICENCE_MAX_SESSIONS is used to define the number of concurrent sessions that are allowed to connect to the 9i DBA.
  • USER_DUMP_DEST directory has the trace files generated by user sessions, specifies location for user process errors.User trace file size is determined by MAX_DUMP_FILE_SIZE, default is 10MB. CORE_DUMP_DEST is used on unix platforms to save the core dump files. BACKGROUND_DUMP_DEST is used to set the directory path where the alert log file is written. Log background process errors.
  • Instance failure is automatically fixed by SMON process, when the instance is restarted by using STARTUP OPEN command on the SQL or the Server Manager.
  • SPFILE doesn’t contain statements that are only comment lines, while PFILE may have complete comments.
  • MOUNT is the level where Control file is read, Data files are read at OPEN level.
  • The initialization parameter is in ORACLE_HOME\dbs
  • STARTUP FORCE will always abort a running instance before performing a normal startup. Can be used to reconnect to an already connected and running instance, and requires instance recovery.

BEA WebLogic 8.1 Certified Administrator (3)

Manage Quality of Service

##CONTINUE##

  • Http session state clustering and object clustering are the two primary cluster services that Weblogic server provides.
  • Data Source objects can be defined with or without JTA, which provides support for distributed TX.

Troubleshoot and Diagnose Error Conditions

  • To test two-tier and three-tier JDBC database connections after installing weblogic Server use the utils.dbping utility.
  • A cluster is part of a particular WLS domain. You can’t split cluster in multiple domains.

Other

  • Before Completion Interation Limit is a TX setting which gives the number of beforeCompleption callbacks that are processed before the system forces a rollback.
  • Forget Heuristic is a Boolean value specifying whether the transaction manager should instruct a resource to forget any TX with a euristic outcome.
  • A connection object represents an open communication channel between an application and the messaging system. Connection objects are used to create a session for producing and consuming messages. A connectionFactory object encapsulates connection information and enables JMS applications to create a connection. The session object, defines the serial order for the messages produced and consumed. By default a connection is created in stopped mode.
  • You can create destination keys to define the sort order for messages arriving on a specific JMS destination (queue or topic).

    1. name of the destination key

    2. message sort key name or the name of a message header field on which to sort. Message header field keys start with the letters JMS and ignore the key type setting. (For better performance, use message header fields as sorting keys, rather than message properties.)

    3. The expected property type for the sort key. (This setting is ignored for message header field keys, which have an implied type.)

    4. The direction in which the key will sort messages (ascending or descending).

  • WLS model of centralizing management responsibilities on the Administration Server, Administration Server hosts Configuration Mbeans for all managed resources on all server istances in the domain.
  • WLS Mbeans that expose attributes and operations for configuration a managed resource are called Configuration Mbeans while Mbeans that provide information about the runtime state of a managed resource are called Runtime Mbeans.
  • JDBC Multipools provide backup pools and load balancing to enhance database connectivity. Multipools don not apply to multiple-server configurations, so they are not supported in distributed TX. Multipools allow a configurable algorithm for choosing a connection pool from its list of pools. The connection pools whin a Multipools may be associated with different DBMS.
  • All WLS resources are managed through this JMX based service.
  • The EJB container blocks the concurrent method call and allows it to proceed when the perious call has completed if the value of allow-concurrent-calls is true. The concurrency-strategy element determines ejbLoad and ejbStore behavior for entity EJB instances.
  • Check testConnsOnReserve , and testConnsOnRelease

BEA WebLogic 8.1 Certified Administrator (2)

Manage Deployed Applications

##CONTINUE##
  • The getRequestDispatcher() method returns a RequestDispatcher object that acts as a wrapper for the resource located at the given path. A RequestDispatcher object can be used to forward a request to the resource or to include the resource in a response. The resource can be dynamic or static

Public RequestDispatcher getRequestDispatcher(String path)

Return null if the servletContext cannot return a requestDispatcher.

  • Javax.transaction.UserTransaction provides an interface to the transaction manager that allows the application developer to manage the scope of a transaction explicitly. The client application uses JNDI to obtain an object reference to the UserTransaction object for the Weblogic Server domain.

Client:

UserTransaction ut = (UserTransaction) jndicontext.lookup(“javax.transaction.UserTransaction”)

Bean:

UserTransaction ut = ejbContext.getUserTransaction()

  • The default Transaction level for EJB’s in Weblogic is Supports
  • JSP tag libraries are copied into the WEB-INF directory
  • WLS allows TX to be terminated only by the client that created the TX. WLS implements the flat TX model; nested TX are not supported. WLS supports multithreaded TX clients; clients can make TX requests concurrently in multiple threads. In WLS a client or a server object cannot invoke methods on an object that is infected with another TX. In WLS, client cannot using third-party implementations of the JAVA TX API.

BEA WebLogic 8.1 Certified Administrator (1)

Environment Preparation and WebLogic Installation

  • WLS webservices support A Stateless Session Bean, JMS Message Consumer and JMS Message Producer, Web service operations implemented with Java classes.
##CONTINUE##
  • Memory Usage, throughput(and queue) and Locked-out users can be monitored in the console.
  • Weblogic.Admin

    LIST : list the bindings of a node in the JNDI naming tree

    CONNECT :

    GETSTAT : return current state of a server.

    PING:

  • Use JPDA to perform remote debugging or use the logging services in weblogic.
  • When updating two tables in different databases and when updating a table in a database and writing a message to a JMS Queue do required the use of two-phase commit.


BEA WebLogic 8.1 Certified Administrator Preparation Note

BEA WebLogic 8.1 Certified Administrator :

This exam is not easy and has little of materials. However, you can read all the BEA materials from the BEA web site. But I think that is too much to read.

In order to pass this exam, I attented the Administrator of BEA WebLogic Server 8.1 workshop.
That is the only material I read to pass the exam.

Following posts are the preparation note I noted when I studied for this exam,

Hope it helps ~

Sunday, April 15, 2007

教老爸老媽使用 Gmail

Gmail 網址 : http://gmail.com

##CONTINUE##

出現 gmail 首頁


在帳號的地方輸入帳號與密碼



進到主畫面, 就可開始收信與撰寫信件





基本上應該這樣就可以了, 如要了解更多功能, 有找到一各網站
加減看 , 請點這裡 .