#StackBounty: #oracle #oracle-12c #upgrade Oracle 12 Startup upgrade throws error 443

Bounty: 50

Please follow the logic of my attempts at upgrade before suggesting a fix. The error 443 is not the main problem here.

  • we are upgrading from oracle 11.2.0.4 to 12.2.0.1 on a Solaris 11.3 server ‘test’.
  • all upgrades are successful except the one database called VIT which throws the error on startup upgrade (after logging in as oracle12): terminating the instance due to error 443
  • we cloned VIT and mounted it on another server. It upgrades successfully. We then mounted the same clone on ‘test’ and it does not startup, throwing the same error 443.
  • we then renamed VIT to VITNEW on ‘test’ and the upgrade works! We then renamed it back to VIT and it throws the same error 443 on startup.

So after all these attempts it’s obvious to me that there is either something with the name or the server, but bear in mind other databases work on that same server, and it’s ONLY that name of VIT that does not work on ‘test’.

Weird problem. We have opened a SR for it, but Oracle have no answers yet. Hoping someone might have an idea.


Get this bounty!!!

#StackBounty: #oracle #oracle-12c #authentication #remote Remote login via rman working for one instance but not another

Bounty: 50

I have Oracle 12c installed on two servers. On server UAT I have an instance RMCAT that hosts an RMAN recovery catalog. On server EXT I have two instances, extdev02 and extuat01. I can use the following command on server UAT to connect to my RMCAT catalog, and target of extdev02, but when I try to connect to extuat01 it gives an ORA-01017

UAT> rman target= sys/tiger@extdev02  catalog= rmuser/tigerman@rmcat

Recovery Manager: Release 12.1.0.2.0 - Production on Wed May 30 22:59:26 2018

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

connected to target database: EXTDEV02 (DBID=4287636681)
connected to recovery catalog database

RMAN> exit


Recovery Manager complete.

UAT> rman target= sys/tiger@extuat01  catalog= rmuser/tigerman@rmcat

Recovery Manager: Release 12.1.0.2.0 - Production on Wed May 30 22:59:42 2018

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

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-01017: invalid username/password; logon denied

I get OK results from tnsping from UAT server to both instances on EXT, and I can connect to a non-dba user from UAT server to both instances. I recreated the Oracle password file using orapw on EXT server instance EXTUAT01 and that did not help.

Instance names are extdev02 and extuat01 on server EXT. Here are my password files on that server:

/u01/app/oracle/product/12.1.0.2/db_1/dbs> ls -o orapw*
-rw-r-----. 1 oracle 18432 Jun  1 00:07 orapwextuat01
/u01/app/oracle/product/12.1.0.2/db_0/dbs> ls -o orapw*
-rw-r-----. 1 oracle  7680 Feb  6 20:22 orapwextdev02

Note they are in two different ORACLE_HOME directories. The value for remote_login_passwordfile is EXCLUSIVE for both instances


Get this bounty!!!

#StackBounty: #oracle #oracle-12c #authentication Unable to start Oracle Listener – "The user name or password is incorrect"

Bounty: 50

I am trying to install Oracle Database 12c on a Windows Server 2012 machine. The installation goes well for the most part, except that I get the error “Oracle Net Services configuration failed” (that may be actually the root cause of the problem, which I’m also looking at, but I’d like to understand the error that I get after that).

After installation, I navigate to <dbhome>BIN and I execute lsnrctl start. I get the following prompt:

LSNRCTL for 64-bit Windows: Version 12.1.0.2.0 - Production on 22-MAY-2018 18:13:21

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

Starting tnslsnr: please wait...

Enter oracleadmin's password :

And then I input the password for the user oracleadmin (which has been automatically created during installation). The result is:

Invalid password: WSE-000018: Credential verification failed.

O/S-Error: (OS 1326) The user name or password is incorrect.

TNS-12560: TNS:protocol adapter error
 TNS-00530: Protocol adapter error

I am confident that I am entering the correct password. I have faced the same issue twice, installing with different users.

How can I find where the problem is?

In case it’s relevant, Oracle 11g is installed in the same machine too. I didn’t face this issue when installing 11g.


Get this bounty!!!

#StackBounty: #oracle #oracle-11g-r2 #oracle-12c #exadata ORA-04020: deadlock detected while trying to lock object – Oracle Package

Bounty: 50

I have an Oracle Package (Schema1) that is calling another Oracle Package (Schema2) over a DB link. There are no recent code changes.

When I try to compile the package in (Schema1) it throws the following errors.

(replaced the actual schema names with 1 and 2 for clarity)

ORA-04052: error occurred when looking up remote object
SCHEMA2.PKG_NAMEHERE@SCHEMA2.LINKNAME.INT@SCHEMA1

ORA-04020: deadlock detected while trying to lock object
SCHEMA2.PKG_NAMEHERE@SCHEMA2.LINKNAME.INT@SCHEMA1

What we have tried

  1. Killed all user sessions

  2. Recompiled the package in SCHEMA2 even so SCHEMA1 that calls it over the DBLINK failes with “ORA-04020: deadlock detected”

We have 4 Database regions, and this is only happening in two of the regions.

Notes:

SCHEMA1: Oracle 11g

SCHEMA2: Oracle 12c (on ExaData)


Get this bounty!!!

#StackBounty: #oracle #oracle-12c #transparent-data-encryption Cloning a PDB from one CDB into another CDB with TDE enabled at source a…

Bounty: 50

What are the possible ways to Clone a PDB from one CDB into another CDB (in a different host) with TDE enabled at both source and target.

At present i am able to think of the following two

a) Data pump export and import

b) Unplugging in source and plugging into target

Option a) requires creation of tablespaces manually before import at target pdb and is quite slow since the data we have is huge.

Option b) is easy without TDE but with TDE their is a concept of exporting and importing encryption keys , and what ever i have used it till now it becomes quite complex during plugging and importing keys .

Can someone suggest and alternative way to achieve the mentioned requirement or may be a way to do a) or b) with more ease and accuracy .


Get this bounty!!!

#StackBounty: #.net #oracle #ado.net #oracle-sqldeveloper #oledb .NET code adds a trailing 0 to the numbers with 1 or 3 fractional digi…

Bounty: 100

I run a SELECT query in .NET (using OracleDataAdapter) and SQL Developer. Result sets are slightly different:

SQL Developer returns:

enter image description here

.NET returns:

enter image description here

As you see, there is an extra 0 at the end of the values that have 1 or 3 digits after dot. What is the root cause of this problem and how to prevent it?

We can easily remove the extra 0 in code but we would like to prevent it by fixing the underlying issue. Thanks!

UPDATE (1/29/2018):

Data type in Oracle:
enter image description here

This is the .NET code to fetch the data:

OracleConnection conn = new OracleConnection(ConfigurationManager.ConnectionStrings["conString"].ConnectionString);

if (conn.State != ConnectionState.Open)
    conn.Open();

DataSet hereDataSet = new DataSet();

try
{
    using (OracleCommand oCmd = new OracleCommand())
    {
        oCmd.Connection = conn;
        oCmd.CommandText = "select V_COLUMN from T_TABLE where V_COLUMN='123'"; 

        OracleDataAdapter oDataAdapter = new OracleDataAdapter(oCmd);

        oDataAdapter.SelectCommand = oCmd;
        oDataAdapter.Fill(hereDataSet);
    }
}
catch (Exception ex)
{
    // exception logic
}
finally
{
    if (conn.State == ConnectionState.Open)
    { conn.Close(); }
}


Get this bounty!!!

#StackBounty: #node.js #promise #typescript #express.js #oracle Exception handling and releasing of OracleDB connection

Bounty: 50

Before I start implementing several REST API service endpoints, I’d like to make sure that I’m not doing it totally wrong.

/**
 * GET /api/test
 * Test API example.
 */
export let getTest = (req: Request, res: Response, next: NextFunction) => {
    // const token = req.user.tokens.find((token: any) => token.kind === "facebook");
    const db = new Database();

    db.getConnection()
        .then(con => {
            con.execute('SELECT * FROM BTO_MDS.AlARMS', {}, { maxRows: 22000 })
                .then(result => {
                    con.release();
                    res.json({data: result.rows});
                })
                .catch(ex => {
                    con.release();
                    res.status(500).json({message: ex.message});
                });
        })
        .catch(ex => {
            res.status(500).json({message: ex.message});
        });

};
  • Is the connection always released properly, or have I forgotten something?

  • What seems a bit messy is that I need to release the connection two times, and that I have two catch’es, since I cannot release the connection in the second catch.

For completeness: Database is simply a wrapper that contains the connection string configuration and returns a reference to a new connection:

import * as oracledb from 'oracledb';
import { IConnectionPool } from 'oracledb';

const config = {
    user: 'user',
    password: 'pw',
    connectString: 'databaseNameFromTNSNames',
    poolMax: 16
};

export default class Database {
    private pool: IConnectionPool;    
    constructor() {  
    }

    public createPool(): void {
        oracledb.createPool(config).then(conpool => {
                this.pool = conpool;
                console.log('Connection Pool created!');
            },
            err => {
                console.log('Error creating pool!');
            });
    }

    public getConnection() {
        return oracledb.getConnection();
    }    
}


Get this bounty!!!

#StackBounty: #node.js #promise #typescript #express.js #oracle Is my exception handling and releasing of oracledb connection done corr…

Bounty: 50

Before I start implementing several REST API service endpoints, I’d like to make sure that I’m not doing it totally wrong.

/**
 * GET /api/test
 * Test API example.
 */
export let getTest = (req: Request, res: Response, next: NextFunction) => {
    // const token = req.user.tokens.find((token: any) => token.kind === "facebook");
    const db = new Database();

    db.getConnection()
        .then(con => {
            con.execute('SELECT * FROM BTO_MDS.AlARMS', {}, { maxRows: 22000 })
                .then(result => {
                    con.release();
                    res.json({data: result.rows});
                })
                .catch(ex => {
                    con.release();
                    res.status(500).json({message: ex.message});
                });
        })
        .catch(ex => {
            res.status(500).json({message: ex.message});
        });

};
  • Is the connection always released properly, or I have forgotten something?

  • What seems a bit messy is that I need to release the connection two times, and that I have two catch’es, since I cannot release the connection in the second catch.

For completeness: Database is simply a wrapper that contains the connection string configuration and returns a reference to a new connection:

import * as oracledb from 'oracledb';
import { IConnectionPool } from 'oracledb';

const config = {
    user: 'user',
    password: 'pw',
    connectString: 'databaseNameFromTNSNames',
    poolMax: 16
};

export default class Database {
    private pool: IConnectionPool;    
    constructor() {  
    }

    public createPool(): void {
        oracledb.createPool(config).then(conpool => {
                this.pool = conpool;
                console.log('Connection Pool created!');
            },
            err => {
                console.log('Error creating pool!');
            });
    }

    public getConnection() {
        return oracledb.getConnection();
    }    
}


Get this bounty!!!

#StackBounty: #oracle #performance #oracle-12c "Acknowledge over PGA limit" wait event

Bounty: 50

Is it possible for this wait event to activate/showup even when the PGA has not crossed over PGA_AGGREGATE_LIMIT?

I am continuously seeing this wait event in the ASH, but the PGA allocated stays well within the limit set by PGA_AGGREGATE_LIMIT.

I used the below queries to check.

Total PGA that is currently used:

select sum(pga_alloc_mem) from v$process; 

Parameter value for PGA_AGGREGATE_LIMIT:

select * from v$parameter where name like '%pga%limit';

For what it is worth, the documentation seems to be scarce for this wait event and the only official source doesn’t help either:
https://support.oracle.com/knowledge/Oracle%20Database%20Products/2138882_1.html

EDIT:

Adding bounty.

More info:

PGA_AGGREGATE_LIMIT is set to 8 GB
PGA_AGGREGATE_TARGET is set to 4 GB

I am getting this wait event with the following values in ASH

P1 (Limit) = 8.3 GB (approx)
P2 (Margin) = 3.9 GB (approx)
P3 (Growth) = 0 or some randomly large number

I am guessing P1 is the PGA_AGGREGATE_LIMIT and P2 is some sort of threshold used before the wait event fires, but I am not sure what these actually are.


Get this bounty!!!

#StackBounty: #attacks #cookies #oracle Are encrypted Cookies vulnerable to Padding Oracle Attacks

Bounty: 50

I’m currently helping write a fast compiled web framework in the crystal language and am trying to find a way to speed up sessions using encrypted cookies. We’re currently taking a json string and encrypting it with AES. We’re then base64 encoding and signing it.

My question is: Is it necessary to sign or will a modified encrypted string fail to decrypt? If it doesn’t result in valid json which can be parsed into a session it will be empty in the same way that it would with an invalid signature. My understanding is that padding oracle attacks work by getting feedback from the server. Would an encrypted empty json string be enough?


Get this bounty!!!