|
Oracle 2017. 10. 18. 14:11
DB Link 설정을 그동안 사용하면서 많이 사용을 안해서 그런지 이런 오류 메세지를 만난적이 없었다.
그러다 오늘 알게되었기에 오라클 문서를 확인하고 기록으로 남기기 위해 작성한다.
ORA-02020 too many database links in use Cause: The current session has exceeded the INIT.ORA open_links maximum.
Action: Increase the open_links limit, or free up some open links by committing or rolling back the transaction and canceling open cursors that reference remote databases.
이런 오류 메시지를 만났다면 Open_links parameter 설정을 확인해주어야 한다는 의미다.
OPEN_LINKSOPEN_LINKS specifies the maximum number of concurrent open connections to remote databases in one session. These connections include database links, as well as external procedures and cartridges, each of which uses a separate process.
출처 : http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams164.htm#REFRN10138
해당 파라미터의 초기값은 4개이다. 결론부터 얘기하면 DB Link 설정 갯수가 4개보다 많기 때문에 위와 같은 오류 메세지를 보게 되었다는 얘기입니다. 따라서, 추가로 생성해야 하는 상황이라면 이 값을 조정해주시면 됩니다. 위의 설정 값을 확인하기 위해서는 "select name, value from v$parameter where name='open_links'; "와 같은 Query로도 확인이 가능합니다. ( sqlplus에서라면.. show parameter open_links로도 확인 가능) 값의 조정은 init.ora 파일에서 직접해도 되고, "alter system set open_links=10 scope=spfile;" 와 같이 조정해도 됩니다. 값은 필요한 만큼 조정하시되, 위에 보시면 최대 값이 255인것을 감안하시면 됩니다. 값이 조정되었다면 이를 반영하기 위해서는 DBMS를 Restart 시켜주어야 반영됨을 잊지 마세요.
이외에 참고로 DB Link에 연관된 파라미터 정보와 제한 정보는 아래와 같습니다. 참고하시기 바랍니다. dblink Specify the complete or partial name of the database link. If you specify only the database name, then Oracle Database implicitly appends the database domain of the local database. Use only ASCII characters for dblink . Multibyte characters are not supported. The database link name is case insensitive and is stored in uppercase ASCII characters. If you specify the database name as a quoted identifier, then the quotation marks are silently ignored. If the value of the GLOBAL_NAMES initialization parameter is TRUE , then the database link must have the same name as the database to which it connects. If the value of GLOBAL_NAMES is FALSE , and if you have changed the global name of the database, then you can specify the global name. The maximum number of database links that can be open in one session or one instance of an Oracle RAC configuration depends on the value of the OPEN_LINKS and OPEN_LINKS_PER_INSTANCE initialization parameters. Restriction on Creating Database Links You cannot create a database link in another user's schema, and you cannot qualify dblink with the name of a schema. Periods are permitted in names of database links, so Oracle Database interprets the entire name, such as ralph.linktosales , as the name of a database link in your schema rather than as a database link named linktosales in the schema ralph .) |
출처 : http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_5005.htm#SQLRF01205
Oracle 2015. 4. 8. 11:11
| OPN 혜택 및 리소스 | Silver | Gold | Platinum | Diamond | 파트너 환영 키트 | | | | | 안전한 OPN 파트너 웹 사이트 액세스 | | | | | 자료실 컨텐츠의 제한적 이용 | Cloud Services, 1-Click 및 Oracle Database Appliance 자료실 | | | | 파트너 뉴스레터 | | | | | Oracle Partner Business Center | | | | Global Diamond Desk | 전화를 통한 파트너 관리 지원1 | | | | | 전담 오라클 파트너 비즈니스 컨설턴트 | | | | | Oracle OpenWorld에서 파트너 포럼 및/또는 라운지에 참가하여 솔루션 소개2 | | | | | 세일즈 부문 부사장/경영진 후원자와의 미팅에 초대 | | | | | 파트너 자문 위원회 참가2 | | | | | 경영진 파트너 포럼 참가2 | | | | | Partner Award 수상 자격1 | | | | | Global Alliance Manager 지정 | | | | | 오라클 경영진 후원 | | | 지역별 | 글로벌 | 역량 강화 혜택 및 툴 | Silver | Gold | Platinum | Diamond | 파트너 전용 온라인 세미나, 선별된 이벤트와 워크숍 참석2 | | | | | Oracle University의 e러닝 컨텐츠 라이브러리 액세스 | | | | | Competency Center에서 제공하는 지침 학습 과정(GLP)을 통한 파트너별 교육 이용1 | Cloud Services, 1-Click 제품 및 Oracle Database Appliance | | | | Enablement 2.0 Boot Camp1 | Cloud Services, 1-Click 제품 및 Oracle Database Appliance | | | | Oracle University 제품 및 서비스에 대한 할인1 | 20% | 25% | 25% | 25% | OPN 멤버쉽 가입 또는 갱신 후 처음 30일 이내에 구입하는 Oracle University 학습 크레딧에 대한 할인 | 35% | 35% | 35% | 35% | OPN 멤버쉽 가입 또는 갱신 후 처음 30일 이내에 구입하는 SSCD(Self-Study CD)에 대한 할인 | 35% | 35% | 35% | 35% | 라이브 가상 강의(LVC)에 대한 할인1 | 20% | 25% | 30% | 30% | 시험 바우처에 대한 할인 | 20% | 25% | 25% | 25% | 무료 평가/시험 바우처1 | | 2 | 6 | 6 -100(Worldwide 파트너) | 개발 혜택 및 툴 | Silver | Gold | Platinum | Diamond | 테크놀로지 프로그램에 대한 개발 라이센스5 | 1-Click 제품 및 Oracle Database Appliance | 에 나와 았음 | 에 나와 았음 | 에 나와 았음 | Oracle Validated Integration | | 수수료 방식 | 할인 | 할인 | SOA 기반의 Oracle Validated Integration1 | | 수수료 방식 | 1개 포함 | 1개 포함 | 오라클 제품으로의 마이그레이션을 지원하기 위한 리소스(툴 키트, 워크벤치 및 타사 마이그레이션 제공업체)1 | | | | | 사전에 베타 프로그램 신청 가능 | | | | | 마케팅 혜택 및 툴 | Silver | Gold | Platinum | Diamond | Oracle.com/events에 파트너 이벤트 게시 가능 | | 전문화된 기술력과 솔루션을 갖춘 경우 | | | 오라클 파트너 브랜드 및 로고 사용1 | | | | | Oracle.com에 소개1 | | | | | Oracle Cloud Marketplace에 게시 신청4 | | | 우선 홍보 기회 | 우선 홍보 기회 | 마케팅 키트1 | Cloud Services, 1-Click 제품 및 Oracle Database Appliance | | | | 오라클 출판물 광고비 할인(인쇄 및 디지털) | 25% | 35% | 40% | 50% | 오라클 관련 정보를 심층적으로 다룬 뉴스레터 후원에 대한 할인 혜택 | 25% | 35% | 40% | 50% | 마케팅 캠페인을 위한 연락처 목록 액세스1 | | | | | MDF(Marketing Development Funds) 신청1 | | | | | 전담 글로벌 파트너 마케팅 관리자 | | | | | 공동 고객 성공 사례에 대한 전문적인 개발1 | | | | | Oracle Magazine의 파트너 뉴스 섹션에서 홍보1 | | | | | 홍보(PR) 지원 및 가이드라인1 | | | 공동 보도 자료 | 공동 보도 자료 | Oracle Cloud Marketplace 또는 AppCloud Marketplace에 승인된 통합에 대한 보도 자료 게시4 | | | | | Google 애드워즈 캠페인의 오라클 상표 | | | | | JavaONE 및 Oracle OpenWorld에서 솔루션 소개1 | | | | | 오라클 고객을 직접 만나는 자리에서 연설1 | | | | | 오라클 내부용 활동에서 연설할 수 있는 기회4 | | | | | 판매 혜택 및 툴 | Silver | Gold | Platinum | Diamond | 각 자료실에 나와 있는 멤버쉽 레벨 및 리셀러 자격 조건 달성에 따라 공인된 오라클 제품 및 서비스 판매1 | 1-Click 제품 및 Oracle Database Appliance | | | | 오라클 프로그램 및 서비스 판매를 위한 OPN 멤버 할인 가격1 | 1-Click 제품 및 Oracle Database Appliance | | | | 세일즈 키트1 | Cloud Services, 1-Click 제품 및 Oracle Database Appliance | | | | OMM 정책에 따라 결정되는 Oracle Open Market Model(OMM) Resale Initiative를 통해 순 신규 영업 기회 등록1 | | | | | OMM 정책에 따라 결정되는 OMM Referral Initiative를 통해 오라클 비즈니스를 추천하는 경우 보상1 | | | | | Oracle OMM Non-commission Co-Sell Initiative를 통해 오라클 영업 기회를 등록하는 경우 인지도 강화1 | | | | | 고객에게 Oracle Financing 제공1 | | | | | 테크놀로지 및 애플리케이션 프로그램을 위한 데모 라이센스5 | 1-Click 제품 및 Oracle Database Appliance | 에 나와 았음 | 에 나와 았음 | 에 나와 았음 | Oracle PartnerNetwork Solutions Catalog를 통해 가시성 확보1 | | | 우선 배치 및 홍보 | 우선 배치 및 홍보 | Oracle PartnerNetwork Solutions Catalog를 통해 영업 기회 창출1 | | | | | 내부용으로 사용할 오라클 프로그램 라이센스 구입 시 할인1 | | | | | 내부용으로 사용할 CRM On-Demand 프로그램 라이센스 구입 시 할인1 | | | | | 비즈니스 실무 및 가격 정보 교육1 | | | | | 국제적인 부패 방지 교육1 | | | | | 지원 혜택 및 툴 | Silver | Gold | Platinum | Diamond | Oracle Solaris, Solaris Cluster 및 Solaris Studio 업데이트 및 패치 이용5 | | | | | OPN SI(Support IdentifierI)를 통해 "My Oracle Support" 이용5 | 1-Click 제품 및 Oracle Database Appliance | | | | 소프트웨어 업그레이드 및 패치 (테크놀로지 및 애플리케이션 제품만 해당) - 현 오라클 지원 제품 및 릴리스5 | 1-Click 제품 및 Oracle Database Appliance | | | | Partner Business Center의 지원 서비스 | 1-Click 제품 및 Oracle Database Appliance | | | | 특별 파트너 할인 가격으로 SR(Service Request) 패키지 구입1 (테크놀로지 및 애플리케이션 제품만 해당) | | | | | 개발, 데모 및 통합 라이센스와 함께 사용할 무료 SR(Service Request)1 | | | | | Enterprise Linux Basic Support 서비스 및 Oracle VM Premier Support 서비스를 통해 무료 SR을 사용하여 파트너의 Linux 및 Oracle VM 개발 시스템 지원1 | | | | | Linux Basic Support 서비스 및 Oracle VM Premier Support 서비스를 위한 패치/업데이트를 다운로드하여 OPN 멤버의 Linux 및 Oracle VM 개발 시스템 지원 | | | | | 파트너의 Linux 및 Oracle VM 개발 시스템을 위한 Linux 및 Oracle VM 지원 서비스 가격 할인1 | | | | | OCVS(Oracle Collaborative Vendor Support) 프로그램 이용1 | | | | | 파트너 내부용으로 사용할 ACS(Advanced Customer Services)에 대한 할인1 | Linux 및 VM 전용 | | | | ACS(Advanced Customer Services) 파트너 팀에 대한 개별적 액세스1 | | | | | ACS의 혜택에 대한 보완적 컨설팅1 | | | | | ACS(Advanced Customer Services) 내부 웹 페이지에 대한 OPN 멤버 노출1 | | | | | 공동 캠페인을 위한 ACS(Advanced Customer Services)의 공동 마케팅 및 영업 기회 창출 지원1 | | | | | 유효한 ASFU/ESL 협약을 체결한 OPN 멤버를 위한 기술 지원 SR(Service Request) 및 확장된 지원 패키지8 | | | | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready 및 Oracle Exastack Optimized와 관련된 혜택 및 툴 | Silver | Gold | Platinum | Diamond | 새로운 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready 및 Oracle Exastack Optimized 알림 및 오리엔테이션 통지1 | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 안전한 OPN 전문화 리소스 센터 이용 | | 전문화 프로그램 | 전문화 프로그램 | 전문화 프로그램 | Oracle Exastack Optimized 로고 | | Oracle Exastack Optimized | Oracle Exastack Optimized | Oracle Exastack Optimized | OPN 전문화(Specialized) 로고1 | | 전문화 프로그램 | 전문화 프로그램 | 전문화 프로그램 | Oracle Exastack Ready 로고 | | Oracle Exastack Ready | Oracle Exastack Ready | Oracle Exastack Ready | Oracle Validated Integration 로고 | | Oracle Validated Integration | Oracle Validated Integration | Oracle Validated Integration | OPN 고급 전문화 프로그램 로고 | | 고급 전문화 프로그램 | 고급 전문화 프로그램 | 고급 전문화 프로그램 | 뉴스레터, 웹 사이트, 광고 등으로 홍보1 | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | OPN Solutions Catalog에 우선 배치 | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 오라클의 내부 파트너 찾기 시스템에 우선 배치1 | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 내부 뉴스레터에 발표1 | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 무료 시험 바우처1 | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 보도 자료에 오라클 경영진의 인용구 사용1 | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 오라클 회의실 시설 이용1 | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 데모 서비스 이용1, 4 | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized / 우선 이용 | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized / 우선 이용 | 무료 지원 SR(Service Request) (테크놀로지 및 애플리케이션 제품만 해당)1, 3 | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | Enterprise Linux Basic Support 서비스 및 Oracle VM Premier Support 서비스를 통해 무료 지원 SR(Service Request)로 파트너의 Linux 및 Oracle VM 개발 시스템 지원1, 3 | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 제품 릴리스 준비 자료1 | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 구현 방법 이용1 | | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized | 전문화 프로그램, Oracle Validated Integration, Oracle Exastack Ready, Oracle Exastack Optimized |
|
위에 열거된 OPN 혜택은 OPN 정책, OPN 협약 및 해당하는 모든 부록 또는 개정 조항의 조건에 의거하여 OPN 멤버에게 제공됩니다. 지역별 제한 사항에 따라 혜택의 제공 여부가 다를 수 있습니다. 혜택이 오라클의 독자적인 판단에 따라 제공된다고 이 혜택 표에 나와 있는 경우 해당 혜택의 제공 여부에 관한 오라클의 결정이 최종 결정이 됩니다.
미국 및 캐나다: 미국 및 캐나다 지역에서 활동하는 파트너는 전문화 자격을 얻기 위해 공공 부문 기관과의 거래를 포함시킬 수 있습니다. 그러나 공공 부문 기관과의 거래는 거래 건수, 매출, 기타 세일즈 기반의 메트릭 등을 토대로 제공되는 전문화 영역 또는 Oracle PartnerNetwork 멤버쉽과 관련된 혜택(전문화 상태 및 관련 로고 사용 이외)을 결정하는 데는 포함되지 않습니다. 공공 부문은 정부, 입법/의사결정 기구, 사법기관, 정부대행기관, 정부부처, 국가/지방/시 단위의 국가행정기관, 정부가 관리하거나 대부분의 지분을 소유하고 있는 공기업, 정당이나 정치조직 등과 같은 공공기구나 재단, 국제 적십자사나 UN, 세계은행 등과 같은 국제기구, 공립 대학교, 공립 초/중/고등학교, 공공 보건 기관 등의 공공 부문 기관 등을 말합니다. 전문화된 기술력과 솔루션을 갖춘 오라클 파트너에게 제공되는 혜택과 툴의 제공 여부는 OPN 정책에 따라 결정됩니다.
Oracle PartnerNetwork 멤버는 혜택 제공 중지 정책을 반드시 검토하십시오.
오라클은 독자적인 판단에 따라 언제든지 OPN 혜택 표 중 잘못되거나 누락된 부분을 수정할 수 있는 권리를 갖습니다.
2009년 11월 또는 그 이후에 OPN 전문화 프로그램으로 마이그레이션하지 않은 파트너는http://www.oracle.com/ocom/groups/public/@opnpublic/documents/webcontent/019737.pdf에 명시된 혜택을 받을 수 있습니다.
각주: - 본 혜택은 미국 정부 기관(연방, 주 및 지역 정부, 공익 사업체 및 고등 교육 기관 포함) OPN 멤버에게는 제공되지 않습니다.
- 미국 정부 기관(연방, 주 및 지역 정부, 공익 사업체 및 고등 교육 기관 포함) OPN 멤버는 본 혜택을 이용하기 전에 관할 법률 또는 윤리 담당자의 승인 증명을 Political Compliance의 Oracle Director에게 제공해야 합니다.
- 이 혜택은 OPN 정책에 따라 (a) 공공 부문 기관과의 거래 및/또는 (b) 공공 부문 기관의 고객 레퍼런스를 사용하여 비즈니스 조건을 충족하는 방식으로 전문화된 기술력과 솔루션을 갖춘 파트너 입지를 확보한 미국 또는 캐나다의 OPN 멤버에게는 제공되지 않습니다.
- 이러한 혜택을 이용하려면 추가 조건을 충족해야 합니다. 조건에 대한 자세한 설명을 검토하십시오.
- 이 혜택은 MOS(My Oracle Support)에 적용되지 않습니다. 자세한 내용은 오라클 소프트웨어 기술 지원 정책과 오라클 하드웨어 및 시스템 지원 정책을 참조하십시오.http://oracle.com/contracts.
|
|
reference : http://www.oracle.com/partners/campaign/specialized-benefits-036151-ko.html
Oracle 2014. 2. 12. 20:34

이 문서에서
적용 대상:Oracle Net Services - 버전 11.1.0.6 to 11.2.0.3 [릴리즈 11.1 to 11.2] 이 문서의 내용은 모든 플랫폼에 적용됩니다.
목적
ORA-609 에러는 alert.log 에 보고된다. 이 에러는 간헐적으로 발생하고 몇일 동안 발생하지 않을 수도 있다.
Mon Oct 12 10:03:39 2009 Errors in file e:\app\oracle\diag\rdbms\center\center\trace\center_ora_7464.trc: ORA-00609: could not attach to incoming connection ORA-12537: TNS:connection closed ORA-609 : opiodr aborting process unknown ospid (2436_7464)
데이타베이스 서버에 지역적으로 발생하는 sqlnet.log 화일에 이 에러가 발생할 수 있다.:
Fatal NI connect error 12537, connecting to: (LOCAL=NO)
VERSION INFORMATION: TNS for 64-bit Windows: Version 11.1.0.7.0 - Production Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.1.0.7.0 - Production Time: 12-OCT-2009 10:03:39 Tracing to file: E:\app\oracle\product\11.1.0\db_1\NETWORK\trace\svr1_7464.trc Tns error struct: ns main err code: 12537 TNS-12537: TNS:connection closed ns secondary err code: 12560 nt main err code: 0 nt secondary err code: 0 nt OS err code: 0
listener.log에는 명확한 에러 없이 접속이 맺어졌다는 것을 보여준다. 이것은 리스너가 접속을 서버 프로세스에게 전달해 준 이후에 접속이 실패했기 때문이다.
12-OCT-2009 10:03:39 * (CONNECT_DATA=(SID=ORCL)) * (ADDRESS=(PROTOCOL=tcp)(HOST=123.456.1.123)(PORT=3158)) * establish * ORCL * 0 12-OCT-2009 10:03:39 * (CONNECT_DATA=(SID=ORCL)) * (ADDRESS=(PROTOCOL=tcp)(HOST=123.456.1.123)(PORT=3159)) * establish * ORCL * 0
아래의 Oracle Net 서버 트레이스화일에서 주목할 부분은 화일이름 "svr_7464.trc"이다.
여기서 문제는 접속 패킷을 클라이언트로부터 받을 때 나타난다. ORA-609 에러는 Oracle Net 트레이스에는 나타나지 않는다. ORA-609 에러는 트레이스 snippet에서 ns=12537 을 동반하면서 발생한다.
[000001 12-OCT-2009 10:03:39:116] nscon: doing connect handshake... [000001 12-OCT-2009 10:03:39:116] nscon: recving a packet [000001 12-OCT-2009 10:03:39:116] nsprecv: entry [000001 12-OCT-2009 10:03:39:116] nsprecv: reading from transport... [000001 12-OCT-2009 10:03:39:116] nttrd: entry [000001 12-OCT-2009 10:03:39:163] nttrd: exit [000001 12-OCT-2009 10:03:39:163] ntt2err: entry [000001 12-OCT-2009 10:03:39:163] ntt2err: Read unexpected EOF ERROR on 7104 [000001 12-OCT-2009 10:03:39:163] ntt2err: exit [000001 12-OCT-2009 10:03:39:163] nsprecv: error exit [000001 12-OCT-2009 10:03:39:163] nserror: entry [000001 12-OCT-2009 10:03:39:163] nserror: nsres: id=0, op=68, ns=12537, ns2=12560; nt[0]=507, nt[1]=0, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0 [000001 12-OCT-2009 10:03:39:163] nscon: error exit [000001 12-OCT-2009 10:03:39:163] nsdo: nsctxrnk=0 [000001 12-OCT-2009 10:03:39:163] nsdo: error exit [000001 12-OCT-2009 10:03:39:163] nsinh_hoff: error recving request
Alert log와 Oracle Net 트레이스를 통해서 ORA-609 에러를 트레이스하는 다른 방법을 보여주는데, 핸드쉐이크하는 동안에 이슈가 나타나는 것을 보여준다.
아래는 Alert log를 보여준다.:
Mon Dec 21 15:52:15 2009 ORA-609 : opiodr aborting process unknown ospid (21631120_1)
[21-DEC-2009 15:52:15:025] nscon: sending NSPTAC packet [21-DEC-2009 15:52:15:025] nspsend: entry
[21-DEC-2009 15:52:15:031] ntt2err: Read unexpected EOF ERROR on 14 [21-DEC-2009 15:52:15:031] ntt2err: exit [21-DEC-2009 15:52:15:031] nsprecv: error exit [21-DEC-2009 15:52:15:031] nserror: entry [21-DEC-2009 15:52:15:031] nserror: nsres: id=0, op=68, ns=12537, ns2=12560; nt[0]=507, nt[1]=0, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0 [21-DEC-2009 15:52:15:031] nsrdr: error exit [21-DEC-2009 15:52:15:031] nsdo: nsctxrnk=0 [21-DEC-2009 15:52:15:031] nsdo: error exit [21-DEC-2009 15:52:15:031] nsnareceive: error exit [21-DEC-2009 15:52:15:031] nserror: entry [21-DEC-2009 15:52:15:031] nserror: nsres: id=0, op=68, ns=12537, ns2=12532; nt[0]=0, nt[1]=0, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0 [21-DEC-2009 15:52:15:031] nacomrc: received 12637 bytes [21-DEC-2009 15:52:15:031] nacomrc: failed with error 12637 [21-DEC-2009 15:52:15:031] nacomrc: exit [21-DEC-2009 15:52:15:031] na_receive_packet: failed with error 12637 [21-DEC-2009 15:52:15:031] na_receive_packet: exit [21-DEC-2009 15:52:15:031] na_server: failed with error 12637
인스턴스에 지역적인 sqlnet.log를 통해서 일치하는 에러 메시지를 발견할 수 있다.
다음은 그 예를 보여준다.
Fatal NI connect error 12537, connecting to: (LOCAL=NO)
VERSION INFORMATION: TNS for Solaris: Version 11.2.0.2.0 - Production Oracle Bequeath NT Protocol Adapter for Solaris: Version 11.2.0.2.0 - Production TCP/IP NT Protocol Adapter for Solaris: Version 11.2.0.2.0 - Production Time: 21-DEC-2009 15:52:15 Tracing not turned on. Tns error struct: ns main err code: 12537 TNS-12537: TNS:connection closed ns secondary err code: 12560 nt main err code: 0 nt secondary err code: 0 nt OS err code: 0
Oracle Net 서버 트레이스 안에 event에 매치되는 것을 보여준다.
진단 절차
1. listener.log로부터 접속을 맺는 클라이언트를 찾아낸다. Alert log는 다음과 유사한 ORA-609 에러를 나타낸다. :
Mon Oct 05 12:41:49 2009 ORA-609 : opiodr aborting process unknown ospid (21131406_1)
Listener.log로 가서 이 접속에 일치하는 엔트리를 찾아본다. Listener.log 내 엔트리는 아래의 예처럼 보일 것이다.:
05-OCT-2009 12:41:49 * (CONNECT_DATA=(SID=orcl)) * (ADDRESS=(PROTOCOL=tcp)(HOST=sample.com)(PORT=1234)) * establish * orcl * 0
위 예제에서 클라이언트 주소값이 "sample.com"임을 주목하여야 한다. 한가지 옵션은 그 사이트에서 몇 개의 클라이언트를 위치시키고, 클라이언트 트레이싱을 활성화하는 것이다. 클라이언트 사이드에서 $ORACLE_HOME/network/log 화일을 확인해야 하고 동일한 timestamp 시점에 발생한 timeout 에러에 대해 명시적으로 확인해야 한다.
2. Oracle Net 트레이싱을 클라이언트 레벨 16으로 걸어서 확인한다. 클라이언트 SQLNET.ORA 화일 안에 아래와 같이 추가한다.
DIAG_ADR_ENABLED=off # Diable ADR if version 11g
TRACE_LEVEL_CLIENT = 16 # Enable level 16 trace TRACE_TIMESTAMP_CLIENT = ON # Set timestamp in the trace files TRACE_DIRECTORY_CLIENT = <DIRECTORY> # Control trace file location
TRACE_FILELEN_CLIENT =<n> #Control size of trace set in kilobytes eg 20480 TRACE_FILENO_CLIENT =<n> #Control number of trace files per process
만일 접속 모델이 JDBC Thin이라면 클라이언트 사이드의 Java 트레이싱이 필요하므로, Document 793415.1 How to Perform the Equivalent of SQL*Net Client Tracing with Oracle JDBC Thin Driver 를 참고하도록 한다. 만일 11.2 JDBC Thin 클라이언트가 사용된다면 다음 노트가 활용될 수 있다. Document 1050942.1 How to Trace the Network Packets Exchanged Between JDBC and the RDBMS in Release 11.2
3. Oracle Net 트레이싱을 서버 사이드 레벨 16으로 걸어서 확인한다. 클라이언트 SQLNET.ORA 화일 안에 아래와 같이 추가한다.
DIAG_ADR_ENABLED=off # Diable ADR if version 11g TRACE_LEVEL_SERVER = 16 # Enable level 16 trace TRACE_TIMESTAMP_SERVER = ON # Set timestamp in the trace files TRACE_DIRECTORY_SERVER = <DIRECTORY> # Control trace file location
TRACE_FILELEN_SERVER =<n> #Control size of trace set in kilobytes eg 20480 TRACE_FILENO_SERVER =<n> #Control number of trace files per process
트레이싱을 순환하게 되면 생성되는 트레이스 화일의 갯수와 크기를 조절할 수 있다.
TRACE_FILELEN 파라미터는 트레이스 화일의 크기를 셋팅하기 위해 사용된다. TRACE_FILENO 파라미터는 프로세스 당 트레이스 화일의 갯수를 셋팅하기 위해 사용된다.
중요 노트:
SQLNET.ORA 화일은 프로세스 생성 시 단 한번 읽혀진다. RDBMS 백그라운드 프로세스와 SHARED 서버 디스패처는 sqlnet.ora 화일의 파라미터 변경이 반영될 수 있도록 재기동되어야 한다. 프로세스가 트레이싱되기 위해 기동이 되었다면 트레이스는 프로세스가 멈출 때까지 중단되지 않는다.
Oracle Net 서버 트레이싱을 활성화하면 짧은 시간 동안에 많은 양의 트레이스를 생성시킬 수 있다. 비록 순환적인 트레이싱을 하더라도 각 프로세스는 TRACE_FILENO_SERVER 에 지정한 갯수 만큼의 트레이스를 생성시킬 것이다. 최적의 트레이싱 워크플로우는 트레이싱을 활성화하고 문제를 재현하고 트레이싱을 비활성화시키는 것이다. 그러므로, 트레이싱하는 시간의 양을 제한하는 것이 활성화된다.
TRACE_FILENO_SERVER 를 1로 셋팅하고, TRACE_FILELEN_SERVER 를 20480로 셋팅하게 되면 프로세스 당 생성되는 트레이스의 양을 낮춰주기 위한 솔루션이다. 이렇게 셋팅하면 트레이스 화일이 overwrite되고, failure가 발생한 시점의 중요한 데이타를 유실할 수 있음을 명심해야 한다.
4. Errorstack: 에러가 났을 때를 대비해 errorstack 트레이스를 설정한다. 이것은 Oracle Net 클라이언트 트레이스를 캡춰하는 것이 쉽지 않을 때 적용한다.
SQL> alter session set events '609 errorstack(3)';
에러가 재현되는 동안 몇 개의 트레이스를 수집한다.
SQL> alter session set events '609 off';
만일 에러를 만났을 때에는 다음을 수행한다.:
- 서버에서 SQLNET.LOG 화일을 리뷰한다.
- ALERT. LOG 내에 timestamp를 비교하면서 일치하는 엔트리를 찾아본다.
- SQLNET.LOG 화일 내의 엔트리로부터 Oracle Net server trace 이름을 "Tracing to file"이라는 라인에서 찾을 수 있다.
- server 트레이스를 열어서 Connection ID 값에 대해서 grep 또는 찾아본다.
- 그런 다음, 같은 Connection ID 값에 대해서 클라이언트 트레이스 client 디렉토리를 찾아본다.
매칭되는 클라이언트와 서버 트레이스를 찾게 될 것이다. 이 절차는 이 문서에 자세히 소개되어 있다. Document 374116.1 How to Match Oracle Net Client and Server Trace Files
리뷰를 위해 다음을 업로드한다.:
- 매칭되는 Oracle Net 클라이언트와 서버 트레이스 또는 매칭되는 Javanet 과 서버 트레이스 화일.
- ALERT.LOG 와 LISTENER.LOG 화일. (전체의 로그 화일이 아니라 이슈를 커버하는 시간 대의 로그만 있으면 됨)
- 서버 ORACLE_HOME/network/log 아래의 SQLNET.LOG 화일
- errorstack 트레이스 화일.
알려진 이슈들:
- 종종 ORA-609 에러가 접속이 완전히 이루어지기 전에 클라이언트가 접속이 끊기면서 발생한다. LISTENER.ORA 안에 있는 Timeout 파라미터 INBOUND_CONNECT_TIMEOUT_<listener_name> 과 SQLNET.ORA 화일 안에 있는 SQLNET.INBOUND_CONNECT_TIMEOUT 파라미터를 리뷰할 필요가 있다. 기본 시간인 60초를 사용한다면(명시적인 셋팅 없이), 이 파라미터는 증가시킬 필요가 있다.
- 데이타베이스가 수행 중인 서버 머신에서 네트워크 파라미터 셋팅을 확인한다. 셋팅 값이 모두 맞게 되었는지, DNS 서버가 가용한 상태인지 확인한다.
- 서버 플랫폼이 Microsoft Windows인 경우, 각 서비스가 동일한 계정으로 정상 기동되었는지 데이타베이스와 TNS 리스너를 위한 Windows 서비스를 확인해야 한다.
REFERENCESNOTE:793415.1 - How to Perform the Equivalent of SQL*Net Client Tracing with Oracle JDBC Thin Driver NOTE:1050942.1 - How to Trace the Network Packets Exchanged Between JDBC and the RDBMS in Release 11.2 NOTE:609.1 - ORA-609 TNS-12537 and TNS-12547 in 11g Alert.log |
Oracle 2014. 2. 12. 16:14
- V$Option의 내용
PARAMETER |
VALUE |
Partitioning |
TRUE |
Objects |
TRUE |
Real Application Clusters |
FALSE |
Advanced replication |
TRUE |
Bit-mapped indexes |
TRUE |
Connection multiplexing |
TRUE |
Connection pooling |
TRUE |
Database queuing |
TRUE |
Incremental backup and recovery |
TRUE |
Instead-of triggers |
TRUE |
Parallel backup and recovery |
TRUE |
Parallel execution |
TRUE |
Parallel load |
TRUE |
Point-in-time tablespace recovery |
TRUE |
Fine-grained access control |
TRUE |
Proxy authentication/authorization |
TRUE |
Change Data Capture |
TRUE |
Plan Stability |
TRUE |
Online Index Build |
TRUE |
Coalesce Index |
TRUE |
Managed Standby |
TRUE |
Materialized view rewrite |
TRUE |
Database resource manager |
TRUE |
Spatial |
TRUE |
Automatic Storage Management |
FALSE |
Export transportable tablespaces |
TRUE |
Transparent Application Failover |
TRUE |
Fast-Start Fault Recovery |
TRUE |
Sample Scan |
TRUE |
Duplexed backups |
TRUE |
Java |
TRUE |
OLAP Window Functions |
TRUE |
Block Media Recovery |
TRUE |
Fine-grained Auditing |
TRUE |
Application Role |
TRUE |
Enterprise User Security |
TRUE |
Oracle Data Guard |
TRUE |
Oracle Label Security |
FALSE |
OLAP |
TRUE |
Basic Compression |
TRUE |
Join index |
TRUE |
Trial Recovery |
TRUE |
Data Mining |
TRUE |
Online Redefinition |
TRUE |
Streams Capture |
TRUE |
File Mapping |
TRUE |
Block Change Tracking |
TRUE |
Flashback Table |
TRUE |
Flashback Database |
TRUE |
Transparent Data Encryption |
TRUE |
Backup Encryption |
TRUE |
Unused Block Compression |
TRUE |
Oracle Database Vault |
FALSE |
Result Cache |
TRUE |
SQL Plan Management |
TRUE |
SecureFiles Encryption |
TRUE |
Real Application Testing |
TRUE |
Flashback Data Archive |
TRUE |
DICOM |
TRUE |
Active Data Guard |
TRUE |
Server Flash Cache |
TRUE |
Advanced Compression |
TRUE |
XStream |
TRUE |
Deferred Segment Creation |
TRUE |
Oracle 2013. 11. 15. 18:39
TRIM
Syntax  Description of the illustration trim.gif
Purpose TRIM enables you to trim leading or trailing characters (or both) from a character string. If trim_character or trim_source is a character literal, then you must enclose it in single quotation marks.
If you specify LEADING , then Oracle Database removes any leading characters equal to trim_character . If you specify TRAILING , then Oracle removes any trailing characters equal to trim_character . If you specify BOTH or none of the three, then Oracle removes leading and trailing characters equal to trim_character . If you do not specify trim_character , then the default value is a blank space. If you specify only trim_source , then Oracle removes leading and trailing blank spaces. The function returns a value with datatype VARCHAR2 . The maximum length of the value is the length of trim_source . If either trim_source or trim_character is null, then the TRIM function returns null.
Both trim_character and trim_source can be VARCHAR2 or any datatype that can be implicitly converted to VARCHAR2 . The string returned is of VARCHAR2 datatype if trim_source is a character datatype and a LOB if trim_source is a LOB datatype. The return string is in the same character set as trim_source . Examples This example trims leading zeros from the hire date of the employees in the hr schema: SELECT employee_id,
TO_CHAR(TRIM(LEADING 0 FROM hire_date))
FROM employees
WHERE department_id = 60
ORDER BY employee_id;
EMPLOYEE_ID TO_CHAR(T
----------- ---------
103 3-JAN-90
104 21-MAY-91
105 25-JUN-97
106 5-FEB-98
107 7-FEB-99
LTRIMSyntax  Description of the illustration ltrim.gif
Purpose LTRIM removes from the left end of char all of the characters contained in set . If you do not specify set , then it defaults to a single blank. If char is a character literal, then you must enclose it in single quotation marks. Oracle Database begins scanning char from its first character and removes all characters that appear in set until reaching a character not in set and then returns the result.
Both char and set can be any of the datatypes CHAR , VARCHAR2 , NCHAR , NVARCHAR2 , CLOB , or NCLOB . The string returned is of VARCHAR2 datatype if char is a character datatype, NVARCHAR2 if char is a national character datatype, and a LOB if char is a LOB datatype. The following example trims the redundant first word from a group of product names in the oe.products table: SELECT product_name, LTRIM(product_name, 'Monitor ') "Short Name"
FROM products
WHERE product_name LIKE 'Monitor%';
PRODUCT_NAME Short Name
-------------------- ---------------
Monitor 17/HR 17/HR
Monitor 17/HR/F 17/HR/F
Monitor 17/SD 17/SD
Monitor 19/SD 19/SD
Monitor 19/SD/M 19/SD/M
Monitor 21/D 21/D
Monitor 21/HR 21/HR
Monitor 21/HR/M 21/HR/M
Monitor 21/SD 21/SD
Monitor Hinge - HD Hinge - HD
Monitor Hinge - STD Hinge - STD
RTRIMSyntax  Description of the illustration rtrim.gif
Purpose RTRIM removes from the right end of char all of the characters that appear in set . This function is useful for formatting the output of a query.
If you do not specify set , then it defaults to a single blank. If char is a character literal, then you must enclose it in single quotation marks. RTRIM works similarly to LTRIM . Both char and set can be any of the datatypes CHAR , VARCHAR2 , NCHAR , NVARCHAR2 , CLOB , or NCLOB . The string returned is of VARCHAR2 datatype if char is a character datatype, NVARCHAR2 if expr1 is a national character datatype, and a LOB if char is a LOB datatype. The following example trims all the right-most occurrences of period, slash, and equal sign from a string: SELECT RTRIM('BROWNING: ./=./=./=./=./=.=','/=.') "RTRIM example" FROM DUAL;
RTRIM exam
----------
BROWNING:
reference : Oracle® Database SQL Language Reference - Oracle11gR1
그동안 너무 RTRM과 LTRIM만 사용한듯....
Oracle 2013. 11. 1. 19:49
I still find confusion out there about the LOGGING and NOLOGGING clauses when performing DML and DDL operations, the reality is that the NOLOGGING clause will work only on particular conditions, but all regular inserts,updates and deletes will still log the operations.
The benefits of the NOLOGGING option are:
- Will save disk space when the archive option is enabled.
- Will largely reduce I/O on the redologs.
- Will reduce the time it takes to complete the operation.
Please note that NOLOGGING operations will only reduce -not eliminate- the logging.
Lets see an example -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63 |
SQL> create table logging_example nologging as select * from dba_objects where 1=2;
Table created.
SQL> set autotrace on statistics
SQL> set timing on
SQL> alter system flush buffer_cache;
System altered.
Elapsed: 00:00:01.49
SQL> insert into logging_example select * from dba_objects;
50864 rows created.
Elapsed: 00:00:01.59
Statistics
0 recursive calls
5250 db block gets
6766 consistent gets
982 physical reads
5636712 redo size
670 bytes sent via SQL*Net to client
586 bytes received via SQL*Net from client
3 SQL*Net roundtrips to / from client
1 sorts (memory)
0 sorts (disk)
50864 rows processed
SQL> alter system flush buffer_cache;
System altered.
Elapsed: 00:00:01.06
SQL> insert /*+ append */ into logging_example select * from dba_objects;
50864 rows created.
Elapsed: 00:00:00.59
Statistics
0 recursive calls
743 db block gets
5374 consistent gets
944 physical reads
2200 redo size
654 bytes sent via SQL*Net to client
604 bytes received via SQL*Net from client
3 SQL*Net roundtrips to / from client
1 sorts (memory)
0 sorts (disk)
50864 rows processed
|
We can see that there is a big difference on the redo size generated by each insert, there are many post and articles on the internet that show the speed benefits when using the NOLOGGING option, but here I mainly want to clarify that a regular insert (no APPEND hint) will still generate redologs even if the table have been created with the NOLOGGING option.
What happens to the data after a restore when a nologging operation was performed on it?
I will present some scenarios to show the consequences when we need to perform a restore after a nologging transaction, this way we will know what to expect and we can better prepare ourselves in case of a disaster.
I took a full database backup, now I will create several tables with different options to see what happens after a restore, you might see some surprises here!
Scenarios:
- Table “create as select” with the nologging option (table_ctas_nologging).
- Regular table “create as select” (table_ctas_logging)
- A nologging table created empty, and a regular (logging) insert (table_ctas_nologging_insert)
- Table created with nologging, then two inserts, one with and one without logging (table_insert_mixed)
- Regular logging table, with a nologging index (table_ctas_index_nologging)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49 |
SQL> create table table_ctas_nologging nologging as select * from dba_objects;
Table created.
SQL> create table table_ctas_logging as select * from dba_objects;
Table created.
SQL> create table table_ctas_nologging_insert nologging as select * from dba_objects where 1=2;
Table created.
SQL> insert into table_ctas_nologging_insert select * from dba_objects;
50864 rows created.
SQL> commit ;
Commit complete.
SQL> create table table_insert_mixed nologging as select * from dba_objects where 1=2;
Table created.
SQL> insert into table_insert_mixed select * from dba_objects;
50866 rows created.
SQL> insert into table_insert_mixed select /*+ append */ * from dba_objects;
50866 rows created.
SQL> commit ;
Commit complete.
SQL> select count (*) from table_insert_mixed;
COUNT (*)
101732
SQL> create table table_ctas_index_nologging as select * from dba_objects;
Table created.
SQL> create index IDXNOLOG on table_ctas_index_nologging (object_id) nologging;
Index created.
|
Now I will shutdown the database and restore the tablespace from the backup. Next is an extract from RMAN
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56 |
rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Wed Aug 25 17:32:20 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database : ORCL (DBID=1247573001)
RMAN> shutdown immediate
using target database control file instead of recovery catalog
database closed
database dismounted
Oracle instance shut down
RMAN> startup mount;
Oracle instance started
database mounted
Total System Global Area 285212672 bytes
Fixed Size 1267068 bytes
Variable Size 155191940 bytes
Database Buffers 125829120 bytes
Redo Buffers 2924544 bytes
RMAN> restore tablespace users;
Starting restore at 25-AUG-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=152 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00004 to +DATA/orcl/datafile/users.259.719792191
channel ORA_DISK_1: reading from backup piece +DATA/orcl/backupset/2010_08_25/nnndf0_tag20100825t171657_0.272.727982219
channel ORA_DISK_1: restored backup piece 1
piece handle=+DATA/orcl/backupset/2010_08_25/nnndf0_tag20100825t171657_0.272.727982219 tag=TAG20100825T171657
channel ORA_DISK_1: restore complete, elapsed time : 00:00:05
Finished restore at 25-AUG-10
RMAN> recover tablespace users;
Starting recover at 25-AUG-10
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time : 00:00:05
Finished recover at 25-AUG-10
RMAN> alter database open ;
database opened
|
Now lets see the status of the tables:
1
2
3
4
5
6
7 |
SQL> select count (*) from table_ctas_nologging ;
select count (*) from table_ctas_nologging
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 4, block # 404)
ORA-01110: data file 4: '+DATA/orcl/datafile/users.259.719792191'
ORA-26040: Data block was loaded using the NOLOGGING option
|
That doesn’t look good, lets see the next table
1
2
3
4
5 |
SQL> select count (*) from table_ctas_logging ;
COUNT (*)
50863
|
Good, no problem here, the next scenario is more interesting, the table was created with the NOLOGGING option, but the inserts were done without the APPEND hint
1
2
3
4
5 |
SQL> select count (*) from table_ctas_nologging_insert;
COUNT (*)
50864
|
Good, no problem here, now let’s see our table with half data inserted with logging and half with nologging
1
2
3
4
5
6
7 |
SQL> select count (*) from table_insert_mixed;
select count (*) from table_insert_mixed
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 4, block # 4363)
ORA-01110: data file 4: '+DATA/orcl/datafile/users.259.719792191'
ORA-26040: Data block was loaded using the NOLOGGING option
|
Wow, the whole table is unredable!
Now lets see the table with the NOLOGGING index .
1
2
3
4
5 |
<pre>SQL> select count (*) from table_ctas_index_nologging;
COUNT (*)
50865
|
Ok, thats nice, the table is accessible, but what happend if we try to use the index?
1
2
3
4
5
6
7 |
SQL> select object_id from table_ctas_index_nologging where object_id=1;
select object_id from table_ctas_index_nologging where object_id=1
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 4, block # 2821)
ORA-01110: data file 4: '+DATA/orcl/datafile/users.259.719792191'
ORA-26040: Data block was loaded using the NOLOGGING option
|
I tried to rebuil the index but I was still getting the same error message, at the end I was forced to drop it and recreate it.
Conclusions:
- Use the NOLOGGING option only on temporary/working/staging tables.
- Always perform a backup after a NOLOGGING operation.
- Unless explicitly indicated, DDLs like CTAS and DMLs like inserts will log all operations.
FROM ORACLE DOCUMENTATION:
NOLOGGING is supported in only a subset of the locations that support LOGGING . Only the following operations support the NOLOGGING mode:
DML:
- Direct-path
INSERT (serial or parallel) resulting either from an INSERT or aMERGE statement. NOLOGGING is not applicable to any UPDATE operations resulting from the MERGE statement.
- Direct Loader (SQL*Loader)
DDL:
CREATE TABLE … AS SELECT
CREATE TABLE … LOB_storage_clause … LOB_parameters … NOCACHE | CACHE READS
ALTER TABLE … LOB_storage_clause … LOB_parameters … NOCACHE | CACHE READS (to specify logging of newly created LOB columns)
ALTER TABLE … modify_LOB_storage_clause … modify_LOB_parameters … NOCACHE |CACHE READS (to change logging of existing LOB columns)
ALTER TABLE … MOVE
ALTER TABLE … (all partition operations that involve data movement)
ALTER TABLE … ADD PARTITION (hash partition only)
ALTER TABLE … MERGE PARTITIONS
ALTER TABLE … SPLIT PARTITION
ALTER TABLE … MOVE PARTITION
ALTER TABLE … MODIFY PARTITION … ADD SUBPARTITION
ALTER TABLE … MODIFY PARTITION … COALESCE SUBPARTITION
CREATE INDEX
ALTER INDEX … REBUILD
ALTER INDEX … REBUILD [SUB]PARTITION
ALTER INDEX … SPLIT PARTITION
For objects other than LOBs, if you omit this clause, then the logging attribute of the object defaults to the logging attribute of the tablespace in which it resides.
For LOBs, if you omit this clause, then:
- If you specify
CACHE , then LOGGING is used (because you cannot have CACHE NOLOGGING ).
- If you specify
NOCACHE or CACHE READS , then the logging attribute defaults to the logging attribute of the tablespace in which it resides.
NOLOGGING does not apply to LOBs that are stored internally (in the table with row data). If you specify NOLOGGING for LOBs with values less than 4000 bytes and you have not disabled STORAGE IN ROW , then Oracle ignores the NOLOGGING specification and treats the LOB data the same as other table data.
reference : http://bit.ly/1aYFZw3
Oracle 2013. 8. 29. 12:34
Oracle DBMS의 Version별 OS Platform Certification 정보입니다.
Oracle 12c는 Windows 2003이 아예 빠져 버렸네요. 아무래도 Windows 2003의 지원 정책 때문인 것으로 사료됩니다.
12.1
- OS versions and minimum levels:
- Windows 2008
- Windows 2008 R2
- Windows 2012 (single instance only)
- Windows 7
- Windows 8
- Client certifications:
- Oracle provides both a 64-bit and 32-bit Windows client with Oracle Database 12.1 for Windows x64 releases
- 32-bit client is certified with all certified 64-bit versions of Windows
- 32-bit client is also certified on Windows x86 (32-bit) 7, 8, and 2008
- For complete details of OS versions supported, minimum levels, and other installation requirements see Oracle Database Installation Guide 12c Release 1 (12.1) for Windows.
11.2
11.1
10.2
- OS versions and minimum levels
- Windows XP
- Windows 7 (see note below)
- Windows Vista (see note below)
- Windows 2003
- Windows 2003 R2 (<10.2.0.2 or higher)
- iSQL*Plus version 10.2.0.3.0 and higher is certified 2003 and 2003 R2.
- Windows 2008 (See note below)
- Windows 2008 R2 (see note below)
- See Database Installation Guide for Microsoft Windows (64-bit) for the Minimum Operating System Requirements.
- RAC:
- Windows Vista, 7, Server 2008, and Server 2008 R2:
- Do not install Oracle Database 10g Release 2 on Windows Server 2008, Server 2008 R2, 7, nor Vista using the 10.2.0.1 version. You must use the 10.2.0.4 (64-bit) x64 version specifically created for these operating systems. After installation, for Windows 7 and Windows Server 2008 R2, patchset 10.2.0.5 or higher must be applied. For more information on installation see the release notes sections on the installation media:
출처 : Oracle Support - 문서 ID 1307195.1 발췌
Oracle 2013. 8. 29. 12:28
Current Interoperability Support Situation
The matrix below summarizes client and server combinations that are supported for the most commonly used product versions. A full matrix appears at the end of this document.
New interoperability problems will only be investigated if BOTH releases involved are covered by a valid support contract at the time that the issue is reported . eg:
A 11.1.0 client to an 11.2.0 server issue requires the customer to have a valid Extended Support contract for the 11.1.0 client in order for Oracle to investigate it.
Key:
Yes |
Supported |
LES |
Limited extended support previously applied to 9.2 releases but has now ended. |
ES |
Supported but fixes only possible for customers with Extended Support . |
Was |
Was a supported combination but one of the releases is no longer covered by any of Premier Support , Primary Error Correct support , Extended Support nor Extended Maintenance Support so fixes are no longer possible. |
No |
Has never been Supported | Specific Notes:
- #1 - See Note:207319.1
- #2 - An ORA-3134 error is incorrectly reported if a 10g client tries to connect to an 8.1.7.3 or lower server. See Note:3437884.8 .
- #3 - An ORA-3134 error is correctly reported when attempting to connect to this version.
- #4 - There are problems connecting from a 10g client to 8i/9i where one is EBCDIC based. See Note:3564573.8
- #5 - For connections between 10.2 (or higher) and 9.2 the 9.2 end MUST be at 9.2.0.4 or higher. Connections between 10.2 (or higher) and 9.2.0.1, 9.2.0.2 or 9.2.0.3 have never been supported.
- #6 - For connections between 11.1 (or higher) database server and 10.1 / 10.2 database server across a database link the 10g end MUST be at 10.1.0.5 / 10.2.0.2 (or higher) respectively in order to use PLSQL between those versions. (This does not apply to normal 11g clients to 10g database server only server to server and a few very specific client products, such as Oracle Forms). See Note:4511371.8 for more details.
- #7 - For database link connections between 11.1 (or higher) and 10.2 the 10g end MUST be at 10.2.0.2 (or higher) in order to use PLSQL between those versions. See Note:4511371.8 for more details.
- #8 - Attempting to connect from 9.2 to 12.1 will fail with an "ORA-28040: No matching authentication protocol" error.
General Notes:
- For database links between different Oracle versions connections must be supported in BOTH directions in the matrix above.
eg: As 11.2 -> 10.1 is not supported then database links between these version are not supported in either direction.
- Unsupported combinations may appear to work but can encounter errors for particular operations. The fact that they appear to work should not be relied upon - issues on unsupported combinations will not be investigated.
- Since new database servers are compatible with a limited set of older OCI clients, it may not be necessary to upgrade the client software when upgrading the database. However, some new features may not work without upgrading the client software. For example, an Oracle 10.2 client is able to connect to an 11.2 database, but is not able to take advantage of newer features such as Client Result Cache (introduced in 11.1).
- Oracle Applications , or other Oracle products, may have supported configurations not listed in the matrix above.
- The matrix above also applies between different platforms and between 32/64 bit releases of Oracle client / server except where any Oracle platform desupport notice indicates otherwise .
- Unix BEQUEATH (BEQ) connections are NOT supported between different releases. eg: Client 10.2 is not supported to make an Oracle Net connection to a 11.2 server using the BEQ protocol adapter regardless of the interoperability support listed above. See Note:364252.1 for more details.
Oracle Client Version별로 Oracle DB Server Version에 Support하는데 있어서 상호 호환성 여부를 정리한 자료입니다.
출처 : Oracle Support
Oracle 2013. 8. 21. 18:14
Oracle Database 12c : Tom’s Top 12 Things About the Latest Generation of Database Technology
Oracle 2013. 4. 9. 09:50
A Comparison of Oracle's DATE and TIMESTAMP Datatypes
By James Koopmann
If you want to store date and time information in Oracle, you really only have two different options for the column's datatype. Lets take a quick look at these two datatypes and what they offer.
DATE datatype
This is the datatype that we are all too familiar with when we think about representing date and time values. It has the ability to store the month, day, year, century, hours, minutes, and seconds. It is typically good for representing data for when something has happened or should happen in the future. The problem with the DATE datatype is its' granularity when trying to determine a time interval between two events when the events happen within a second of each other. This issue is solved later in this article when we discuss the TIMESTAMP datatype. In order to represent the date stored in a more readable format, the TO_CHAR function has traditionally been wrapped around the date as in Listing A.
LISTING A:
Formatting a date
SQL> SELECT TO_CHAR(date1,'MM/DD/YYYY HH24:MI:SS') "Date" FROM date_table;
Date
---------------------------
06/20/2003 16:55:14
06/26/2003 11:16:36
About the only trouble I have seen people get into when using the DATE datatype is doing arithmetic on the column in order to figure out the number of years, weeks, days, hours, and seconds between two dates. What needs to be realized when doing the calculation is that when you do subtraction between dates, you get a number that represents the number of days. You should then multiply that number by the number of seconds in a day (86400) before you continue with calculations to determine the interval with which you are concerned. Check out Listing B for my solution on how to extract the individual time intervals for a subtraction of two dates. I am aware that the fractions could be reduced but I wanted to show all the numbers to emphasize the calculation.
LISTING B:
Determine the interval breakdown between two dates for a DATE datatype
1 SELECT TO_CHAR(date1,'MMDDYYYY:HH24:MI:SS') date1,
2 TO_CHAR(date2,'MMDDYYYY:HH24:MI:SS') date2,
3 trunc(86400*(date2-date1))-
4 60*(trunc((86400*(date2-date1))/60)) seconds,
5 trunc((86400*(date2-date1))/60)-
6 60*(trunc(((86400*(date2-date1))/60)/60)) minutes,
7 trunc(((86400*(date2-date1))/60)/60)-
8 24*(trunc((((86400*(date2-date1))/60)/60)/24)) hours,
9 trunc((((86400*(date2-date1))/60)/60)/24) days,
10 trunc(((((86400*(date2-date1))/60)/60)/24)/7) weeks
11* FROM date_table
DATE1 DATE2 SECONDS MINUTES HOURS DAYS WEEKS
----------------- ----------------- ---------- ---------- ---------- ---------- ----------
06202003:16:55:14 07082003:11:22:57 43 27 18 17 2
06262003:11:16:36 07082003:11:22:57 21 6 0 12 1
TIMESTAMP datatype
One of the main problems with the DATE datatype was its' inability to be granular enough to determine which event might have happened first in relation to another event. Oracle has expanded on the DATE datatype and has given us the TIMESTAMP datatype which stores all the information that the DATE datatype stores, but also includes fractional seconds. If you want to convert a DATE datatype to a TIMESTAMP datatype format, just use the CAST function as I do in Listing C. As you can see, there is a fractional seconds part of '.000000' on the end of this conversion. This is only because when converting from the DATE datatype that does not have the fractional seconds it defaults to zeros and the display is defaulted to the default timestamp format (NLS_TIMESTAMP_FORMAT). If you are moving a DATE datatype column from one table to a TIMESTAMP datatype column of another table, all you need to do is a straight INSERTSELECT FROM and Oracle will do the conversion for you. Look at Listing D for a formatting of the new TIMESTAMP datatype where everything is the same as formatting the DATE datatype as we did in Listing A. Beware while the TO_CHAR function works with both datatypes, the TRUNC function will not work with a datatype of TIMESTAMP. This is a clear indication that the use of TIMESTAMP datatype should explicitly be used for date and times where a difference in time is of utmost importance, such that Oracle won't even let you compare like values. If you wanted to show the fractional seconds within a TIMESTAMP datatype, look at Listing E. In Listing E, we are only showing 3 place holders for the fractional seconds.
LISTING C:
Convert DATE datatype to TIMESTAMP datatype
SQL> SELECT CAST(date1 AS TIMESTAMP) "Date" FROM t;
Date
-----------------------------------------------------
20-JUN-03 04.55.14.000000 PM
26-JUN-03 11.16.36.000000 AM
Formatting of the TIMESTAMP datatype
1 SELECT TO_CHAR(time1,'MM/DD/YYYY HH24:MI:SS') "Date" FROM date_table
Date
-------------------
06/20/2003 16:55:14
06/26/2003 11:16:36
LISTING E:
Formatting of the TIMESTAMP datatype with fractional seconds
1 SELECT TO_CHAR(time1,'MM/DD/YYYY HH24:MI:SS:FF3') "Date" FROM date_table
Date
-----------------------
06/20/2003 16:55:14:000
06/26/2003 11:16:36:000
Calculating the time difference between two TIMESTAMP datatypes is much easier than the old DATE
datatype. Look at what happens when you just do straight subtraction of the columns in Listing F. As you can see, the results are much easier to recognize, 17days, 18hours, 27minutes, and 43seconds for the first row of output. This means no more worries about how many seconds in a day and all those cumbersome calculations. And therefore the calculations for getting the weeks, days, hours, minutes, and seconds becomes a matter of picking out the number by using the SUBSTR function as can be seen in Listing G.
LISTING F:
Straight subtraction of two TIMESTAMP datatypes
1 SELECT time1, time2, (time2-time1)
2* FROM date_table
TIME1 TIME2 (TIME2-TIME1)
------------------------------ ---------------------------- ----------------------
06/20/2003:16:55:14:000000 07/08/2003:11:22:57:000000 +000000017 18:27:43.000000
06/26/2003:11:16:36:000000 07/08/2003:11:22:57:000000 +000000012 00:06:21.000000
LISTING G:
Determine the interval breakdown between two dates for a TIMESTAMP datatype
1 SELECT time1,
2 time2,
3 substr((time2-time1),instr((time2-time1),' ')+7,2) seconds,
4 substr((time2-time1),instr((time2-time1),' ')+4,2) minutes,
5 substr((time2-time1),instr((time2-time1),' ')+1,2) hours,
6 trunc(to_number(substr((time2-time1),1,instr(time2-time1,' ')))) days,
7 trunc(to_number(substr((time2-time1),1,instr(time2-time1,' ')))/7) weeks
8* FROM date_table
TIME1 TIME2 SECONDS MINUTES HOURS DAYS WEEKS
------------------------- -------------------------- ------- ------- ----- ---- -----
06/20/2003:16:55:14:000000 07/08/2003:11:22:57:000000 43 27 18 17 2
06/26/2003:11:16:36:000000 07/08/2003:11:22:57:000000 21 06 00 12 1
System Date and Time
In order to get the system date and time returned in a DATE datatype, you can use the SYSDATE function such as :
SQL> SELECT SYSDATE FROM DUAL;
In order to get the system date and time returned in a TIMESTAMP datatype, you can use the SYSTIMESTAMP function such as:
SQL> SELECT SYSTIMESTAMP FROM DUAL;
You can set the initialization parameter FIXED_DATE to return a constant value for what is returned from the SYSDATE function. This is a great tool for testing date and time sensitive code. Just beware that this parameter has no effect on the SYSTIMESTAMP function. This can be seen in Listing H.
LISTING H:
Setting FIXED_DATE and effects on SYSDATE and SYSTIMESTAMP
SQL> ALTER SYSTEM SET fixed_date = '2003-01-01-10:00:00';
System altered.
SQL> select sysdate from dual;
SYSDATE
---------
01-JAN-03
SQL> select systimestamp from dual;
SYSTIMESTAMP
---------------------------------------------------------
09-JUL-03 11.05.02.519000 AM -06:00
When working with date and time, the options are clear. You have at your disposal the DATE and TIMESTAMP datatypes. Just be aware, while there are similarities, there are also differences that could create havoc if you try to convert to the more powerful TIMESTAMP datatype. Each of the two has strengths in simplicity and granularity. Choose wisely.
|