Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle 12.2 ODBC driver installation on MacOS with unixodbc

dseverskiFeb 9 2018 — edited Feb 23 2018

I've had a devil of a time figuring out how to get the 12.2 Oracle Instant Client (Basic Lite) and ODBC drivers working under MacOS Sierra. Repeating some content from https://stackoverflow.com/questions/48635297/how-to-get-macos-oracle-odbc-client-working-with-unixodbc , I've extracted the Basic Lite client and ODBC file to /opt/ora12/ and setup the symlinks to /usr/local/lib, but when I point a DSN to the libsqora library, the connections always fail. Looking at the lib with `otool -L` it looks like some of the dependencies are not being followed, specifically all those linked with `@rpath`. If I pull down the 12.2 SQLPlus client, extract that into /opt/ora12, that is able to find all the libraries fine, but I don't know how to get unixODBC to do the same when it's @rpath doesn't know about my /opt/ora12 location.

Any pointers/docs on where I'm going wrong would be super appreciated. I'm not very familiar with DYLIB loading under MacOS so I'm likely misunderstanding something basic here.

David

This post has been answered by Sdhamoth-Oracle on Feb 20 2018
Jump to Answer

Comments

Ivica Arsov

Hi,

I didn't understand your process, but anyway why don't you just open the standby database in read only mode (active data guard) ?

Anar Godjaev

hi,

You use active DataGuard? Secondary Database (Standby database) in read only mode?

Can you please paste here: (Standby Database)

SQL>select open_mode from v$database;

And

SQL> set linesize 1000

SQL> set pagesize 100

SQL>

SQL> select name, value from v$dataguard_Stats;

Thank you

saurabh

you database version information is important.

yes you can do this. some important points to remeber.

1. before shutdown of the dr defer the log_archive_dest for standby to stop archive shipping to the standby.

2. after shuttting down the DR copy the datafile and controlfile as well.

3. After your testing is completed.

4. REMANE  PROD_bak to PROD and then start the standby dataabse. The database which you have open if not required then delete all the file before renaming.


mrmessin

You can open a standby database read only, no issues there keep in mind that archive log apply will stop while the database is read only unless you use the active dataguard option, but depending on version of the database it may not be available.

See Oracle documentation I got all this from there:

http://docs.oracle.com/cd/B10501_01/server.920/a96653/manage_ps.htm


To open a standby database for read-only access when it is currently shut down:

  1. Start the Oracle instance for the standby database without mounting it:

          SQL> STARTUP NOMOUNT;

  1. Mount the standby database:

          SQL> ALTER DATABASE MOUNT STANDBY DATABASE;

  1. Open the database for read-only access:

          SQL> ALTER DATABASE OPEN READ ONLY;

To open a standby database for read-only access when it is currently performing managed recovery:

     Cancel log apply services:

          SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

     Open the database for read-only access:

          SQL> ALTER DATABASE OPEN READ ONLY;

Now to put the database back to physical standby and apply the logs

To change the standby database from being open for read-only access to performing managed recovery:

     Terminate all active user sessions on the standby database, a shutdown works very well here

          SQL> shutdown immediate;

     Restart log apply services:

          SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Anar Godjaev

HI again,

Please check step by step in Secondary (Standby Database)

SQL> set linesize 1000

SQL> set pagesize 100

SQL>

SQL> select name, value from v$dataguard_Stats;  -- is ok then check below step:

For example: in Standby database:

NAME                      VALUE

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

transport lag             +00 00:00:00

apply lag                 +00 00:00:00

apply finish time         +00 00:00:00.000

estimated startup time    21

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

Next Step in Secondary database:

          SQL> STARTUP NOMOUNT;

          SQL> ALTER DATABASE MOUNT STANDBY DATABASE;

          SQL> ALTER DATABASE OPEN READ ONLY;

And starying again MRP process in Secondary database:

STARTUP NOMOUNT

ALTER DATABASE MOUNT STANDBY DATABASE;

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

Thank you

unknown-1052419

Thanks ALL,

DB 11.2.0.1

Supposing I will not hold-off or disrupt the standby db process since I am afraid that disaster strikes while it is paused off.

But instead I will create another reporting db  out of the standby because the standby server has not so much load on it.

Is this possible with RMAN? Creating a duplicate db out of the standby?

saratpvv

Why not - You can create duplicate db - Till now you haven't posted your db version..?

unknown-1052419

My db is 11.2.0.1

saurabh

As your database is of 11g version. You can take advantage of snapshot standby.

unknown-1052419

I searched google about snapshot db but it so complicated.

It says I need to configure DGBROKER which also complicated by its name.

Can I create snapshot db without using dgbroker?

Thanks,

saurabh
Answer
Marked as Answer by unknown-1052419 · Sep 27 2020
unknown-1052419

Thanks Saur

1 - 12
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 23 2018
Added on Feb 9 2018
11 comments
7,613 views