반응형

오라클 import 과정중에


아래와 같이 에러를 만났다


ora-00257 archiver error. connect internal only until freed


원인은 


아카이브 full로 인해 발생


근데 문제는 ASM 디스크 였다


아래의 쿼리를 통해 조회하면 archive err 상태를 확인 가능하다


SQL> select * from v$archive_dest;



방법은 수동 삭제와 자동 삭제가 있고


개발서버라 고민없이 RMAN으로 접속하여 자동으로 지웠다.


수동삭제


Subject:  How To Delete Archive Log Files Out Of +Asm? 

Doc ID:  Note:300472.1

The information in this document applies to: 

Oracle Server - Enterprise Edition - Version: 10.1.0.3

Information in this document applies to any platform.

Goal

How to delete archive log files out of +ASM? 

Fix

1. Run the following SQL to find the full path for the archivelog files.

SELECT CONCAT('+'||gname, SYS_CONNECT_BY_PATH(aname,'/')) full_path,

dir, sys FROM (SELECT g.name gname, a.parent_index pindex, a.name aname,

a.reference_index rindex, a.ALIAS_DIRECTORY dir, a.SYSTEM_CREATED sys

FROM v$asm_alias a, v$asm_diskgroup g

WHERE a.group_number = g.group_number)

START WITH (MOD(pindex, POWER(2, 24))) = 0

CONNECT BY PRIOR rindex = pindex

ORDER BY dir desc, full_path asc;

The results will look similar to the following.

+DSKGRP1/MAXCP/ARCHIVELOG/2004_11_15/thread_1_seq_970.1236.1

2. When the file is created by Oracle the format in +ASM is:

   DISKGROUP_NAME/db_name/file_type/creation_date/<file_name>.

This SQL will generate the SQL necessary to delete all archivelogs out of +ASM.

Note: Change the <diskgroup> and <dbname> to the actual values from what is returned from previous SQL output.

select 'alter diskgroup DSKGRP1 drop file

''<diskgroup>/<dbname>/ARCHIVELOG/'|| to_char(b.creation_date,'YYYY_MM_DD') ||'/'|| a.name||''';'

from v$asm_alias a, v$asm_file b

where a.group_number = b.group_number

and a.file_number = b.file_number

and b.type='ARCHIVELOG'

order by a.name;

This will generate SQL similar to the following.

alter DISKGROUP DSKGRP1 drop file  '+DSKGRP1/MAXCP/ARCHIVELOG/2004_11_15/thread_1_seq_970.1236.1';


자동삭제


$> rman target /


RMAN> crosscheck archivelog all;


RMAN> delete noprompt archivelog all;


참고 : http://interpiastory.tistory.com/21

http://kooremo.tistory.com/entry/ora00257archiver-error-Connect-internal-only-until-freed

http://database.sarang.net/?inc=read&aid=30826&criteria=oracle&subcrit=&id=&limit=20&keyword=blob&page=3

반응형
반응형

impdp 할때나 오류가 발생하면

3가지 해결 방법이 있는거 같으나...

mount 를 통해 깔끔하게 해결하는것을 권장....


expdp failed with ORA-31641: unable to create dump file ORA-27054: NFS file system where the file is created or resides is not mounted with correct options


expdp failed with ORA-31641: unable to create dump file ORA-27054: NFS file system where the file is created or resides is not mounted with correct options

While performing expdp on database getting below error. This is known error and workaround is available to fix it.

DataPump export fails with below errors:
Export: Release 11.2.0.1.0 - Production on Sun Nov 25 21:00:36 2016
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31641: unable to create dump file "/devotd_dpump/expdp_metadata_vspp_sun.dmp"
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Additional information: 3
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3


This is the common error DBA faces. Reason for getting this error may be bug or incorrect option while mounting the NFS mount point. Also this known bug.


Solution 
The solution which worked in this case was to set the below event which disables the mount point parameter checking:
sqlplus / as sysdba
alter system set events '10298 trace name context forever, level 32';

Or:

Set the following event in the init.ora
event="10298 trace name context forever, level 32"

Or 
setting event is workaround provided by oracle if this not help you then kindly mount the NFS mount point with correct option as below-
# mount -F nfs -o rw,bg,hard,rsize=32768,wsize=32768,vers=3,forcedirectio,nointr,proto=tcp,suid host:/folder1/to1 /folder2/to2


Reference - ORA-27054: NFS file system where the file is created or resides is not mounted with correct options (Doc ID 781349.1)


반응형
반응형

impdp ORA-31640 ORA-31693 ORA-19505 ORA-27037


금일 IMPDP 명령어로


상콤하게 import 작업을 하다가 위와 같은 ora 에러르 만났다...


처음엔 깜놀 했다가


parallel 옵션 을 사용할 때 dump 파일을 모든 rac 노드가  읽지 못하기 때문이라고 알게되었다


cluster=N 옵션을 통해 해결 가능하다


아래는 원문이다.


When I am trying to import schema, The impdp is failed to open dump file. see below script I am using.

$ cat parfile.par
USERID='/ as sysdba'
DIRECTORY=IMP_DP
DUMPFILE=SMARTSUPPY_SCHEMA.dmp
logfile=SMARTSUPPY_SCHEMA_09nov2014.log
parallel=10
SCHEMAS='SMARTSUPPY_SCHEMA'

I got below error while import..

ORA-31693: Table data object "SMARTSUPPY_SCHEMA"."BPM_TRANS_90000":"P297" failed to load/unload and is being skipped due to error:
ORA-31640: unable to open dump file "/export/APSDBSR-1351/SMARTSUPPY_SCHEMA.dmp" for read
ORA-19505: failed to identify file "/export/APSDBSR-1351/SMARTSUPPY_SCHEMA.dmp"
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
. . imported "SMARTSUPPY_SCHEMA"."BPM_TRANS_90000":"P315"      265.3 MB 1484775 rows
. . imported "SMARTSUPPY_SCHEMA"."TRC_HOP_T_90000":"P139"      219.7 MB 1402774 rows

The issue is due to I am using PARALLEL=10, so the dump file directory not being accessible from all nodes in the RAC. When we use PARALLEL > 1 option the child thread will be started in other node to complete the job faster, when job started in other node the dump file can't access the file. Due to this we receive this error. To fix the issue either you place the dump file to be accessed from all the nodes in that RAC environment or use cluster=N option.

Added cluster=N parameter in parfile and started the import again. 

$ cat parfile.par
USERID='/ as sysdba'
DIRECTORY=IMP_DP
DUMPFILE=SMARTSUPPY_SCHEMA.dmp
logfile=SMARTSUPPY_SCHEMA_09nov2014.log
parallel=10
SCHEMAS='SMARTSUPPY_SCHEMA'
CLUSTER=N
$

$ nohup impdp parfile=parfile.par &
[1] 27620
> nohup: ignoring input and appending output to `nohup.out'
$
$ jobs -l
[1]+ 27620 Running                 nohup impdp parfile=parfile.par &
$

$ tail -f SMARTSUPPY_SCHEMA_09nov2014.log
Master table "SYS"."SYS_IMPORT_SCHEMA_03" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_SCHEMA_03":  /******** AS SYSDBA parfile=parfile.par
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "SMARTSUPPY_SCHEMA"."BPM_COMPONENTS_90000":"P475"  1.956 GB 6711857 rows
. . imported "SMARTSUPPY_SCHEMA"."BPM_COMPONENTS_90000":"P480"  1.965 GB 6794127 rows
. . imported "SMARTSUPPY_SCHEMA"."BPM_COMPONENTS_90000":"P474"  1.958 GB 6727517 rows
. . imported "SMARTSUPPY_SCHEMA"."BPM_COMPONENTS_90000":"P479"  1.921 GB 6616816 rows
. . imported "SMARTSUPPY_SCHEMA"."BPM_COMPONENTS_90000":"P478"  1.903 GB 6512491 rows
. . imported "SMARTSUPPY_SCHEMA"."BPM_COMPONENTS_90000":"P481"  1.909 GB 6618578 rows

Hope this will help you.. :)

Best Regards,
Chowdari


출처 : http://mbc-dba.blogspot.kr/2014/11/impdp-ora-31640-ora-31693-ora-19505-ora.html

반응형
반응형

DAMO.SECURE_COLUMN_INFO


테이블의 KEY 값이 동일해야 동일한 데이터가 조회된다.


발생하는 에러

ORA-20900 : (테이블명.컬럼명) 복호화 도중에 에러가 발생하였습니다.

ORA-06512 : "DAMO.SECURE_ACCESS", 줄 4498에서

ORA-06512 : "DAMO.SECURE_EXTCALL", 줄 443에서

반응형

'Database' 카테고리의 다른 글

무료 DB 접근 툴  (0) 2019.08.19
무료 ERD 툴 ERMASTER  (0) 2019.08.08
Sybase IQ Administrator 사용 Script  (0) 2012.10.18
JNDI Log4SQL 적용 예...  (0) 2011.04.21
SQL LITE 사용 프로그램  (0) 2010.04.14
반응형


ORA-27086: unable to lock file - already in use

In Alert log :

Thu Feb 14 09:34:57 EST 2013
Errors in file /u01/app/oracle/admin/rdmetdev/udump/rdmetdev_ora_6321.trc:
ORA-27050: function called with invalid FIB/IOV structure
Additional information: 2
ORA-27086: unable to lock file - already in use
Linux-x86_64 Error: 37: No locks available
Additional information: 10

usually this problem occurred because NFS is Hanged,and can check OS logs to find "statd: server localhost not responding, timed out".

1- Check rpc.stat is working and you can restart again , and you have to Restart NFS Services also 

Stop : 

# service nfslock stop
# service nfs stop
# service portmap stop
# umount /proc/fs/nfsd
 Start :
# service portmap start
# service nfs start
# service nfslock start
# mount -t nfsd nfsd /proc/fs/nfsd

Please follow the order, also note that when you restart the NFS service the server could hang at most for 1 minute.

Finally you should Reboot your server.


Thank you
Osama Mustafa


출처 : http://osamamustafa.blogspot.kr/2013/02/ora-27086-unable-to-lock-file-already.html

반응형
반응형



Connection 실패!

e : java.sql.SQLException: Listener refused the connection with the following error:

ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

The Connection descriptor used by the client was:

100.100.1.1:1521:HHHAAA


원인

SID 와 ServiceName이 상이할 경우 발생


해결 방안


SID일 경우                - "jdbc:oracle:thin:@" + dbip + ":" + dbport + ":" + dbsid;
ServiceName일 경우 - "jdbc:oracle:thin:@" + dbip + ":" + dbport + "/" + dbsid;   


JSP 상에서는 안될 경우
connectInfo = "jdbc:oracle:thin:@//" + dbip + ":" + dbport + "/" + dbsid;

참고 사이트 : 
http://stillrabbit.blogspot.com/2009/01/jdbc-config-oracle-resource.html
 

후후... 일반적으로 SID와 Service Name이 동일하나... 이 사이트와 같은 경우도 존재했음...

샘플 JDBCTest.java

컴파일 : javac JDBCTest.java
실행 : java -cp /xxx/xxx/ojdbc.jar:. JDBCTest

 import java.sql.*; 


public class JDBCTest { 

 private static Connection con; 1

 private static Statement stmt; 

 private static ResultSet rs;   

  

 public static void main(String[] ar){ 

  try{ 

   // 1. Driver를 로딩한다. 

   Class.forName("oracle.jdbc.driver.OracleDriver"); 

   System.out.println("OracleDriver의 로딩이 정상적으로 이뤄졌습니다."); 

    


   String url = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=100.100.1.1)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=HHHAAA)))";

   // 2. Connection 얻어오기 

   con  = DriverManager.getConnection("jdbc:oracle:thin:@100.100.1.1:1521/HHHAAA" , "HHHH_WEBS", "123456");

   System.out.println("데이터베이스의 연결에 성공하였습니다."); 

    

   // 3. Statement 얻기 --> 쿼리문 작성하여 적용하기 위한 용도 

   stmt = con.createStatement(); 

    

   String sql ="";

    

   // 7. Select문 실행하여 데이터베이스 내용 출력하기 

   sql = "select count(*) from admin.tablesAN20"; 

   

   rs = stmt.executeQuery(sql); 

   

   while(rs.next()){ 

    System.out.println("count : " + rs.getString(1)); 

   } 

   

   // 7. Select문 실행하여 데이터베이스 내용 출력하기 

   sql = "select count(*) from admin.tablesXA01"; 

   

   rs = stmt.executeQuery(sql); 

   

   while(rs.next()){ 

    System.out.println("count : " + rs.getString(1)); 

   } 

   

   // 7. Select문 실행하여 데이터베이스 내용 출력하기 

   sql = "select count(*) from admin.tablesXA02"; 

   

   rs = stmt.executeQuery(sql); 

   

   while(rs.next()){ 

    System.out.println("count : " + rs.getString(1)); 

   }       

   

   rs.close(); 

   stmt.close(); 

   con.close(); 

  }catch(ClassNotFoundException cnfe){ 

   System.out.println("oracle.jdbc.driver.OracleDriver를 찾을 수 없습니다."); 

  }catch(SQLException  sql){ 

   System.out.println("Connection 실패!"); 

   System.out.println("e : " + sql.toString()); 

  }catch(Exception e){ 

   System.out.println(e.toString()); 

  }finally{ 

   System.out.println("성공!!"); 

  } 

 } 








반응형

'Private' 카테고리의 다른 글

node-red oracledb  (0) 2018.06.25
서버 용량 산정 / 성능 측정 / tpmc / bops / tpc / tpc-h  (0) 2013.05.10
Magicar AF BRONZE (매직카 브론즈)  (0) 2011.11.30
압력 밥솥 구매 ... 예정  (0) 2011.11.26
아놔 가습기  (3) 2011.11.22
반응형

오라플에서 에러가 발생했을 때, 어떤 SQL문이 문제인가를 찾아낼 필요가 있습니다. 예를 들어, Alert.log 파일에 다음과 같은 에러 메시지가 기록되어 있습니다.
1 Fri Mar 05 09:47:53 2010
2 ORA-1652: unable to extend temp segment by 128 in tablespace                 VERY_SMALL_TBS
어떤 SQL문이 범인인가를 알지 못하면, 해결하기가 쉽지 않습니다.

이런 경우에 시도해 볼 수 있는 것이 ErrorStack 덤프입니다. ErrorStack 덤프를 진단 이벤트와 함께 사용하면 에러를 일으키는 SQL 문장이 트레이스 파일에 기록되도록 할 수 있습니다.

간단한 예를 설명해 보겠습니다. 우선 작은 크기(10m)의 테이블스페이를 만듭니다.

1 UKJA@ukja1021> create tablespace very_small_tbs
2   2  datafile size 10m;
3   
4 Tablespace created.
ORA-01652 에러가 발생하면, ErrorStack 덤프를 실행하도록 진단 이벤트를 겁니다.
1 UKJA@ukja1021> alter system set events '1652 trace name errorstack level 1, forever';
2   
3 Session altered.
10m보다 큰 테이블을 만들면 ORA-01652 에러가 발생합니다.
01 UKJA@ukja1021> create table tbig(c1)
02   2  tablespace very_small_tbs
03   as
04   select rpad('x',1000) from dual
05   connect by level <= 10000
06   6  ;
07 select rpad('x',1000) from dual
08                            *
09 ERROR at line 4:
10 ORA-01652: unable to extend temp segment by 128 in tablespace VERY_SMALL_TBS
11   
12 UKJA@ukja1021> alter system set events '1652 trace name context off';
13   
14 Session altered.
Alert.log 파일에는 다음과 에러 메시지가 남습니다.
1 Fri Mar 05 09:47:53 2010
2 ORA-1652: unable to extend temp segment by 128 in tablespace                 VERY_SMALL_TBS
프로세스의 트레이스 파일에는 에러 발생시의 SQL문과 CallStack 트레이스가 기록되어 있습니다.
01 ORA-01652: unable to extend temp segment by 128 in tablespace VERY_SMALL_TBS
02 Current SQL statement for this session:
03 create table tbig(c1)
04 tablespace very_small_tbs
05 as
06 select rpad('x',1000) from dual
07 connect by level <= 10000
08 ----- Call Stack Trace -----
09 calling              call     entry                argument values in hex      
10 location             type     point                (? means dubious value)     
11 -------------------- -------- -------------------- ----------------------------
12 _ksedst+38           CALLrel  _ksedst1+0           0 1
13 _ksedmp+898          CALLrel  _ksedst+0            0
14 _ksddoa+2088         CALLreg  00000000             1
15 _ksdpcg+238          CALLrel  _ksddoa+0            A9615C0 93C78C0
16 _ksdpec+230          CALLrel  _ksdpcg+0            674 C04A478 1
17 __PGOSF89__ksfpec+1  CALLrel  _ksdpec+0            674
18 18                                                 
19 _kgesev+88           CALLreg  00000000             A0C6760 674
20 _ksesec2+39          CALLrel  _kgesev+0            A0C6760 93C0020 674 2 C04A4E4
21 _ktsxterr+316        CALLrel  _ksesec2+0           674 0 80 0 1 E C04A55E
22 _ktfbtgex1+969       CALLrel  _ktsxterr+0          792DE5C 80 0
23 _ktsxs_add+1766      CALLrel  _ktfbtgex1+0         C04AD8C 3D C04AA50 80 18 A 3
24                                                    0 0 C04AD50 37B3EE88
25 _ktsxssr_sadd+1409   CALLrel  _ktsxs_add+0         C04B048 C04AD8C 80 A 3 0 18 1
26                                                    C04B11C C04AE08 C04ADC0 0
27                                                    C04AD50
28 _ktrsexec+372        CALL???  00000000             C04B0D8
29 _ktelwbl+770         CALLrel  _ktrsexec+0          C04B0D8
30 _kdblba+168          CALLrel  _ktelwbl+0           792DE5C 1
31 _kdblGetBlockDba+58  CALLrel  _kdblba+0            
32 _kdblgb+26           CALLrel  _kdblGetBlockDba+0   C04B3C8 792DD9C
33 _kdblailb+2101       CALLrel  _kdblgb+0            
34 _kdblai+1560         CALLrel  _kdblailb+0          C04B3C8 792DC9C 792DD9C 0 1 1
35 _klclil1r+187        CALLrel  _kdblai+0            
36 _qerltRop+514        CALLrel  _klclil1r+0          792DBEC
37 _qercbiFetch+935     CALLreg  00000000             34C4F034 7FFF
38 _rwsfcd+95           CALL???  00000000             34C4F384 1C72EB4 34C4F034
39                                                    7FFF
40 _qerltFetch+368      CALL???  00000000             34C4F148 1C72EB4 34C4F034
41                                                    7FFF
42 _ctcdrv+7674         CALL???  00000000             34C4F034 1D28394 C04CE30 1
43 _opiexe+12257        CALLrel  _ctcdrv+0            34EE5F50 C04D548 C04D510
44 _opiosq0+6088        CALLrel  _opiexe+0            4 0 C04D8C0
45 _kpooprx+232         CALLrel  _opiosq0+0           3 E C04D9D8 A4
46 _kpoal8+775          CALLrel  _kpooprx+0           C04F6F8 C04E224 6D 1 0 A4
47 _opiodr+1099         CALLreg  00000000             5E 17 C04F6F4
48 _ttcpip+1273         CALLreg  00000000             5E 17 C04F6F4 0
49 _opitsk+1017         CALL???  00000000             
50 _opiino+1087         CALLrel  _opitsk+0            0 0
51 _opiodr+1099         CALLreg  00000000             3C 4 C04FC8C
52 _opidrv+819          CALLrel  _opiodr+0            3C 4 C04FC8C 0
53 _sou2o+45            CALLrel  _opidrv+0            3C 4 C04FC8C
54 _opimai_real+112     CALLrel  _sou2o+0             C04FC80 3C 4 C04FC8C
55 _opimai+92           CALLrel  _opimai_real+0       2 C04FCB8
56 _OracleThreadStart@  CALLrel  _opimai+0            
57 4+708                                              
58 7C80B710             CALLreg  00000000
ErrorStack 덤프는 그 레벨에 따라 다양한 유용한 정보를 제공해줍니다. 아래 아티클에서 상세한 정보를 얻을 수 있습니다.

출처 : http://ukja.tistory.com/307

반응형

+ Recent posts