Pages

Showing posts with label Administration. Show all posts
Showing posts with label Administration. Show all posts

Monday, February 17, 2020

enq: HW - contention and Secure file LOB


In one of our 11204 database, we encountered the deadly ‘Enq: HW contention’ on critical business day. The majority of the DB activity is insert and the table has CLOBs. The CLOBs were traditional BASIC LOB, With the below note able to identify the LOB segment on which the contention is.

Analyzing 'enq: HW - contention' Wait Event (Doc ID 740075.1)

Manual extent allocation or event 44951 didn’t help much, so finally decided to migrate the CLOBs to SECURE FILES. Due to the segment size is in 7+ Terabyte considering the time /storage we decided to create new table and let the logs write there. This may not be feasible to many of your environment. This particular table is monthly RANGE partitioned to truncate the older partition every 2 months. Now it is created with hash sub partition to distribute the inserts and reduce concurrency.

I could not locate appropriate DDL for the RANGE-HASH composite partition, so the below test case developed. Currently the new table is with secure file LOBs and hash sub partitioned. The performance is great with the same amount of load.

Note from 12c the default LOB is Secure file LOB.

TEST CASE
CREATE TABLE hash_test
  ( prod_id       NUMBER(6)
  , cust_id       NUMBER
  , time_id       DATE
    )
PARTITION BY RANGE (time_id) INTERVAL (NUMTOYMINTERVAL(1,'MONTH')) SUBPARTITION BY HASH (cust_id)
  SUBPARTITIONS 4 STORE IN (USERS)
(PARTITION "P0"  VALUES LESS THAN (TO_DATE(' 2018-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')));

set long 99999 lines 200 pages 9999
col DDL for a200
select dbms_metadata.get_ddl('TABLE','HASH_TEST','SYS') DDL from dual;

insert into hash_test values(10023,101,sysdate);
 insert into hash_test values(10024,104,sysdate);
 insert into hash_test values(10025,107,sysdate);
 insert into hash_test values(10026,110,sysdate);
 insert into hash_test values(10027,113,sysdate);
 insert into hash_test values(10028,116,sysdate);
 insert into hash_test values(10029,119,sysdate+30);
 insert into hash_test values(10030,122,sysdate+30);
 insert into hash_test values(10031,125,sysdate+30);
 insert into hash_test values(10032,128,sysdate+30);
 insert into hash_test values(10033,131,sysdate+30);
 insert into hash_test values(10034,134,sysdate+30);
 insert into hash_test values(10035,137,sysdate+30);
 insert into hash_test values(10036,140,sysdate+60);
 insert into hash_test values(10037,143,sysdate+60);
 insert into hash_test values(10038,146,sysdate+60);
 insert into hash_test values(10039,149,sysdate+60);
 insert into hash_test values(10040,152,sysdate+60);
 insert into hash_test values(10041,155,sysdate+60);
 insert into hash_test values(10042,158,sysdate+60);
 insert into hash_test values(10043,161,sysdate+60);

 SQL> select count(*) from hash_test subpartition        (SYS_SUBP19335);

  COUNT(*)
----------
         1

SQL> select count(*) from hash_test subpartition        (SYS_SUBP19336);

  COUNT(*)
----------
         1

SQL> select count(*) from hash_test subpartition        (SYS_SUBP19337);

  COUNT(*)
----------
         5

SQL> select count(*) from hash_test subpartition        (SYS_SUBP19338);

  COUNT(*)
----------
         0

SQL> select count(*) from hash_test partition (SYS_P19339);

  COUNT(*)
----------
         7

exec DBMS_STATS.GATHER_TABLE_STATS (ownname => 'SYS' ,tabname => 'HASH_TEST',cascade => true, estimate_percent => dbms_stats.auto_sample_size,method_opt=>'for all indexed columns size AUTO', granularity => 'ALL', degree => 8);
                       
alter table hash_test truncate partition SYS_P19339;

CREATE INDEX prod_id_ix ON hash_test(prod_id) LOCAL;

Subpartition    Partition           Tablespace     Last Analyzed High Value      High Value Length      Num Rows   B-Level            Distinct Keys
                        Name  Name
SYS_SUBP19326      P0                                USERS           09-Feb-20 10:57:26 AM                      0          0            0          0
SYS_SUBP19327      P0                                USERS           09-Feb-20 10:57:26 AM                      0          0            0          0
SYS_SUBP19328      P0                                USERS           09-Feb-20 10:57:26 AM                      0          0            0          0
SYS_SUBP19329      P0                                USERS           09-Feb-20 10:57:26 AM                      0          0            0          0
SYS_SUBP19330      SYS_P19390  SYSTEM         09-Feb-20 10:57:26 AM                      0          0          0            0
SYS_SUBP19331      SYS_P19390  SYSTEM         09-Feb-20 10:57:26 AM                      0          0          0            0
SYS_SUBP19332      SYS_P19390  SYSTEM         09-Feb-20 10:57:26 AM                      0          0          0            0
SYS_SUBP19333      SYS_P19390  SYSTEM         09-Feb-20 10:57:26 AM                      0          0          0            0
SYS_SUBP19335      SYS_P19391  SYSTEM         09-Feb-20 10:57:26 AM                      0          0          0            0
SYS_SUBP19336      SYS_P19391  SYSTEM         09-Feb-20 10:57:26 AM                      0          0          0            0
SYS_SUBP19337      SYS_P19391  SYSTEM         09-Feb-20 10:57:26 AM                      0          0          0            0
SYS_SUBP19338      SYS_P19391  SYSTEM         09-Feb-20 10:57:26 AM                      0          0          0            0
SYS_SUBP19340      SYS_P19392  SYSTEM         09-Feb-20 10:57:26 AM                      0          0          0            0
SYS_SUBP19341      SYS_P19392  SYSTEM         09-Feb-20 10:57:26 AM                      0          0          0            0
SYS_SUBP19342      SYS_P19392  SYSTEM         09-Feb-20 10:57:26 AM                      0          0          0            0
SYS_SUBP19343      SYS_P19392  SYSTEM         09-Feb-20 10:57:26 AM                      0          0          0            0


 DATA Generator.
DECLARE
  t_seed NUMBER(20);
BEGIN
  -- Initialize Random Number Generator
  SELECT TO_NUMBER(TO_CHAR(SYSDATE, 'MMDDHH24MISS'))
    INTO t_seed
  FROM Dual;

  DBMS_RANDOM.INITIALIZE(t_seed);

  -- Generate Random Data
  FOR t_counter IN 1..1000 LOOP
    INSERT INTO aolmob.HASH_TEST (
      PROD_ID, CUST_ID, TIME_ID
    ) VALUES (
     DBMS_RANDOM.VALUE(0.00, 999999.00), DBMS_RANDOM.VALUE(0.00, 2147483647.00), TO_DATE(TRUNC(DBMS_RANDOM.VALUE(2415020, 2488068)), 'J')
    );
  END LOOP;

  DBMS_RANDOM.TERMINATE;
END;
/

Please leave your valuable comments to improve the blog and let me know if any specific topic to be explained.

Sunday, June 7, 2015

New table name in DDL using DBMS_METADATA

If you want to get a DDL with the desired name for a table this is function will be used.

Step 1:


Replace YOUR SCHEMA name in line # 13 in below block i.e., from 'A' to 'SCHEMA name'

  1  create or replace function remap_name(orig_name varchar2, new_name varchar2 )
  2  return clob is
  3    -- Define local variables.
  4    h   number; --handle returned by OPEN
  5    th  number; -- handle returned by ADD_TRANSFORM
  6    doc clob;
  7  begin
  8    -- Specify the object type.
  9    h := dbms_metadata.open('TABLE');
 10    -- Use filters to specify the particular object desired.
 11    dbms_metadata.set_filter(h
 12                            ,'SCHEMA'
 13                            ,'A');
 14    dbms_metadata.set_filter(h
 15                            ,'NAME'
 16                            ,orig_name);
 17    -- Request that the schema name be modified.
 18    th := dbms_metadata.add_transform(h
 19                                     ,'MODIFY');
 20    dbms_metadata.set_remap_param(th
 21                                 ,'REMAP_NAME'
 22                                 ,orig_name
 23                                 ,new_name);
 24    -- Request that the metadata be transformed into creation DDL.
 25    th := dbms_metadata.add_transform(h
 26                                     ,'DDL');
 27    -- Specify that segment attributes are not to be returned.
 28    dbms_metadata.set_transform_param(th
 29                                     ,'SEGMENT_ATTRIBUTES'
 30                                     ,false);
 31    dbms_metadata.set_transform_param(th,'SQLTERMINATOR',TRUE);
 32    -- Fetch the object.
 33    doc := dbms_metadata.fetch_clob(h);
 34    -- Release resources.
 35    dbms_metadata.close(h);
 36    return doc;
 37  end remap_name;
 38  /

PLEASE REMOVE LINE NUMBERS BEFORE EXECUTION

Step 2. Call the remape_name and spool it


set echo off head off feed off
spool renameDDL.sql
SELECT 'SELECT remap_name('''||  TABLE_NAME || ''','''||  TABLE_NAME || '_new'') FROM DUAL;' FROM DBA_TABLES where owner='A';
spool off

Step 3. Review the above script and execute accordingly


Example:

sys@TESTDB> SELECT remap_name('TEST_OBJ','TEST_OBJ_new') FROM DUAL;

REMAP_NAME('TEST_OBJ','TEST_OBJ_NEW')
-------------------------------------------------

  CREATE TABLE "A"."TEST_OBJ_new"
   (    "OWNER" VARCHAR2(30),
        "OBJECT_NAME" VARCHAR2(128),

Note: 

REMAP_NAME is not available in 10g , available from 11g

NO REMAP_NAME ins 10g
http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_metada.htm#BGBBIEGA

REMAP_NAME is available in SET_REMAP_PARAM 11g only
http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_metada.htm#BGBBIEGA 

You will get the below error in 10g but function will be created 
ORA-31600: invalid input value REMAP_NAME for parameter NAME in function SET_REMAP_PARAM

Tuesday, July 22, 2014

IP address for sysdba connections

UTL_INADDR package provides a PL/SQL procedures to support internet addressing. It provides an API to retrieve host names and IP addresses of local and remote hosts.

Tested for my local sys connection

SQL> conn / as sysdba
Connected.
SQL> SELECT UTL_INADDR.get_host_address from dual;

GET_HOST_ADDRESS
--------------------------------------------------------------------------------
10.177.62.194

Reference:
http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/u_inaddr.htm#ARPLS071

Monday, May 5, 2014

Database auto start Windows

Mandatory configurations to check DB auto start is working.

start -> All programs -> Oracle-Homexx -> Configuration and Migration tools -> Administration assistanct for windows-> Oracle managed objects / computers/hostname/OH/databases/ right click on DB/ 'startup/shutdown options' check both the TAb

run -> regedit -> HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\KEY_OraDb11g_home1

Run -> services.msc -> Properties of DB service

ORACLE_HOME/database/oradim

server startup time: and DB startup time

systeminfo | find "Up Time"  (or) net statistics workstation | find "Statistics since"
net statistics server


select to_char(startup_time,'HH24:MI:SS DD-MON-YYYY') DB_started from v$instance;

Monday, December 30, 2013

What happens when DATAFILE RESIZE?

There is a need to understand what will be the impact when resizing some 8000 plus datafiles consecutively.  After some search did some test like enabled 10046 trace and captured what will happen when there is a datafile resize.

Used tkprof to format and provided the output to customer explaining the behavior.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show user
USER is "SYS"
SQL> oradebug setmypid
Statement processed.
SQL> alter session set tracefile_identifier='mytrace_10046';

Session altered.

SQL> alter session set events '10046 trace name context forever, level 12';

Session altered.

SQL> alter database datafile 'D:\ORACLE_DB\TESTDB\TESTDB\TESTDRP1.DBF' resize 150m;

Database altered.

SQL> ALTER SESSION SET EVENTS='10046 trace name context off';

Session altered.

SQL> oradebug tracefile_name
D:\ORACLE_DB\diag\rdbms\testdb\testdb\trace\testdb_ora_556_mytrace_10046.trc
SQL>

TKPROF Output.

alter database datafile 'D:\ORACLE_DB\TESTDB\TESTDB\TESTDRP1.DBF' resize 150m

call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.02          0          0          0           0
Execute      1      0.01       1.96          0          0          3           0
Fetch        0      0.00       0.00          0          0          0           0
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total        2      0.01       1.99          0          0          3           0

Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS

Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  control file sequential read                   31        0.03          0.10
  db file sequential read                         2        0.02          0.04
  Disk file operations I/O                        3        0.01          0.04
  Data file init write                            1        0.00          0.00
  db file single write                            1        0.00          0.00
  control file parallel write                     3        0.00          0.00
  rdbms ipc reply                                 1        0.21          0.21
  log file sync                                   1        0.00          0.00
  SQL*Net message to client                       1        0.00          0.00
  SQL*Net message from client                     1       10.41         10.41

********************************************************************************

Recommendation given ,
-- See the above test, when there is a resize it will go through all this events
-- This test is done on my local machine where there is a very minimal load.
-- As it took 1.99s for a single file there will be more time considering your server.
-- Considering other factors like OS/ storage performance, it will take more time
-- Do it in a small batches and in a sequential manner. So that it will not harm database performance. 
-- Also it is best to test a small batch to estimate run  time in non business hours and proceed with the activity.

Thanks for reading, post your suggestions / comments on this. Happy reading.


how to filter records with symbol ~ (tilt)

There is one requirement for customer to select rows which has tilt at the beginning and at the end. After some searching found REGEXP_LIKE New Operator in 10G. Did some test case and seems so simple. Thought to post as I didn't get much detailed info on google.

Rows begins with ~
18:06:37 SQL> select * from test where REGEXP_LIKE (ID,'^~');

ID
--------------------
~test
~1~
~11~
~12~
~32~

Rows begin with ~ and number and ~
18:09:55 SQL> select * from test where REGEXP_LIKE (ID,'^~[0-9]~$');

ID
--------------------
~1~

Rows begin with ~ and any no. of digits and ends with ~
18:11:06 SQL> select * from test where REGEXP_LIKE (ID,'^~[0-9]*~$');

ID
--------------------
~1~
~11~
~12~
~32~

{m} Matches exactly m times
Bracket expression for specifying a matching list that should match any one of the expressions represented in the list. A nonmatching list expression begins with a circumflex (^) and specifies a list that matches any character except for the expressions represented in the list.
^-- beginning of line
$ End of line.

Rows begin with ~ and then 2 numbers and ends with ~
18:11:42 SQL> select * from test where REGEXP_LIKE (ID,'^~[0-9]{2}~$');

ID
--------------------
~11~
~12~
~32~

Thanks for reading, Please comment on post. Happy reading.


Reference:

REGEXP_LIKE New Operator in 10G (Doc ID 255953.1)
http://docs.oracle.com/cd/B19306_01/server.102/b14200/conditions007.htm
http://docs.oracle.com/cd/B19306_01/server.102/b14200/ap_posix001.htm#i690819
http://docs.oracle.com/cd/B19306_01/server.102/b14200/ap_posix002.htm#i690823

Monday, August 26, 2013

Orakill similar to kill -9


C:\Users\mmeerha>orakill

Usage:  orakill sid thread

  where sid    = the Oracle instance to target  --- > (sid is not session id it is instance name)
        thread = the thread id of the thread to kill

  The thread id should be retrieved from the spid column of a query such as:

        select spid, osuser, s.program from
        v$process p, v$session s where p.addr=s.paddr

C:\Users\mmeerha>orakill 5 8824

Could not attach to Oracle instance 5: err = 203

C:\Users\mmeerha>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 26 00:29:55 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select     s.username
  2  ,  s.sid
  3  ,  s.serial#
  4  ,  p.spid
  5  ,  last_call_et
  6  ,  status,to_char(logon_time, 'hh24:mi dd/mm/yy') login_time
  7  from       V$SESSION s
  8  ,  V$PROCESS p
  9  where      s.PADDR = p.ADDR
 10  and        s.sid=5
 11  /

USERNAME                              SID    SERIAL# SPID
------------------------------ ---------- ---------- ------------------------
LAST_CALL_ET STATUS   LOGIN_TIME
------------ -------- --------------
A                                       5          5 8824
        4549 ACTIVE   22:56 25/08/13


SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

C:\Users\mmeerha>orakill testdb 8824

Kill of thread id 8824 in instance testdb successfully signalled.

Thursday, May 9, 2013


How to find a column has space:

There may be several other ways to find space in a column, this is another simple way

SQL> sho user
USER is "SYS"
SQL> conn a/a
Connected.
SQL> create table space (space varchar2(10));

Table created.

SQL> insert into space values ('test1');

1 row created.

SQL> insert into space values ('test2 ');

1 row created.

SQL> insert into space values ('test3  ');

1 row created.

SQL> insert into space values ('test4   ');

1 row created.

SQL> insert into space values ('test5    ');

1 row created.

SQL> commit;

Commit complete.

SQL> select * from space;

SPACE
----------
test1
test2
test3
test4
test5

SQL> select length(space) from space;

LENGTH(SPACE)
-------------
            5
            6
            7
            8
            9

SQL> select space|| ';' from space;

SPACE||';'
-----------
test1;
test2 ;
test3  ;
test4   ;
test5    ;

SQL> select length(space) "length",space|| ';' value from space;

    length VALUE
---------- -----------
         5 test1;
         6 test2 ;
         7 test3  ;
         8 test4   ;
         9 test5    ;

Friday, November 9, 2012

Find whether stale statistics

Column STALE_STATS from *_tab_statistics. click here for description

SQL> select table_name,object_type,num_rows,last_analyzed,stale_stats from user_tab_statistics;

TABLE_NAME                     OBJECT_TYPE    NUM_ROWS LAST_ANAL STA
------------------------------ ------------ ---------- --------- ---
ADDRESS                        TABLE                 0 08-NOV-12 NO
GANIBHAI                       TABLE                10 08-NOV-12 NO
T1                             TABLE             10000 23-JUN-12 NO
T1_BACKUP                      TABLE             20700 27-JUN-12 NO
T2                             TABLE               999 23-JUN-12 NO
TEST                           TABLE               298 14-SEP-12 NO

Friday, September 21, 2012



ORA-01940: cannot drop a user that is currently connected 



There may be situations we need to drop schemas on request. What if, we try to drop and user sessions connecting continuously from application end. Though we kill session connection establishes again. We have one option, first is to LOCK the user account (This tip given by my friend Mohammed Gani sait) simple but will not strike when we are trying urgently

Just to stimulate the error the following illustration



SQL> create user drop_user identified by drop123
  2  default tablespace users
  3  ;

User created.

SQL> grant create session to drop_user;

Grant succeeded.

--established few connections--

SQL> select username,osuser,sid,serial#,process from v$session where username='DROP_USER';

USERNAME                       OSUSER                                SID    SERIAL# PROCESS
------------------------------ ------------------------------ ---------- ---------- ----------------
DROP_USER                      ASIAPACIFIC\athil                       8         21 9120:7896
DROP_USER                      ASIAPACIFIC\athil                      53         21 7488:8436
DROP_USER                      ASIAPACIFIC\athil                      93         23 6128:2724
DROP_USER                      ASIAPACIFIC\athil                      95         15 9116:1436


SQL> drop user drop_user;
drop user drop_user
*
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected
                         

--Dynamic query for killing sessions --
SQL> select 'alter system kill session '''||sid||','||serial#||''' immediate;' "Kill string" FROM v$session where username='DROP_USER';

Kill string                                                                    
--------------------------------------------------------------------------------
alter system kill session '15,9' immediate;                                    
alter system kill session '50,13' immediate;                                  
alter system kill session '53,3' immediate;                                    
alter system kill session '98,21' immediate;                                  

SQL> alter system kill session '15,9' immediate;

System altered.

SQL> alter system kill session '50,13' immediate;

System altered.

SQL> alter system kill session '53,3' immediate;

System altered.

SQL> alter system kill session '98,21' immediate;

System altered.
Killed all above four sessions and tried to drop the schema


SQL> drop user drop_user;
drop user drop_user
*
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected

There is a new connection again
SQL> select 'alter system kill session '''||sid||','||serial#||''' immediate;' "Kill string" FROM v$session where username='DROP_USER';

Kill string
--------------------------------------------------------------------------------
alter system kill session '15,25' immediate;

Locked the schema account
SQL> alter user drop_user account lock;

User altered.

SQL> select 'alter system kill session '''||sid||','||serial#||''' immediate;' "Kill string" FROM v$session where username='DROP_USER';

Kill string
--------------------------------------------------------------------------------
alter system kill session '15,25' immediate;

SQL> alter system kill session '15,25' immediate;

System altered.

SQL> drop user drop_user;

User dropped.

--------------------------------------------------------------------------------

Friday, June 29, 2012



How to connect and start Oracle 7 database:

I started my job as DBA from oracle 9i, when I had a situation to start a version 7 DB it took me few minutes to find and resolve. Today after few years there was a need to check db status of version 7 database and my friend asked how? so I thought put this steps here though now there are very less version 7,8 databases.

1) Connect to  SVRMGRL
apu82$ svrmgrl

Oracle Server Manager Release 2.3.3.0.0 - Production

Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.

Oracle7 Server Release 7.3.3.0.0 - Production Release
With the distributed and parallel query options
PL/SQL Release 2.3.3.0.0 – Production

2) Connect to database as internal

SVRMGR> connect internal
Connected to an idle instance.

3) Startup the database

SVRMGR> startup
ORACLE instance started.
Total System Global Area     109157168 bytes
Fixed Size                       39808 bytes
Variable Size                 23003056 bytes
Database Buffers              81920000 bytes
Redo Buffers                   4194304 bytes
Database mounted.
Database opened.
SVRMGR> exit

SQL> desc v$instance
 Name                            Null?    Type
 ------------------------------- -------- ----
 KEY                                      VARCHAR2(64)
 VALUE                                    NUMBER

SQL> select * from v$instance;

KEY                                                                   VALUE
---------------------------------------------------------------- ----------
RESTRICTED MODE                                                           0
SHUTDOWN PENDING                                                          0
STARTUP TIME - JULIAN                                               2455414
STARTUP TIME - SECONDS                                                66687


Friday, June 8, 2012

Archive log Destination change


SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            C:\APP\ATHIL\ADMIN\ORCL\arch
...

SQL> alter system set LOG_ARCHIVE_DEST_1='LOCATION=C:\Athil\Arch\ORCL' scope=both;
alter system set LOG_ARCHIVE_DEST_1='LOCATION=C:\Athil\Arch\ORCL' scope=both
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16019: cannot use LOG_ARCHIVE_DEST_1 with LOG_ARCHIVE_DEST or
LOG_ARCHIVE_DUPLEX_DEST


SQL> sho parameter arc

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest                     string      C:\APP\ATHIL\ADMIN\ORCL\arch

SQL> alter system set LOG_ARCHIVE_DEST='LOCATION=C:\Athil\Arch\ORCL' scope=both
  2  ;
alter system set LOG_ARCHIVE_DEST='LOCATION=C:\Athil\Arch\ORCL' scope=both
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16032: parameter LOG_ARCHIVE_DEST destination string cannot be translated
ORA-07286: sksagdi: cannot obtain device information.
Linux-x86_64 Error: 2: No such file or directory

After checking in Doc 


LOG_ARCHIVE_DEST

Property Description
Parameter type String
Syntax LOG_ARCHIVE_DEST = filespec
ALTER SYSTEM SET LOG_ARCHIVE_DEST = filespec, where filespec is the new archive destination.

NO "LOCATION " for LOG_ARCHIVE_DEST

SQL> alter system set LOG_ARCHIVE_DEST='C:\Athil\Arch\ORCL' scope=both;

System altered.

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            C:\Athil\Arch\ORCL
...

SQL>  alter system switch logfile;

System altered.

SQL> /

System altered.

SQL> /

System altered.

SQL> host dir C:\Athil\Arch\ORCL

06/08/2012  10:45 AM        38,752,256 ORCL_1_137_780346113.ARC
06/08/2012  10:45 AM             1,024 ORCL_1_138_780346113.ARC
06/08/2012  10:45 AM             3,072 ORCL_1_139_780346113.ARC