Skip to content
Advertisements

Posts from the ‘Administration’ Category

Troubleshooting Oracle Temporary Tablespaces

Refer

Master Note: Troubleshooting Oracle Temporary Tablespaces (Doc ID 1524594.1)

 

Advertisements

ORA-01157 ORA-01110 ORA-27041 OSD-04002 O/S-Error

I am trying to change the one of the database running on Window server with my domain user But this existing oracle service running on NT Services.

I renamed the database and created a new sid and service started by NT Services and then I tried to start the database, Its throwing the below error

 

SQL> startup pfile=’E:\oracle\INITSIEBUAT.ORA’;
ORACLE instance started.

Total System Global Area 7734296576 bytes
Fixed Size 8764936 bytes
Variable Size 1543504376 bytes
Database Buffers 6174015488 bytes
Redo Buffers 8011776 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 8 – see DBWR trace file
ORA-01110: data file 8: ‘E:\ORACLE\PRODUCT\12.2.0\DBHOME_1\DATABASE\S_DATA01’

 

I checked the alter log file

Errors in file E:\ORACLE\diag\rdbms\siebelbi\siebelbi\trace\siebelbi_dbw0_8316.trc:
ORA-01157: cannot identify/lock data file 9 – see DBWR trace file
ORA-01110: data file 9: ‘E:\ORACLE\PRODUCT\12.2.0\DBHOME_1\DATABASE\S_DATA02’
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.

 

But I have full rights of the directory but still I am facing the above issue

Solution:

 

I stopped the services and started the services Log on as Local Account, the database is opened.

 

 

How to exit out of ed in sql

When you try to edit using ed

SQL> ed
Wrote file afiedt.buf
35
q

1* select count(*) from dba_objects
SQL>

 

Solution :

type ‘ q ‘ and enter

 

Even sometime  if you type q and enter, not working

SQL> ed
Wrote file afiedt.buf
35
;djg;fg;
?
p
/
p
/
i
k
l
m
q
nm
n;

Solution

ctrl + D

 

Use editor vi

SQL> define_editor=vi

SQL> ed
Wrote file afiedt.buf

1* select count(*) from dba_objects where owner=’APPS’
SQL> /

COUNT(*)
———-
183940

Master Note for Handling Oracle Database Corruption Issues

Very useful document

 

Master Note for Handling Oracle Database Corruption Issues (Doc ID 1088018.1)

DDL Extract for tables

DDL Extract for tables

 

ALL Tables from user

set heading off;
set echo off;
Set pages 999;
set long 90000;

spool export_tables_ddl.sql

select dbms_metadata.get_ddl(‘TABLE’,table_name,’TESTUSER’) from user_tables;

 

spool off

 

*table_name — Don’t mention anything

 

 

A table

select dbms_metadata.get_ddl(‘TABLE’,’EMPLOYEE’) from dual

 

*EMPLOYEE – table name

ORA-19963 ORA-27041 OSD-04002

While doing restore controlfile to new host in windows server, getting below issue

ORA-19963: error getting logical block size of file F:\BACKUP\O1_MF_S_966071800_
F6C0G8CF_.BKP
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.

Solution :

Windows, you need to give full permission of directory to users which contents of backup files.

ORA-27102 OSD-00026 O/S-Error: (OS 1455)

I am trying to restore the database to new host, While doing the first step, I try to start the database,

SQL> startup nomount pfile=’F:\backup\init.ORA’;
ORA-32006: SEC_CASE_SENSITIVE_LOGON initialization parameter has been deprecated

ORA-00600: internal error code, arguments: [kmgs_component_init_5], [15], [], []
, [], [], [], [], [], [], [], []

 

Solution :

The below error message appeared in the alert log file.

ORA-27102: out of memory
OSD-00026: additional error information
O/S-Error: (OS 1455) The paging file is too small for this operation to complete.
Mon Jan 22 14:21:37 2018
Error: Failed to allocate SGA start_addr 00000007D0000000 size 134217728

It seems to be a Memory issue on the server. I have crosschecked the server RAM and init.ora file Memory target size.  The Server RAM size is lesser than memory target size. so I have adjusted the memory target size in init.ora file according to the Server RAM and tried to start the database as a nomount stage, its okay.

Or you need to increase RAM on the server if you need more.

Oracle 12c SE2 installation guide on OEL 7.4

Please find the document here

Oracle 12c SE2 installation guide on OEL 7

12c SQL loader express mode

In Oracle Database12c, SQL*Loader has a new feature called express mode that makes loading CSV files faster and easier. With express mode, there is no need to write a control file for most CSV files you load. Instead, you can load the CSV file with just a few parameters on the SQL*Loader command line.

Example :

SQL> create table dept(deptno number,deptname varchar2(20),deptlocation varchar2(20));

Table created.

SQL> desc dept;
Name Null? Type
—————————————– ——– —————————-
DEPTNO NUMBER
DEPTNAME VARCHAR2(20)
DEPTLOCATION VARCHAR2(20)

oracle:oradb]$ cat testload.dat
001,IT Dept,Riyadh
002,Accounting,Riyadh
003,HR Dept,Bahrain

 

[premiadb:oracle:testdb]$ sqlldr userid=testme data=testload.dat table=dept
Password:

SQL*Loader: Release 12.1.0.2.0 – Production on Mon Jan 15 09:28:42 2018

Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.

Express Mode Load, Table: DEPT
Path used: External Table, DEGREE_OF_PARALLELISM=AUTO

Table DEPT:
3 Rows successfully loaded.

Check the log files:
dept.log
dept_%p.log_xt
for more information about the load.
[premiadb:oracle:testdb]$ sqlplus testme

SQL*Plus: Release 12.1.0.2.0 Production on Mon Jan 15 09:28:58 2018

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

Enter password:
Last Successful login time: Mon Jan 15 2018 09:28:45 +03:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> select * from dept;

DEPTNO DEPTNAME DEPTLOCATION
———- ——————– ——————–
1 IT Dept Riyadh
2 Accounting Riyadh
3 HR Dept Bahrain

 

For more detail, Please refer

http://www.oracle.com/technetwork/database/enterprise-edition/learnmore/sqlldr-express-mode-wp-1991038.pdf

 

good trick for changing password securly in oracle

Good information,

http://oracle-help.com/oracle-rac/changing-password-securely-oracle/