Database Administrators
Q&A for database professionals who wish to improve their database skills
Latest Questions
0
votes
1
answers
96
views
Migrate from Oracle 9.2 to 11g
I have a executable application that using Oracle ODBC Driver V9.2. My Old server Have Oracle 10g on windows 2003 32bit. I install and configure new server using Oracle 11g on Windows Server 2016 x64. SQL*Plus on My client PC can connect to My Oracle 11g On server side, but my application failed to...
I have a executable application that using Oracle ODBC Driver V9.2. My Old server Have Oracle 10g on windows 2003 32bit. I install and configure new server using Oracle 11g on Windows Server 2016 x64.
SQL*Plus on My client PC can connect to My Oracle 11g On server side, but my application failed to connect to server.
I Installed Oracle 11g ODBC Driver on client, But my problem still exists.
user3123721
(1 rep)
Jul 4, 2022, 07:01 AM
• Last activity: Jul 9, 2022, 04:16 AM
0
votes
0
answers
153
views
How to connect to Oracle 9i through SSH tunnel if TNS protocol issues a REDIRECT to a random port?
Inspecting packets exchanged between `SQLDeveloper` and `Oracle 9i` I noticed that, in the beginning of the connection negotiation, the server issues a `REDIRECT` back to the client, pointing a port different from 1521. The client then connects using this new port. This is apparently a normal behavi...
Inspecting packets exchanged between
SQLDeveloper
and Oracle 9i
I noticed that, in the beginning of the connection negotiation, the server issues a REDIRECT
back to the client, pointing a port different from 1521. The client then connects using this new port. This is apparently a normal behavior of TNS protocol.
Because of this behavior it's difficult to connect remotely via SSH tunnel or through firewalls.
client sends this:
tns.connect_data = (DESCRIPTION=(CONNECT_DATA=(SID=xyz)(CID=(PROGRAM=SQL Developer)(HOST=__jdbc__)(USER=abc)))(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.100)(PORT=1521)))
and receives this:
tns.redirect_data = (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.100)(PORT=1236))
Is there a way to disable this redirect? Or at least limit the redirection to a few known ports?
According to this there are 2 solutions:
1. use shared server and configure the dispatchers
2. use connection manager
Regarding **1. shared servers**, I created a new shared server an tried to configure the dispatchers like this and this :
alter system set DISPATCHERS='(PROTOCOL = TCP)(ADDRESS=(PROTOCOL=tcp)(HOST=myHost)(PORT=5000))' scope=spfile sid='xyz';
But I get errors like:
02065. 00000 - "illegal option for ALTER SYSTEM" Cause: The option specified for ALTER SYSTEM is not supported
Removing the scope
and sid
:
00101. 00000 - "invalid specification for system parameter DISPATCHERS" Cause: The syntax for the DISPATCHERS parameter is incorrect.
removing the (PROTOCOL = TCP)
:
00105. 00000 - "too many dispatcher configurations" Cause: Too many dispatcher configurations have been specified. No more can be added.
Regarding **2. connection manager** I enabled the cman
and cman admin services, created cman.ora
as:
cman = (ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=myHost)(PORT=1630)(QUEUESIZE=32))
)
cman_admin = (ADDRESS=(PROTOCOL=tcp)(HOST=myHost)(PORT=1830))
and followed this . I always get connection refused. I could connect to port 1630, after putting it in the listener. In the end the port redirect still happened.
Gustavo
(173 rep)
Jul 3, 2022, 08:51 PM
2
votes
1
answers
11969
views
Oracle audit: Only 'SESSION REC' in ACTION_NAME column
I was asked to generate a report of operations performed on certain Oracle 9i tables in a given period of time. When I query the `DBA_AUDIT_TRAIL` table I only get `SESSION REC` in the `ACTION_NAME` column. I was expecting `SELECT`, `INSERT`, `DELETE` etc. - What am I doing wrong? - What does `SESSI...
I was asked to generate a report of operations performed on certain Oracle 9i tables in a given period of time.
When I query the
DBA_AUDIT_TRAIL
table I only get SESSION REC
in the ACTION_NAME
column.
I was expecting SELECT
, INSERT
, DELETE
etc.
- What am I doing wrong?
- What does SESSION REC
mean?
Tulains Córdova
(723 rep)
Apr 1, 2015, 12:14 PM
• Last activity: Oct 5, 2021, 06:34 AM
1
votes
1
answers
1449
views
Restoring RMAN backup in Oracle 9i to another server
I'm trying to do a restore of a cold backup made with rman in Oracle 9i, the question is that I managed to successfully restore the pfile and the controlfile but when I try to give: RMAN> restore database; Starting restore at [DATE] allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid = 11 devtype...
I'm trying to do a restore of a cold backup made with rman in Oracle 9i, the question is that I managed to successfully restore the pfile and the controlfile but when I try to give:
RMAN> restore database;
Starting restore at [DATE]
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid = 11 devtype = DISK
RMAN-00571: ======================================================================= =============
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ======================================================================= =============
RMAN-03002: failure of restore command at [date]
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 16 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
Physically the backup pieces are there but when I do:
list backup of database;
it does not show the missing ones.
I must clarify that the restore I'm doing on a different server, but I keep the same directory structure and the same SID as in the original.
Also I copy the backup rman in the same directory.
When this happens in Oracle 11g I simply launch:
catalog start with
But for 9i there is no such option.
Could you recommend me some solution, please?
The rman script that I use is the following:
shutdown immediate;
startup force dba;
shutdown immediate;
startup mount
run {
set command id to 'ORA9';
allocate channel t1 device type disk;
allocate channel t2 device type disk;
allocate channel t3 device type disk;
allocate channel t4 device type disk;
backup filesperset 1
format '/ Backups / FULL_% d_% u'
(
database
include current controlfile
);
release channel t1;
release channel t2;
release channel t3;
release channel t4;
}
alter database open;
Would the restore procedure be similar in case the backup is done with tape?
Arnaldo Raxach
(145 rep)
Dec 20, 2017, 09:23 PM
• Last activity: Sep 21, 2021, 12:13 PM
1
votes
5
answers
14269
views
Which SQL Developer Version will be compatible with Oracle 9i
My Company is using Oracle 9i. I want to connect to the database. I'm planning to use SQL Developer. Which version will be compatible Oracle 9i?
My Company is using Oracle 9i. I want to connect to the database. I'm planning to use SQL Developer. Which version will be compatible Oracle 9i?
Rengarajan Raghavan
Oct 17, 2013, 09:47 AM
• Last activity: Aug 17, 2021, 03:45 PM
0
votes
1
answers
180
views
Restore rman backup on another server with a higher Oracle release
I would like to know if it is possible to restore a full backup made with rman of an Oracle9i Enterprise Edition Release **9.2.0.6.0** on another server with Oracle9i Enterprise Edition Release **9.2.0.8.0**, I have the doubt precisely in the change of versions of 9.2.0.**6**.0 to 9.2.0.**8**.0. Tha...
I would like to know if it is possible to restore a full backup made with rman of an Oracle9i Enterprise Edition Release **9.2.0.6.0** on another server with Oracle9i Enterprise Edition Release **9.2.0.8.0**, I have the doubt precisely in the change of versions of 9.2.0.**6**.0 to 9.2.0.**8**.0.
Thank you very much
miguel ramires
(169 rep)
Oct 6, 2020, 01:12 AM
• Last activity: Oct 6, 2020, 11:00 AM
0
votes
2
answers
247
views
Oracle 9i to 12c Replication
I have an old Oracle Forms solution that accesses a 9i database and I have been asked if it's possible to replicate to an Oracle 12c database server, with the intention of using Fusion until a new application is built. Is it possible to replicate between these two versions? Or is there another way t...
I have an old Oracle Forms solution that accesses a 9i database and I have been asked if it's possible to replicate to an Oracle 12c database server, with the intention of using Fusion until a new application is built.
Is it possible to replicate between these two versions? Or is there another way to achieve an active-active replica between the two servers? i.e. log shipping etc.
TaylorN
(145 rep)
Jul 31, 2019, 03:06 AM
• Last activity: Aug 1, 2019, 06:12 AM
1
votes
1
answers
4193
views
Oracle 12c Client Compatible with 9i Server?
I'm developing on a new .NET application that needs to read/write data from an Oracle 9i database. I've got it working with ODAC 11.2.0.4 which comes with Instant Client 11.2. I had selected this version because I had read that Oracle 12c Client was only backwards Compatible to version 10g release 2...
I'm developing on a new .NET application that needs to read/write data from an Oracle 9i database. I've got it working with ODAC 11.2.0.4 which comes with Instant Client 11.2. I had selected this version because I had read that Oracle 12c Client was only backwards Compatible to version 10g release 2 servers. Unfortunately I can't find that reference.
I would prefer to use latest version of ODAC 12.2, but I need to confirm that I'll still be able to connect to a 9i database.
**Note:** All the links I found to Oracle Compatibility charts are hidden behind an Oracle registration wall that isn't currently working for new signups. So I'm asking the question here.
Josh
(113 rep)
Aug 21, 2017, 10:42 PM
• Last activity: Feb 20, 2019, 09:15 AM
0
votes
2
answers
1816
views
Oracle - Extract user DDL for migration
I need to export and import data from a Oracle 9i to Oracle 12.2 database. This old app doesn't log in as one privileged user - it logs in for each user. I have hundreds of users with nothing but synonyms. I need to pre-create the users and their privileges so I can import. There are scripts all ove...
I need to export and import data from a Oracle 9i to Oracle 12.2 database.
This old app doesn't log in as one privileged user - it logs in for each user. I have hundreds of users with nothing but synonyms.
I need to pre-create the users and their privileges so I can import.
There are scripts all over the internet:
* Ask Tom suggests import and an indexfile (which I find kludgy).
* DBMS_METADATA.GET_DDL scripts, as well.
However, being in a rush, I haven't found one script to cycle through all the users and generate their DDL and grants, etc.
I want to run one 9i script to grab everything and one 12.2 script to create users, but can't find anything useful.
Can you suggest how I should solve this? Or am I making this too complicated?
Marinaio
(207 rep)
Aug 14, 2018, 09:07 PM
• Last activity: Aug 29, 2018, 04:10 PM
3
votes
2
answers
2160
views
Why are backups of a previous incarnation marked obsolete without regard to redundancy?
After incomplete recovery and opening a 9i database with `resetlogs` we ran a full backup which completed successfully. The backup includes a command to delete obsolete backups after it finishes: delete noprompt obsolete device type sbt; RMAN is configured to use REDUNDANCY 2: RMAN configuration par...
After incomplete recovery and opening a 9i database with
resetlogs
we ran a full backup which completed successfully. The backup includes a command to delete obsolete backups after it finishes:
delete noprompt obsolete device type sbt;
RMAN is configured to use REDUNDANCY 2:
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
However all the backups from the old incarnation were immediately marked obsolete and deleted without regard to redundancy.
1. Would this behaviour have been different if we had a RECOVERY WINDOW
configured instead of REDUNDANCY 2
?
2. Is this behaviour the same in later versions of Oracle?
---
edit: added output of LIST INCARNATION
:
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time
------- ------- -------- ---------------- --- -------------- ----------
1 1 LIVE 3494832994 NO 1 19-JAN-04
2 2 LIVE 3494832994 NO 11966702870498 01-JAN-14
3 3 LIVE 3494832994 YES 12041003378277 04-JUL-18
Jack Douglas
(40537 rep)
Jul 5, 2018, 12:34 PM
• Last activity: Jul 18, 2018, 06:18 AM
5
votes
1
answers
907
views
Oracle Audit: Why Logons are less than 0.1% of logoffs?
I see the following quantities of logins versus logoffs vs logoffs by cleanup in a database: SQL> select action_name, count(*) qty from Dba_audit_session group by action_name order by 1; 2 3 4 ACTION_NAME QTY --------------------------- ---------- LOGOFF 1946180 LOGOFF BY CLEANUP 754683 LOGON 1026 I...
I see the following quantities of logins versus logoffs vs logoffs by cleanup in a database:
SQL> select action_name, count(*) qty
from Dba_audit_session
group by action_name
order by 1; 2 3 4
ACTION_NAME QTY
--------------------------- ----------
LOGOFF 1946180
LOGOFF BY CLEANUP 754683
LOGON 1026
It doesn't make sense that logons are less than 0.1% of logoffs.
Any ideas why?
RGO
(423 rep)
Aug 20, 2015, 06:52 AM
• Last activity: Feb 20, 2018, 10:48 AM
2
votes
2
answers
18536
views
Oracle: Truncate large table takes forever
Problem ------- - I'm truncating a very large table ( 210+ million rows ). - It's been hours since it started and I have no idea when it will be done. - There're several tables like that, that I want to truncate. - The database is Ora9i. Question -------- - **How can I do to make truncates faster ?*...
Problem
-------
- I'm truncating a very large table ( 210+ million rows ).
- It's been hours since it started and I have no idea when it will be done.
- There're several tables like that, that I want to truncate.
- The database is Ora9i.
Question
--------
- **How can I do to make truncates faster ?**
- Also, Is there a way to see the progress of the truncate operation ?
Tulains Córdova
(723 rep)
Sep 16, 2013, 06:05 PM
• Last activity: Jul 27, 2017, 11:36 PM
4
votes
1
answers
1109
views
What is preventing ORA-00376 errors appearing in the alert log?
An overnight hard drive failure had various side-effects, including leaving a single datafile needing recovery: SQL> select count(*) from v$datafile where status='RECOVER'; COUNT(*) ---------- 1 Everything is now back to normal but one mystery remains: before recovery, the client application logged...
An overnight hard drive failure had various side-effects, including leaving a single datafile needing recovery:
SQL> select count(*) from v$datafile where status='RECOVER';
COUNT(*)
----------
1
Everything is now back to normal but one mystery remains: before recovery, the client application logged an ORA-00376 to a logging table when a batch job tried to access a segment in the datafile. However this error did not appear in the alert log, how can this happen?
At the time of the ORA-00376 error, the following did appear in the alert log:
Errors in file /app/oracle/admin/live33/bdump/live33_j002_938224.trc:
ORA-12012: error on auto execute of job 24760001
ORA-20001: Error during batch run
ORA-06512: at "*******.***_*****", line 266
ORA-06512: at "*******.***_***_***_*****", line 355
ORA-06512: at line 1
And at the time of the original issue:
KCF: write/open error block=0x2fb23 online=1
file=177 /data/ora9i/live/db3b/nsbme.dbf
error=27072 txt: 'IBM AIX RISC System/6000 Error: 5: I/O error
Additional information: 195363'
Automatic datafile offline due to write error on
file 177: /data/ora9i/live/db3b/nsbme.dbf
Jack Douglas
(40537 rep)
Aug 18, 2016, 08:09 AM
• Last activity: May 14, 2017, 09:49 AM
2
votes
1
answers
400
views
Does REDUNDANCY retention policy guarantee PITR from the earliest backup?
[From ORACLE-BASE](https://oracle-base.com/articles/9i/recovery-manager-enhancements-9i): >CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; > CONFIGURE RETENTION POLICY TO REDUNDANCY 5; > > … > > The recovery window is used to make sure that there are always sufficient backups to recover the...
[From ORACLE-BASE](https://oracle-base.com/articles/9i/recovery-manager-enhancements-9i) :
>CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
> CONFIGURE RETENTION POLICY TO REDUNDANCY 5;
>
> …
>
> The recovery window is used to make sure that there are always sufficient backups to recover the database to any point in time with the last 'X' days. Any backups that fall outside this time period can be deleted. The redundancy option simply states that any backups in excess of the latest 'X' are no longer needed.
In other words, setting the RMAN retention policy to a recovery window explicitly guarantees PITR to any time within the recovery window. It isn't clear from this description whether PITR is guaranteed using the alternative redundancy configuration — does RMAN retain all archivelog backups necessary for PITR to any point since the earliest retained backup?
Jack Douglas
(40537 rep)
Mar 15, 2017, 09:18 AM
0
votes
1
answers
6174
views
How to copy a schema with another name but with same data?
I want to copy all the objects of Scott schema to another schema. I can not understand what the code should be. Like bellow one? `create user scott1 identified by tiger1;`
I want to copy all the objects of Scott schema to another schema.
I can not understand what the code should be. Like bellow one?
create user scott1 identified by tiger1;
delu
(1 rep)
Feb 11, 2017, 09:20 AM
• Last activity: Feb 11, 2017, 10:27 AM
0
votes
1
answers
1372
views
Executing stored procedures in oracle inside a package using dbms_job
I am trying to execute multiple stored procedures through package using DBMS_JOB. Even if the job is getting submitted and is showing in USER_JOBS its not getting started for some reason. I have tried with and without putting the 'START DATE' parameter with the same result i.e. no start. I am using...
I am trying to execute multiple stored procedures through package using DBMS_JOB. Even if the job is getting submitted and is showing in USER_JOBS its not getting started for some reason. I have tried with and without putting the 'START DATE' parameter with the same result i.e. no start.
I am using ORACLE 9i and i guess i cannot use dbms_scheduler.
Find below the code :
--PACKAGE BODY--
create or replace
PACKAGE BODY PKG_TEST IS
PROCEDURE PASSPORT_DC_1 IS
l_jobno binary_integer;
l_jobno1 binary_integer;
BEGIN
dbms_job.submit(l_jobno1, 'BEGIN SP_ABC(); END;',SYSDATE );
DBMS_OUTPUT.PUT_LINE('SP_UPDATE_TIDCUMTL :' || l_jobno1);
COMMIT;
dbms_job.submit(l_jobno, 'BEGIN SP_XYZ(); END;',SYSDATE);
DBMS_OUTPUT.PUT_LINE('SP_UPDATE_TIDPTDTL :' || l_jobno);
COMMIT;
END PASSPORT_DC_1;
--PACKAGE SPEC--
create or replace PACKAGE PKG_TEST AS
PROCEDURE PASSPORT_DC_1;
END PKG_TEST;
zlatan
(1 rep)
Jan 31, 2017, 06:17 AM
• Last activity: Jan 31, 2017, 03:25 PM
0
votes
1
answers
147
views
Magic number in optimal redo size query in Oracle 9i
I got this query from [this blog post][1] to determine the optimal online redo log size in pre-Oracle10 databases. I'm stuck with Oracle 9i for that particular instannce for reasons beyond my pay grade and in this version the view `V$INSTANCE_RECOVERY` lacks the `OPTIMAL_LOGFILE_SIZE` column): SELEC...
I got this query from this blog post to determine the optimal online redo log size in pre-Oracle10 databases.
I'm stuck with Oracle 9i for that particular instannce for reasons beyond my pay grade and in this version the view
V$INSTANCE_RECOVERY
lacks the OPTIMAL_LOGFILE_SIZE
column):
SELECT
(SELECT ROUND(AVG(BYTES) / 1024 / 1024, 2) FROM V$LOG) AS "Redo size (MB)",
ROUND((20 / AVERAGE_PERIOD) * (SELECT AVG(BYTES) FROM V$LOG) / 1024 / 1024, 2) AS "Recommended Size (MB)"
FROM
(
SELECT AVG((NEXT_TIME - FIRST_TIME) * 24 * 60) AS AVERAGE_PERIOD
FROM V$ARCHIVED_LOG
WHERE FIRST_TIME > SYSDATE - 3
AND TO_CHAR(FIRST_TIME, 'HH24:MI') BETWEEN
'00:00' AND '23:59'
);
I indented the query to understand in better but I fail to understand why the author uses the magic number 20
.
**Can someone tell me why the 20
and whether this query can be otherwise improved?**
Tulains Córdova
(723 rep)
Dec 30, 2016, 01:28 PM
• Last activity: Dec 30, 2016, 01:33 PM
0
votes
3
answers
5096
views
Sync two Oracle production server databases
I have an Oracle database that runs a 6 hours batch job every day. This process slows down performance during the 6 hours timeframe. Is there any method that I could use to build another server that runs the batch job, and once is done, sync the data to the production server? (The time taken must be...
I have an Oracle database that runs a 6 hours batch job every day. This process slows down performance during the 6 hours timeframe.
Is there any method that I could use to build another server that runs the batch job, and once is done, sync the data to the production server? (The time taken must be shorter than 6 hours.)
Shawn Wong
(1 rep)
May 31, 2013, 12:54 AM
• Last activity: Dec 20, 2016, 10:17 AM
-1
votes
1
answers
50
views
Is there any way to know all the tables(and/or views, triggers, functions) present in the Oracle 9i database?
I want to know this because I forgot the name of the table I created. i am using Oracle 9i.
I want to know this because I forgot the name of the table I created.
i am using Oracle 9i.
Sam
(113 rep)
Oct 4, 2013, 02:07 PM
• Last activity: Oct 27, 2016, 07:32 AM
0
votes
3
answers
968
views
Is it possible to connect to Oracle 9i data source in SSIS?
We're doing a migration from Oracle 9i to SQL Server 2008. So I'm thinking of a way to move the data from Oracle and I thought about SSIS. I'm new to this Microsoft's technology and I would like to know whether it's possible to specify Oracle 9i as a data source, and do I need any further installati...
We're doing a migration from Oracle 9i to SQL Server 2008. So I'm thinking of a way to move the data from Oracle and I thought about SSIS. I'm new to this Microsoft's technology and I would like to know whether it's possible to specify Oracle 9i as a data source, and do I need any further installations in case it's possible ?
mounaim
(659 rep)
Mar 21, 2015, 01:20 AM
• Last activity: Oct 27, 2016, 06:05 AM
Showing page 1 of 20 total questions