Jennifer Lin’s Weblog

October 30, 2008

Set Time and Date on Red Hat Enterprise Linux OS with CLI

Filed under: UNIX/LINUX — jennyca @ 3:44 pm

First lets look at the date. Issue:date at the CLI.

You should get a response like:
Fri Feb 15 11:36:02 CST 2008

If the time zone is off, type timeconfig and set it.

If the clock is off type: date -s 11:36:00
the -s means set then replace 11:36:00 with the respective time.

If the date is off, issue: date -s "02/15/2008" replacing the 02/15/2008 with the respective date.

Once you’ve changed everything to the way it needs to be, issue the command date again and verify.

http://blog.kameronkenny.com/?p=71

October 29, 2008

Red Hat Enterprise Linux version and Kernel version

Filed under: UNIX/LINUX — jennyca @ 7:23 pm

$  more /etc/redhat-release

Red Hat Enterprise Linux ES release 4 (Nahant)

Different releases:

workstation (WS), enterprise server (ES) and advanced server (AS)

CentOS, the free version derived from RHEL

As of 2005[update] Red Hat distributed four variants of Red Hat Enterprise Linux:

  • Red Hat Enterprise Linux AS for mission-critical/enterprise computer systems.
  • Red Hat Enterprise Linux ES for supported network servers
  • Red Hat Enterprise Linux WS for technical power-user desktops or high-performance computing
  • Red Hat Desktop – for multiple deployments of single-user desktops

In Red Hat Enterprise Linux 5 there are new editions that substitute former Red Hat Enterprise Linux AS/ES/WS/Desktop:

  • Red Hat Enterprise Linux Advanced Platform (former AS)
  • Red Hat Enterprise Linux (former ES) (limited up to 2 CPUs)
  • Red Hat Enterprise Linux Desktop with Workstation and Multi-OS option
  • Red Hat Enterprise Linux Desktop with Workstation option (former WS)
  • Red Hat Enterprise Linux Desktop with Multi-OS option
  • Red Hat Enterprise Linux Desktop (former Desktop)

Relationship to free or community distributions

  • Red Hat Linux 6.2 → Red Hat Linux 6.2E
  • Red Hat Linux 7.2 → Red Hat Enterprise Linux 2.1
  • Red Hat Linux 9 → Red Hat Enterprise Linux 3
  • Fedora Core 3 → Red Hat Enterprise Linux 4
  • Fedora Core 6 → Red Hat Enterprise Linux 5
  • Fedora 9 / Fedora 10 → Red Hat Enterprise Linux 6 (planned for release in the first quarter of 2010)

Version history

  • Red Hat Linux 6.2E (Zoot), 2000-03-27
  • Red Hat Enterprise Linux 2.1 AS (Pensacola), 26 March 2002
  • Red Hat Enterprise Linux 2.1 ES (Panama), May 2003
  • Red Hat Enterprise Linux 3 (Taroon), 2003-10-22, kernel 2.4.21-4
    • Update 1, 16 January 2004 (Release Notes) kernel 2.4.21-9
    • Update 2, 18 May 2004
    • Update 3, 3 September 2004
    • Update 4, 21 December 2004
    • Update 5, 20 May 2005, kernel 2.4.21-32
    • Update 6, 28 September 2005, kernel 2.4.21-35 (Release Notes)
    • Update 7, 15 March 2006
    • Update 8, 20 July 2006, kernel 2.4.21-47
    • Update 9, 15 June 2007, kernel 2.4.21-50
  • Red Hat Enterprise Linux 4 (Nahant), 2005-02-15, kernel 2.6.9-5
    • 4.1, also known as Update 1, 9 June 2005[8], kernel 2.6.9-11
    • 4.2, also known as Update 2, 5 October 2005 (Release Notes), kernel 2.6.9-22
    • 4.3, also known as Update 3, 7 March 2006 (Release Notes), kernel 2.6.9-34
    • 4.4, also known as Update 4, 11 August 2006 (Release Notes) kernel 2.6.9-42
    • 4.5, also known as Update 5, 1 May 2007 (Release Notes) kernel 2.6.9-55
    • 4.6, also known as Update 6, 15 November 2007 (Release Notes) kernel 2.6.9-67
    • 4.7, also known as Update 7, 24 July 2008 (Release Notes) kernel 2.6.9-78
  • Red Hat Enterprise Linux 5 (Tikanga), (Release notes) 2007-03-14, kernel 2.6.18-8

    http://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux

October 27, 2008

ORA-00439

Filed under: ORA Errors — jennyca @ 2:48 am

Starting Primary or Standby Database

Problem Description:
==================== 

When attempting to startup a primary or standby database you receive the
following error message:

  ORA-00439: feature not enabled: Managed Standby
      Cause: The specified feature is not enabled.
     Action: Do not attempt to use this feature.

Querying on V$OPTION shows the Managed Standby parameter has a value of false.

Solution Description:
=====================

The Managed Standby option, which allows a primary or standby database to run
in Managed Recovery Mode, is available only with the Enterprise Edition of
8.1.X. 

If this error occurs during startup nomount while using oracle 8i Standard
Edition then all the standby specific parameters must be removed from the
init.ora file such as: 

STANDBY_ARCHIVE_DEST
LOG_ARCHIVE_DEST_N

Explanation:
============

If you are using 8.1.x Standard Edition, then you are limited to maintaining
the standby database in Manual Recovery Mode.

"ORA-00439: feature not enabled: Managed Standby"

Solution

The version of Oracle shipped with Agile Anywhere and Product Collaboration is the “Standard Edition”, which does not include the “Managed Standby” feature.

1. To eliminate this error, edit the init.ora file to remove the following parameters:

log_archive_dest_1
log_archive_dest_2
log_archive_dest_3
log_archive_dest_4
log_archive_dest_5

2. Add “log_archive_dest” and optionally “log_archive_duplex_dest” in the init.ora file. These two parameters used in combination still allows duplex archived logs. For example:

log_archive_dest=d:\oracle\oradata\aa8i\archive
log_archive_duplix_dest=d:\oracle\oradata\aa8i\archive2

October 25, 2008

王永庆语录

Filed under: Life — jennyca @ 3:11 am

1.天下的事情,没有轻轻松松、舒舒服服让你能获得的,凡事一定要经过苦心追求、经验,才能真正明了其中的奥妙而有所收获。

2.追求舒适与快乐的代价,就是刻苦耐劳。

3.一根火柴不够一毛钱,一栋房子价值数百万,但一根火柴可以烧毁一栋房子。

4.要挖洞,就要挖大洞;要借钱,就要借大钱,不要到处借小钱。

5.我个人认为,我们输给人家的地方是生活以及工作的观念和态度。

October 22, 2008

Execute Immediate

Filed under: PL/SQL — jennyca @ 1:04 pm
execute immediate 'sql-statement';
execute immediate 'select-statement' into returned_1, returned_2..., returned_n;

execute immediate 'sql-statement' using [in|out|in out] bind_var_1, [in|out|in out] bind_var_2 ... [in|out|in out] bind_var_n;
execute immediate 'select-statement' into returned_1, returned_2..., returned_n  using [in|out|in out] bind_var_1, [in|out|in out] bind_var_2 ... [in|out|in out] bind_var_n;

execute immediate 'sql-statement' returning into var_1;

execute immediate 'sql-statement' bulk collect into index-by-var;

http://www.adp-gmbh.ch/ora/plsql/exec_immediate.html

October 21, 2008

Data Guard and Oracle Standard Edition

Filed under: Data Guard — jennyca @ 4:26 pm
Oracle Data Guard is available only as a feature of Oracle Database
Enterprise Edition. It is not available with Standard Edition.

The following limitations exist using standby databases under Standard
Edition:

1. Remote archival can not be configured.   Setting the parameter
   LOG_ARCHIVE_DEST_n to any value will fail.

   SQL> alter system set log_archive_dest_1='SERVICE=stby';
   *
   ERROR at line 1:
   ORA-00439: Feature not enabled: Managed standby

   Note: LOG_ARCHIVE_DEST can be used for local only archival.

2. While you can specify the MANAGED keyword when starting standby
   recovery:

   SQL> recover managed standby database disconnect;

   The managed recovery process (MRP) will not progress once started.
   It relies on the standby controlfile being updated with the latest
   available archive log during remote archival from the primary.
   The archives can be brought over manually and registered into the
   controlfile but the register attempt will fail instead with the
   following errors:

   SQL> alter database register logfile '/stby_arch/arc0055.dbf';
   *
   ERROR at line 1:
   ORA-00439: Feature not enabled: Managed Standby

   Manual recovery with 'RECOVER STANDBY DATABASE' SQL will work. The
   archive log location will be determined based on the setting of the
   LOG_ARCHIVE_FORMAT and LOG_ARCHIVE_DEST parameters on the standby
   instance.

3. Switchover will not be possible.

4. Failover must be done with 'ALTER DATABASE ACTIVATE STANDBY DATABASE'
   SQL.

5. The only standby type possible is a physical standby, not logical.

6. The standby environment cannot be managed using the Data Guard Broker
   or it's interfaces, DGMGRL and the Data Guard GUI from Grid Control.

Overall it is possible to create and maintain a physical standby with
Standard Edition releases.  However it is left up to the user to handle
the archive log transfer to the standby site and the apply of the logs
using basic 'RECOVER STANDBY DATABASE' SQL syntax.   Data loss is not
guaranteed and behaviors such as rolling upgrades can not be used.

October 20, 2008

Oracle NUMBER

Filed under: Data types — jennyca @ 10:51 pm

NUMBER Datatype

The NUMBER datatype stores fixed and floating-point numbers. Numbers of virtually any magnitude can be stored and are guaranteed portable among different systems operating Oracle Database, up to 38 digits of precision.

The following numbers can be stored in a NUMBER column:

  • Positive numbers in the range 1 x 10-130 to 9.99…9 x 10125 with up to 38 significant digits
  • Negative numbers from -1 x 10-130 to 9.99…99 x 10125 with up to 38 significant digits
  • Zero
  • Positive and negative infinity (generated only by importing from an Oracle Database, Version 5)

For numeric columns, you can specify the column as:

column_name NUMBER

Optionally, you can also specify a precision (total number of digits) and scale (number of digits to the right of the decimal point):

column_name NUMBER (precision, scale)

If a precision is not specified, the column stores values as given. If no scale is specified, the scale is zero.

Oracle guarantees portability of numbers with a precision equal to or less than 38 digits. You can specify a scale and no precision:

column_name NUMBER (*, scale)

In this case, the precision is 38, and the specified scale is maintained.

When you specify numeric fields, it is a good idea to specify the precision and scale. This provides extra integrity checking on input.

If you specify a negative scale, Oracle Database rounds the actual data to the specified number of places to the left of the decimal point. For example, specifying (7,-2) means Oracle Database rounds to the nearest hundredths, as shown in Table 26-1.

Table 26-1 How Scale Factors Affect Numeric Data Storage

Input Data Specified As Stored As
7,456,123.89 NUMBER 7456123.89
7,456,123.89 NUMBER(*,1) 7456123.9
7,456,123.89 NUMBER(9) 7456124
7,456,123.89 NUMBER(9,2) 7456123.89
7,456,123.89 NUMBER(9,1) 7456123.9
7,456,123.89 NUMBER(6) (not accepted, exceeds precision)
7,456,123.89 NUMBER(7,-2) 7456100

http://download.oracle.com/docs/cd/B28359_01/server.111/b28318/datatype.htm#i16209

October 19, 2008

Environment variable setup for runInstaller (GUI)

Filed under: RAC — jennyca @ 2:22 pm

As root

# startx

# xhost +localhost

# su – oracle

$ export DISPLAY=:0

$/u01/app/oracle/database/runInstaller

Blog at WordPress.com.