0

I use the RJDBC package to connect to the data bases at my working place. Until recently, the following code has worked properly:

connection1<-dbConnect(driver, address1, username1, password1)
connection2<-dbConnect(driver, address2, username2, password2)

Before executing those commands, I loaded the appropiate libraries, which are DBI, RJDBC and rJava, and I created the driver variable using the JDBC function.

However, as of a couple of weeks ago, when I execute the second line of the code above, R returns the following error:

Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1],  : 
java.sql.SQLRecoverableException: ORA-01033: ORACLE initialization or shutdown in progress

This happened after I executed the code once the connections were already established. I did this because I had changed the password for connection1, so I thought it would be appropiate. However, even though the connection1 can still be established, I can't get the second line of code to work.

I have tried the following approaches:

  • Restarting RStudio.
  • Restarting the computer.
  • Changing the name of the of the folders containing the involved libraries, so that RStudio doesn't find them and asks me to install them all over again. These libraries are methods, rJava, DBI & RJDBC.

I am pretty sure somewhere on my computer there must be a file that is corrupt, and that by deleting it, the issue would be solved, but I don't know what file could it be.

Note that I can still log on to the second data base environment through other software (in this case, PL/SQL).

Any help would be greatly appreciated.

Cheers.

Vuk
  • 1

1 Answers1

0

According to the error message the root cause in the database. There are 4 case when ORA-01033 could happen. Try to check them.

More details here http://www.dba-oracle.com/t_ora_01033_initialization_shutdown_progress.htm

Alex A
  • 138
  • 1
  • 8
  • Thanks for the reply, but I don't think it solves the issue, or at least I don't see how, because, as I said, I can access the database from other software. – Vuk Sep 28 '16 at 20:23
  • Please double check that you connect exactly to second database by PL/SQL. You can do it by `select sys_context('userenv','service_name') servicename from dual;` – Alex A Sep 29 '16 at 08:33