반응형

히딩크 감독이 연골 치료로 유명해진 제품


오백 ~ 천


관련 URL 

http://www.newspim.com/news/view/20190326000981

http://news.mtn.co.kr/newscenter/news_viewer.mtn?gidx=2019032617152128781



이상사례 관련 URL

http://www.yakup.com/news/index.html?mode=view&cat=12&nid=228690

반응형
반응형

input {

  file {

    type => "json"

    codec => "json" {

        charset => "utf-8"

    }

    path => "/test.json"

    start_position => "beginning"

    sincedb_path => "/dev/null"

  }

}

filter {

  json {

   source => "message"

  }


  # split records tag

  split {

        field => "[records]"

  }


  # new json type append

  if [records][so2Grade] {

  mutate {

        add_field => {

                "so2Grade"    => "%{[records][so2Grade]}"

                "pm25Grade1h" => "%{[records][pm25Grade1h]}"

                "pm10Value24" => "%{[records][pm10Value24]}"

                "khaiValue"   => "%{[records][khaiValue]}"

                "so2Value"    => "%{[records][so2Value]}"

                "coValue"     => "%{[records][coValue]}"

                "pm10Grade1h" => "%{[records][pm10Grade1h]}"

                "o3Grade"     => "%{[records][o3Grade]}"

                "pm10Value"   => "%{[records][pm10Value]}"

                "khaiGrade"   => "%{[records][khaiGrade]}"

                "pm25Value"   => "%{[records][pm25Value]}"

                "no2Grade"    => "%{[records][no2Grade]}"

                "pm25Value24" => "%{[records][pm25Value24]}"

                "pm25Grade"   => "%{[records][pm25Grade]}"

                "mangName"    => "%{[records][mangName]}"

                "coGrade"     => "%{[records][coGrade]}"

                "dataTime"    => "%{[records][dataTime]}"

                "no2Value"    => "%{[records][no2Value]}"

                "pm10Grade"   => "%{[records][pm10Grade]}"

                "o3Value"     => "%{[records][o3Value]}"

        }


        # remove split records

        remove_field => [ "[fields]", "[records]" ]

  }


   # convert field

   mutate {

       convert => {

         "so2Grade"    => "float"

         "pm25Grade1h" => "float"

         "pm10Value24" => "float"

         "khaiValue"   => "float"

         "so2Value"    => "float"

         "coValue"     => "float"

         "pm10Grade1h" => "float"

         "o3Grade"     => "float"

         "pm10Value"   => "float"

         "khaiGrade"   => "float"

         "pm25Value"   => "float"

         "no2Grade"    => "float"

         "pm25Value24" => "float"

         "pm25Grade"   => "float"

         "coGrade"     => "float"

         "no2Value"    => "float"

         "pm10Grade"   => "float"

         "o3Value"     => "float"

         "mangName"    => "string"

      }

   }

}

output {

    stdout { codec => json }

    file {

        codec => json_lines

        path => "/output_test.json"

    }

    elasticsearch {

       hosts => "localhost"

       index => "atmosphere"

    }

}


======================================================


input {

  file {

    type           => "json"

    #codec          => "json"

    codec          => "plain"

    path           => "/media/sf_Class/jptest/jongrogu20190320.json"

    start_position => "beginning"

    sincedb_path   => "/dev/null"

  }

}

filter {

  json {

        source => "message"

  }


  # split records tag

  split {

        field => "[records]"

  }


  # new json type append

  mutate {

        # remove split records

        remove_field => [ "[fields]", "[records]" ]

        add_field => {

                "so2Grade"    => "%{[records][so2Grade]}"

                "pm25Grade1h" => "%{[records][pm25Grade1h]}"

                "pm10Value24" => "%{[records][pm10Value24]}"

                "khaiValue"   => "%{[records][khaiValue]}"

                "so2Value"    => "%{[records][so2Value]}"

                "coValue"     => "%{[records][coValue]}"

                "pm10Grade1h" => "%{[records][pm10Grade1h]}"

                "o3Grade"     => "%{[records][o3Grade]}"

                "pm10Value"   => "%{[records][pm10Value]}"

                "khaiGrade"   => "%{[records][khaiGrade]}"

                "pm25Value"   => "%{[records][pm25Value]}"

                "no2Grade"    => "%{[records][no2Grade]}"

                "pm25Value24" => "%{[records][pm25Value24]}"

                "pm25Grade"   => "%{[records][pm25Grade]}"

                "mangName"    => "%{[records][mangName]}"

                "coGrade"     => "%{[records][coGrade]}"

                "dataTime"    => "%{[records][dataTime]}"

                "no2Value"    => "%{[records][no2Value]}"

                "pm10Grade"   => "%{[records][pm10Grade]}"

                "o3Value"     => "%{[records][o3Value]}"

        }


  }


 # validation

  mutate {

           gsub =>  [

                       "so2Grade" ,    "[^0-9.]" , "",

                       "pm25Grade1h" , "[^0-9.]" , "",

                       "pm10Value24" , "[^0-9.]" , "",

                       "khaiValue" ,   "[^0-9.]" , "",

                       "so2Value" ,    "[^0-9.]" , "",

                       "coValue" ,     "[^0-9.]" , "",

                       "pm10Grade1h" , "[^0-9.]" , "",

                       "o3Grade" ,     "[^0-9.]" , "",

                       "pm10Value" ,   "[^0-9.]" , "",

                       "khaiGrade" ,   "[^0-9.]" , "",

                       "pm25Value" ,   "[^0-9.]" , "",

                       "no2Grade"  ,   "[^0-9.]" , "",

                       "pm25Value24" , "[^0-9.]" , "",

                       "pm25Grade" ,   "[^0-9.]" , "",

                       "coGrade" ,     "[^0-9.]" , "",

                       "no2Value" ,    "[^0-9.]" , "",

                       "pm10Grade" ,   "[^0-9.]" , "",

                       "o3Value" ,     "[^0-9.]" , ""

                    ]

  }




  # convert field

  mutate {

       convert => {

         "so2Grade"    => "float"

         "pm25Grade1h" => "float"

         "pm10Value24" => "float"

         "khaiValue"   => "float"

         "so2Value"    => "float"

         "coValue"     => "float"

         "pm10Grade1h" => "float"

         "o3Grade"     => "float"

         "pm10Value"   => "float"

         "khaiGrade"   => "float"

         "pm25Value"   => "float"

         "no2Grade"    => "float"

         "pm25Value24" => "float"

         "pm25Grade"   => "float"

         "coGrade"     => "float"

         "no2Value"    => "float"

         "pm10Grade"   => "float"

         "o3Value"     => "float"

      }

   }


  # date

  date {

        match => ["dataTime" , "yyyy-MM-dd HH:mm"]

  }


}



output {

    stdout { codec => rubydebug }

    file {

        codec => json_lines

        path => "/media/sf_Class/jptest/output_test.json"

    }

#    elasticsearch {

#       hosts => "localhost"

#       index => "atmosphere"

#    }

}




반응형
반응형



1. 커맨드 환경(CUI)에 화면 크기 1024*768로 설정

   - root 권한

   #> vi /etc/default/grub

   

   다음 라인 수정

   GRUB_CMDLINE_LINUX=" .....(중략)... vga=791"

   

   grub 업데이트

   #> grub2-mkconfig -o /boot/grub2/grub.cfg

   

   시스템 재시작

   #> sync

   #> reboot 





2. daum repository 설정 추가


   - root 권한

   

   #> cd /etc/yum.repos.d/


   #> vi daum.repo


   ###### 아래의 내용을 추가 #########


    [base]

    name=CentOS-$releasever - Base    

    baseurl=http://ftp.daum.net/centos/7/os/$basearch/    

    gpgcheck=1    

    gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-7         

    

    [updates]    

    name=CentOS-$releasever - Updates    

    baseurl=http://ftp.daum.net/centos/7/updates/$basearch/    

    gpgcheck=1    

    gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-7         

    

    [extras]    

    name=CentOS-$releasever - Extras    

    baseurl=http://ftp.daum.net/centos/7/extras/$basearch/    

    gpgcheck=1    

    gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-7

    

    [centosplus]    

    name=CentOS-$releasever - Plus    

    baseurl=http://ftp.daum.net/centos/7/centosplus/$basearch/    

    gpgcheck=1    

    gpgkey=http://ftp.daum.net/centos/RPM-GPG-KEY-CentOS-7    .

    

    - repo clear 후 재로딩

    #> yum clean all

    

    - repo 목록 조회

    #> yum repolist all

    

    


3. virtual box 자동 화면 해상도 관련

   - root 권한 

    yum install -y make kernel-devel gcc perl bzip2

    yum update -y kernel*



  # 재기동(reboot)   


   Virtual Box -> 장치 -> 게스트 확장 CD 이미지 삽입    

반응형

'OS > Centos' 카테고리의 다른 글

Centos 7 Firewall-cmd 관련 정보들  (0) 2019.05.08
Centos 7 서버 설정 하기  (0) 2019.04.17
Centos 6.3 에서 SAMBA 설정하기  (4) 2013.01.22
Centos 6.3 에서 VNC 설치 하기  (0) 2013.01.21
CENTOS 5 버전의 SSH 관련 버그 오류  (0) 2010.10.05
반응형


반응형

'Private' 카테고리의 다른 글

D3  (0) 2019.05.31
svn 백업 및 복구  (1) 2019.05.08
서버 용량 산정 / 성능 측정 / tpmc / bops / tpc / tpc-h  (0) 2013.05.10
오라클 접속 ORA-12505 에러 관련  (0) 2013.05.02
Magicar AF BRONZE (매직카 브론즈)  (0) 2011.11.30
반응형


출처 : http://ukja.tistory.com/232 에서 퍼온 자료입니다.



특정 Query를 수행한 후, 그 결과를 가로 형태가 아닌 세로 형태로 보기 좋게 출력하고 싶다. Tom Kyte가 멋지게 이 작업을 해냈는데, 핵심은 DBMS_SQL 패키지를 이용한 Dynamic SQL에 있다. 

create or replace procedure print_table( p_query in varchar2 )
AUTHID CURRENT_USER
is
    l_theCursor     integer default dbms_sql.open_cursor;
    l_columnValue   varchar2(4000);
    l_status        integer;
    l_descTbl       dbms_sql.desc_tab;
    l_colCnt        number;
begin
      dbms_sql.parse(  l_theCursor,  p_query, dbms_sql.native );
    dbms_sql.describe_columns
    ( l_theCursor, l_colCnt, l_descTbl );

    for i in 1 .. l_colCnt loop
        dbms_sql.define_column
        (l_theCursor, i, l_columnValue, 4000);
    end loop;

    l_status := dbms_sql.execute(l_theCursor);

    while ( dbms_sql.fetch_rows(l_theCursor) > 0 ) loop
        for i in 1 .. l_colCnt loop
            dbms_sql.column_value
            ( l_theCursor, i, l_columnValue );
            dbms_output.put_line
            ( rpad( l_descTbl(i).col_name, 30 )
              || ': ' ||
              l_columnValue );
        end loop;
        dbms_output.put_line( '-----------------' );
    end loop;
exception
    when others then
     raise;
end;
/


약간의 귀찮은 코딩이 필요하지만 그 효과는 입이 딱 벌어질 정도이다. 다음과 같이 아주 보기 편하게 데이터를 출력할 수 있다. 


SYSTEM> grant execute on print_table to public;

SYSTEM> create public synonym print_table for scott.print_table;



UKJA@ukja116> set serveroutput on
UKJA@ukja116> 
UKJA@ukja116> exec print_table('select * from v$session where sid = userenv(''sid'')');
SADDR                         : 35065B10                                        
SID                           : 127                                             
SERIAL#                       : 557                                             
AUDSID                        : 6755975                                         
PADDR                         : 35A94D88                                        
USER#                         : 88                                              
USERNAME                      : UKJA                                            
COMMAND                       : 3                                               
OWNERID                       : 2147483644                                      
TADDR                         :                                                 
...                             
CREATOR_SERIAL#               : 140                                             
-----------------                                                               

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.20


참고로, 나는 print_table 함수를 접하는 순간 Toad가 더 이상 불필요하게 되었다. 

DBMS_SQL 패키지를 이용한 Dynamic SQL 구현은 너무 강력하다. 아래는 내가 실제로 테스트를 할 때 많이 사용하는 간단한 PL/SQL Script이다. Column이 50개 이상 존재하는  V$SQL_SHARED_CURSOR 뷰에서 값이 'Y'인 것만 뽑아서 예쁘게 출력하고 싶기 때문이다. 

-- my shared cursor
/*
declare
  c         number;
  col_cnt   number;
  col_rec   dbms_sql.desc_tab;
  col_value varchar2(4000);
  ret_val    number;
begin
  c := dbms_sql.open_cursor;
  dbms_sql.parse(c,
      'select q.sql_text, s.*
      from v$sql_shared_cursor s, v$sql q
      where s.sql_id = q.sql_id
          and s.child_number = q.child_number
          and q.sql_text like ''&1''',
      dbms_sql.native);
  dbms_sql.describe_columns(c, col_cnt, col_rec);

  for idx in 1 .. col_cnt loop
    dbms_sql.define_column(c, idx, col_value, 4000);
  end loop;


  ret_val := dbms_sql.execute(c);

  while(dbms_sql.fetch_rows(c) > 0) loop
    for idx in 1 .. col_cnt loop
      dbms_sql.column_value(c, idx, col_value);
      if col_rec(idx).col_name in ('SQL_ID', 'ADDRESS', 'CHILD_ADDRESS',
                    'CHILD_NUMBER', 'SQL_TEXT') then
        dbms_output.put_line(rpad(col_rec(idx).col_name, 30) ||
                ' = ' || col_value);
      elsif col_value = 'Y' then
        dbms_output.put_line(rpad(col_rec(idx).col_name, 30) ||
                ' = ' || col_value);
      end if;

    end loop;

    dbms_output.put_line('--------------------------------------------------');

   end loop;

  dbms_sql.close_cursor(c);

end;
/


만일 이러한 수고없이 V$SQL_SHARED_CURSOR 뷰를 보려고 하면, 곧 좌절하고 말 것이다. 아래 데이터를 보면서 좌절감을 잠깐 맛보자...

UKJA@ukja116> col sql_id new_value v_sql_id
UKJA@ukja116> 
UKJA@ukja116> select sql_id from v$sql where sql_text like 
    'select /* cursor_share */ * from t1%';

SQL_ID                                                                          
-------------                                                                   
2zu6xb9130t89                                                                   

Elapsed: 00:00:00.07
UKJA@ukja116> 
UKJA@ukja116> set serveroutput on
UKJA@ukja116> exec print_table( -
        'select * from v$sql_shared_cursor where sql_id = ''&v_sql_id''');
SQL_ID                        : 2zu6xb9130t89                                   
ADDRESS                       : 2867E250                                        
CHILD_ADDRESS                 : 2FABDDD8                                        
CHILD_NUMBER                  : 2                                               
UNBOUND_CURSOR                : N                                               
SQL_TYPE_MISMATCH             : N                                               
OPTIMIZER_MISMATCH            : N                                               
OUTLINE_MISMATCH              : N                                               
STATS_ROW_MISMATCH            : N                                               
LITERAL_MISMATCH              : N                                               
FORCE_HARD_PARSE              : N                                               
EXPLAIN_PLAN_CURSOR           : N                                               
BUFFERED_DML_MISMATCH         : N                                               
PDML_ENV_MISMATCH             : N                                               
INST_DRTLD_MISMATCH           : N                                               
SLAVE_QC_MISMATCH             : N                                               
TYPECHECK_MISMATCH            : N                                               
AUTH_CHECK_MISMATCH           : N                                               
BIND_MISMATCH                 : N                                               
DESCRIBE_MISMATCH             : N                                               
LANGUAGE_MISMATCH             : N                                               
TRANSLATION_MISMATCH          : N                                               
ROW_LEVEL_SEC_MISMATCH        : N                                               
INSUFF_PRIVS                  : N                                               
INSUFF_PRIVS_REM              : N                                               
REMOTE_TRANS_MISMATCH         : N                                               
LOGMINER_SESSION_MISMATCH     : N                                               
INCOMP_LTRL_MISMATCH          : N                                               
OVERLAP_TIME_MISMATCH         : N                                               
EDITION_MISMATCH              : N                                               
MV_QUERY_GEN_MISMATCH         : N                                               
USER_BIND_PEEK_MISMATCH       : N                                               
TYPCHK_DEP_MISMATCH           : N                                               
NO_TRIGGER_MISMATCH           : N                                               
FLASHBACK_CURSOR              : N                                               
ANYDATA_TRANSFORMATION        : N                                               
INCOMPLETE_CURSOR             : N                                               
TOP_LEVEL_RPI_CURSOR          : N                                               
DIFFERENT_LONG_LENGTH         : N                                               
LOGICAL_STANDBY_APPLY         : N                                               
DIFF_CALL_DURN                : N                                               
BIND_UACS_DIFF                : N                                               
PLSQL_CMP_SWITCHS_DIFF        : N                                               
CURSOR_PARTS_MISMATCH         : N                                               
STB_OBJECT_MISMATCH           : N                                               
CROSSEDITION_TRIGGER_MISMATCH : N                                               
PQ_SLAVE_MISMATCH             : N                                               
TOP_LEVEL_DDL_MISMATCH        : N                                               
MULTI_PX_MISMATCH             : N                                               
BIND_PEEKED_PQ_MISMATCH       : N                                               
MV_REWRITE_MISMATCH           : N                                               
ROLL_INVALID_MISMATCH         : N                                               
OPTIMIZER_MODE_MISMATCH       : N                                               
PX_MISMATCH                   : N                                               
MV_STALEOBJ_MISMATCH          : N                                               
FLASHBACK_TABLE_MISMATCH      : N                                               
LITREP_COMP_MISMATCH          : N                                               
PLSQL_DEBUG                   : N                                               
LOAD_OPTIMIZER_STATS          : N                                               
ACL_MISMATCH                  : N                                               
FLASHBACK_ARCHIVE_MISMATCH    : N                                               
LOCK_USER_SCHEMA_FAILED       : N                                               
REMOTE_MAPPING_MISMATCH       : N                                               
LOAD_RUNTIME_HEAP_FAILED      : N                                               
-----------------                                                               

PL/SQL procedure successfully completed.


너무 많은 데이터때문에 분석하는 시간이 즐거운 시간이 아니라 고생스러운(주로 눈이) 시간이 되어 버린다. 하지만 다음과 같이 간단하게 이 문제를 해결할 수 있다. 

UKJA@ukja116> @shared_cursor 'select /* cursor_share */%'
SQL_TEXT                       = select /* cursor_share */ * from t1 where c1 = 
:b1                                                                             
SQL_ID                         = 2zu6xb9130t89                                  
ADDRESS                        = 2867E250                                       
CHILD_ADDRESS                  = 2DCB06D0                                       
CHILD_NUMBER                   = 0                                              
OPTIMIZER_MODE_MISMATCH        = Y                                              
--------------------------------------------------                              
SQL_TEXT                       = select /* cursor_share */ * from t1 where c1 = 
:b1                                                                             
SQL_ID                         = 2zu6xb9130t89                                  
ADDRESS                        = 2867E250                                       
CHILD_ADDRESS                  = 2DD0DB6C                                       
CHILD_NUMBER                   = 1                                              
BIND_MISMATCH                  = Y                                              
--------------------------------------------------                              
SQL_TEXT                       = select /* cursor_share */ * from t1 where c1 = 
:b1                                                                             
SQL_ID                         = 2zu6xb9130t89                                  
ADDRESS                        = 2867E250                                       
CHILD_ADDRESS                  = 2FABDDD8                                       
CHILD_NUMBER                   = 2                                              
--------------------------------------------------                              

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.04


이런 간단하지만 아름다운 결과들이 엔지니어라면 누구나 남을 한번쯤은 놀라게 할 만한 프로그래밍 실력이 필요한 이유이다. 



출처: http://ukja.tistory.com/232 [오라클 성능 문제에 대한 통찰 - 조동욱]

출처: http://ukja.tistory.com/232 [오라클 성능 문제에 대한 통찰 - 조동욱]

반응형
반응형
이번에 7.3 으로 ER Win Version UP 했숨다~! 그거에 맞춰서 DB Oracle 에는 테이블에 Comment 컬럼이 있어요.
토드에서 테이블명 입력 후 F4 키를 누르시면 Table Description 을 볼 수 있습니다



이제 저녀석을 Reverse 해서 저 Comment 값을 Logical 로 변경하는 ER Win 작업을 해 보겠습니다.



* Reverse Engineer 를 사용하여 DB 내용 값을 긁어오기

1. Tools - Reverse Engineer.. 를 선택합니다.



2. 어떤 타입의 DB 내용과 Logical 도 함께 긁어올 것인지 Physical 만 긁어 올 것인지 선택합니다.

 Oracle 10g 이므로 Oracle 을 선택 하였습니다 ^^
Next 를 누릅니다.



3. Option 을 선택 합니다.

전, 선택된 사용자만 가져올 것이기 떄문에 Owners 를 선택하여 사용자 스키마 명을 써 주었습니다

Infra 탭에서는 Primary Key(주키) 값 과 Relations (관계) 를 함께 보여줄 것이기 떄문에 체크 합니다.
Physical 및 Logical 의 이름은 모두 대문자로 볼 것 이기 떄문에 UPPER 를 선택하였습니다.

설정이 끝나면 Next 누릅니다.



4. Oracle Connection 화면 창이 뜨네요.

Database : Oracle 10g/11g  (오라클 10g 이므로..)
Authentication : Database Authentication ( 디비 사용자 할꺼임 -0-)
User Name : 사용자 명
Password : 패스워드

Connection String : SID
 명(자기 로컬일 경우)을 써 줍니다.

외부 데이터로 붙을 때에는  Connection String : nerv.kr/xe 이런식으로 써 줍니다.

< 이전 ERWin 4.1 버전에는 ip 주소 까지 써주었는데... 이번 7버전은 없네요 -_-;;; 
tns.ora 파일에서 설정해 준 값으로 가나 봅니다..>

설정이 끝나면 Connect 를 누릅니다.



5. Reverse Engineer 의 상태 값이 뜨네요... 막~ 읽힐꺼예요.. 조금 시간적 여유를 가지세요! ^-^



6. 중간 중간 물어봅니다. 아까 Infra 탭에서 Primary Key 와 Relation 에 대한걸 물어보네요... Yes 를 누릅니다.



7. 쨔-잔~!! ERD 가 뽑아져 나왔네요! ^-^




자, 바로 이어서 Logical 을 Comment 로 바꾸는거 나갑니다~! ^-^



* ERD Comment 를  Logical 로 변경하기

8. Logical 로 변경할 테이블을 선택 합니다. 
(선택하면 아래처럼 빨간 네모 박스처럼 선택된 테이블은 윗대가리가 까맣네요! ^-^)
전체 선택 할꺼면 Ctrl + A



9. 다음엔 무슨작업을 할꺼냐면... 중요!!!!!!!!

Logical 변경 값에 따라 Physical 값도 같이 변경 되기 때문에 둘을 분리 하는 작업입니다.
위에서 테이블을 선택 한 다음 마우스 오른쪽을 누른 후 Harden Physical Names 를 선택합니다.

그럼 Logical 이름과 Physical 이름이 따로 가게 됩니다 ^^



상태 창에 다음과 같은  Action 이 쭈욱~ 떨어지게 됩니다 ^^



10. 뭐가 변경되었는지 궁금하신지 보여 드리겠습니다. 

Model - Columns.. 를 선택합니다.



11. Rename  을 선택합니다.



12. Harden Physical Names 을 선택 하기 이전에는 다음과 같이 Attrivute* 이렇게 " * " 표시 모양이 있는데 Harden Physical Names  을 선택한 후에는 " * " 표시가 없습니다 ^^

변경전 >>


변경후>>


13. Physical 을 Logical 로 변경 합니다 (단축기는 Ctrl + Up & Down)



14.  Model - Domain Dictionary .. 를 선택합니다.



15. 
Edit Mode  : Logical 
Name Inherited by Attribute:* : %ColumnComment 
로 설정 합니다.

Name Inherited by Attrbute 의 값은 Macro Toolbox 를 누르면 선택이 가능합니다.



Attribute Macro  에 보면, 



%ColumnComment 를 선택 한 후 Insert Macro 한 후 Close  합니다.



16.  다음과 같이 %ColumnComment 만을 남겨두고 %AttDomain 이 남아 있다면 지우고 OK 를 누릅니다. ^^



17. Model - Attributes.. 를 선택 합니다. (계속 Logical 모드임)



18. 메시지가 뜨네요~! ^^ 확인을 누릅니다.



19. Reset 을 누릅니다.




20. 

Resetting Attribute : Reset all attributes in model  (ERD 전체 변경)
Select Properties to Reset : Name

을 선택 한 후 OK 를 누릅니다.

Only attribute PAGE_COMPONENT_ID 라고 되어 있는건 
: (해당 컬럼 값의 속성만 변경 - PAGE_COMPONENT_ID 컬럼 )
All attribute of entity PAGE_COMPONENT 라고 되어 있는건 
: (해당 테이블에 속해있는 속성만 변경 - PAGE_COMPONENT 테이블)



21. 테이블 내에서 중복되는 이름(Comment) 에 대해서 나옵니다. 
이때 Help 는 누르면 자세한 도움말을 볼 수 있습니다. (Ok, cancle, rename 에 관하여 영문 설명이 나옵니다)
(중복 안되게 변경해 주면 됩니다)



22. 이름으로 변경 된 화면을 감상 하실수 있습니다 ^-^ OK 를 눌러주세요!



23. Logical 일때의 모습입니다.



24. Physical 일때의 모습입니다.



테이블 명은 안바뀌는게 조금 아숩네요 -ㅅ-
혹, 테이블 명도 Comment 로 변경되는걸아시는분은 댓글 남겨 주세요~! ^_^

Comment 로 변경 안되더라도, 생 작업으로 변경 해 보도록 하겠습니다.


25. Model - Attribute 를 선택합니다.
Entity 에 변경할 테이블을 선택 한 후 Entity 이름 옆의 .... 를 누릅니다.



26. Name 이 있죠?!
저 Name 을 한글로 변경 한 후 OK 누르시면 됩니다 ^-^




출처: http://joke00.tistory.com/168 [Smile virus]




Harden Logical Names를 선택해 준 이유는 아래도 써 놨듯이, 이 작업을 수행하지 않으면, Column의 Comment가 변경되면 논리명도 자동으로 변경되기 때문입니다. ERwin r7에서는 다행이 이 기능을 지원하기 때문에 이후의 Comment 변경이 논리명에 영향을 주지 않도록 할 수 있습니다.

논리명과 물리명에 대한 수정 작업을 위해서는 다신 논리모델과 물리모델에서 전체를 선택하고 Unharden Logical Name과 Unharden Physical Name을 선택하면 됩니다 ^^

출처: http://joke00.tistory.com/168 [Smile virus]

반응형
반응형

오라클 SR 처리를 위해

아래와 같은 정보를 수집하면 편하다...

ulimit -a : 메모리 정보

uname -a : OS 정보

adrci : 문제가 발생한 내역 압축하기 (ips 명령 사용)

opatch : 현재 패치 내역 조회하기



testdb01:/oracle_test] ulimit -a

time(seconds)        unlimited

file(blocks)         unlimited

data(kbytes)         2000000

stack(kbytes)        8192

memory(kbytes)       unlimited

coredump(blocks)     4194303

testdb01:/oracle_test] uname -a

HP-UX testdb01 B.11.23 U ia64 1770507378 unlimited-user license



testdb01:/tmp] adrci


ADRCI: Release 11.1.0.7.0 - Production on Sat Jan 13 09:25:50 2018


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


ADR base = "/oralog_test/dblog"

adrci> show problem


ADR Home = /oralog_test/dblog/diag/rdbms/testdb/testdb1:

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

PROBLEM_ID           PROBLEM_KEY                                                 LAST_INCIDENT        LASTINC_TIME                             

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

14                   ORA 600 [kjuscv]                                            1630464              2018-01-12 22:36:29.336735 +09:00       

13                   ORA 600 [kjucvl:!busy]                                      1630463              2018-01-12 22:36:25.059486 +09:00         

14 rows fetched


adrci> show incident


ADR Home = /oralog_test/dblog/diag/rdbms/testdb/testdb1:

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

INCIDENT_ID          PROBLEM_KEY                                                 CREATE_TIME                              

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

1630464              ORA 600 [kjuscv]                                            2018-01-12 22:36:29.336735 +09:00       

1630463              ORA 600 [kjucvl:!busy]                                      2018-01-12 22:36:25.059486 +09:00       

 

50 rows fetched


adrci> ips pack problem 13 in /tmp

Generated package 9 in file /tmp/ORA600kju_20180113092623_COM_1.zip, mode complete

adrci> ips pack problem 14 in /tmp 

Generated package 10 in file /tmp/ORA600kju_20180113092815_COM_1.zip, mode complete

adrci> ips pack incident 1630464 in /tmp

Generated package 11 in file /tmp/ORA600kju_20180113092948_COM_1.zip, mode complete

adrci> ips pack incident 1630463 in /tmp

Generated package 12 in file /tmp/ORA600kju_20180113093112_COM_1.zip, mode complete


opatch lsinventory

반응형
반응형

오라클 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

반응형

+ Recent posts