upgrading oracle 11 to oracle 18 - oracle

Is there a way to upgrade Oracle11 database to Oracle 18XE without uninstalling Oracle 11 ? I searched from Oracle forums and website but I could not find any Readme file which tells how to upgrade it ?
I will be grateful if you can help me
Cheers

Upgrading oracle database will never mandate you to uninstall the source binary. You can just install the target binary(18XE) in any location and upgrade. Make sure you follow the proper steps and have a complete DB backup, if at all something goes wrong. You should run the following script to check the status and readiness of the database:
cd $ORACLE_HOME/rdbms/admin/
sqlplus '/ as sysdba'
spool dbupgrade_info.log
#dbupgdiag.sql
spool off
this gives the current status of the database like the components and invalid objects. Make sure you do not have any invalid components and invalid objects in SYS/SYSTEM Schema.
Install the target binaries, and then execute pre-upgrade script from source home :
$SOURCE_HOME/jdk/bin/java -jar $TARGET_HOME/rdbms/admin/preupgrade.jar FILE TEXT DIR <output_dir>
The required scripts will be generated in the .
Now you can shut the DB & Listener down and change the environment variables pointing to the target home, copy the pfile to the target location and then,
sqlplus "/ as sysdba"
startup nomount
shutdown immediate;
That was just to make sure that the pfile is working fine.
Now you can start the actual DB upgrade(Make sure this is in target(18XE) environment):
cd $ORACLE_HOME/rdbms/admin
sqlplus '/ as sysdba'
startup upgrade;
exit
cd $ORACLE_HOME/bin
./dbupgrade
Now run the postupgrade_fixups.sql that will be in the .
As simple as that. Remember to configure the tnsnames.ora and linstener.ora in $TNS_ADMIN locations. And then startup the listener.

Related

Spfile and Pfile not created during installtion of Oracle 11g

I need your help concerning an issue with oracle 11g installation, i installed it while connected to a domain account (and still connected to it), after installation complete and a reboot i tried to startup Oracle using windows command line:
>sqlplus /nolog
>connect sys /as sysdba
>startup
After the startup command i get the following error:
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file ORA-27041: unable to open file
C:\oraclexe\app\oracle\product\11.2.0\server\dbs/spfileXE.ora
When i manually went to spfile and file locations, i didn't find anyone of them.
now i am looking for a method to generate of create these files without having to reinstall Oracle 11g. Any ideas please?
PS : i have windows 10.
Thanks in advance
Problem solved, while looking for pfile i was looking for something like PFile.ora, have just found that it is named init.ora, sounds stupid but yeah :D

How I configure shell sqlplus to oracle

I'm working in a new developer environment. How I set connection with oracle, because I need to execute any scripts, but I received the message: SQLPLUS NOT FOUND :/
you need to add $ORACLE_HOME/bin into your PATH. and check if $ORACLE_HOME is defined first. If it's not ,define it (just the root folder of your oracle client).
If you don't have an oracle client installed you need to install one

Oracle tns listener error

I've just installed Oracle 10g When I try to connect to oracle db i get an error:
could not start OracleOraHome92TNSListener
when i got to services and try to start it, it says that the file doesnt exist. the service file is C:\oracle\ora92\BIN\TNSLSNR (TNSLSNR is a file not a directory)
C:\oracle\ora92\BIN\TNSLSNR doesn't exist on my machine at all. do you know how to get it?
Could not start the Oracle Ora92 Listener service on Local Computer.Error 2: The system cannot find the file specified
Here's a couple of issues I see. You say you installed 10g but the error is a 9.2 error. It could be that your computer already had an Oracle 9i on it that was mis-configured or uninstalled and that is leading to the error.
You need to check your disk and find the ORACLE_HOME (directory) where Oracle 10g was installed. Once you find that you can adjust the PATH and ORACLE_HOME and TNS_ADMIN environment variables to point to the right place. This should allow you to start the database and the listener.
If you need to install the Oracle Client for 10g then this information below will be helpful as well.
The Oracle client can be installed separately. Just go to this address, download the client and unzip it into a subdirectory and then run the Oracle Universal Installer by running setup.exe from the directory.
Oracle Downloads Page

How to correctly set the ORACLE_HOME variable on Ubuntu 9.x?

I have the same problem as listed here: How to recover or change Oracle sysdba password although I did not lose the password, I entered it twice in the configure script originally, and then when I went to login (localhost:8080/apex, password not accepted.
I don't have anything in the database, I just want to install and use Oracle-XE. I have tried apt-get removing it twice and reinstalling, but if I try to run /etc/init.d/oracle-xe configure again and I get "Oracle Database 10g Express Edition is already configured" despite the second time removing any folders I could find for Oracle XE.
I tried running sqlplus "/ as sysdba" but all I get is:
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
I tried setting the variable via export. (also tried set).
Tried: export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus
and all the subdirectories of that. Same error every time.
What is the ORACLE_HOME supposed to be set to? The only reference I have seen either just say general or say the above up to the version number then "/db_1". I do no thave a db_1.
Let me know if you need any clarification. I don't understand what I did wrong in this process.
Usually the msb file not found problems are the result of an environment setting problem, but in your case I'm a little suspicious of the installation (I've never used the apt-get + configure method).
To check the sanity of the installation:
ORACLE_HOME should be set to a directory path one level above the bin directory where sqlplus executable is found.
There should some .msb files under $ORACLE_HOME/sqlplus/mesg
There should be hundreds (not sure of the number with XE) of .msb files
under $ORACLE_HOME (try find $ORACLE_HOME -name "*.msb" -print to show them)
Your PATH should include $ORACLE_HOME/bin.
All files under ORACLE_HOME should be owned by user:oracle group:dba.
I had the same issue. In my home folder I've got a script named sqlplus.sh that takes care of this for me, containing:
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export ORACLE_HOME
ORACLE_SID=XE
export ORACLE_SID
NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export NLS_LANG
PATH=$ORACLE_HOME/bin:$PATH
export PATH
sqlplus /nolog
Had the same problem,
All i had to do whas set the oracle shell variable:
. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
Sorterd!
You have to set LANG as well, look for files named 'sp1*.msb', and set for instance export LANG=us if you find a file name sp1us.msb. The error message could sure be better :)
ORACLE_HOME needs to be at the top level of the Oracle directory structure for the database installation. From that point, Oracle knows how to find all the other files it needs. For example, the error message you get is because Oracle can't locate the message files to report errors with (should be in the various mesg directories below the oracle home. Instead of the above value you give, I would try
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0
Once I also got that same type of error.
I.E:
C:\oracle\product\10.2.0\db_2>SQLPLUS SYS AS SYSDBA
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
This error is occurring as the home path is not correctly set. To rectify this, if you are using Windows, run the below query:
C:\oracle\product\10.2.0\db_2>SET ORACLE_HOME=C:\oracle\product\10.2.0\db_2
C:\oracle\product\10.2.0\db_2>SQLPLUS SYS AS SYSDBA
SQL*Plus: Release 10.2.0.3.0 - Production on Tue Apr 16 13:17:42 2013
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Or if you are using Linux, then replace set with export for the above command like so:
C:\oracle\product\10.2.0\db_2>EXPORT ORACLE_HOME='C:\oracle\product\10.2.0\db_2'
C:\oracle\product\10.2.0\db_2>SQLPLUS SYS AS SYSDBA
SQL*Plus: Release 10.2.0.3.0 - Production on Tue Apr 16 13:17:42 2013
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
This is the right way to clear this error.
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
sqlplus / as sysdba
After installing weblogic and forms server on a Linux machine we met some problems initializing sqlplus and tnsping. We altered the bash_profile in a way that the forms_home acts as the oracle home. It works fine, both commands
(sqlplus and tnsping) are executable for user oracle
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export JAVA_HOME=/mnt/software/java/jdk1.7.0_71
export ORACLE_HOME=/oracle/Middleware/Oracle_FRHome1
export PATH=$PATH:$JAVA_HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=/oracle/Middleware/Oracle_FRHome1/lib
export FORMS_PATH=$FORMS_PATH:/oracle/Middleware/Oracle_FRHome1/forms:/oracle/Middleware/asinst_1/FormsComponent/forms:/appl/myapp:/home/oracle/myapp
set <ORACLE_HOME> path variable
example
path ORACLE_HOME
value is C:\oraclexe\app\oracle\product\10.2.0\server

Oracle Pro*C ORA-12547

I'm working on re-compiling some Pro*C code that no one currently at my company has ever compiled. It's compiling OK, but when I copy it to the production server and run it I'm getting Oracle error ORA-12547 (TNS: lost contact)
Any ideas?
Oh, figured it out. :-)
The C executable isn't run directly on the server, but launched through a script that sets up the connection environment. i.e. something like this:
export SHLIB_PATH=/oracleDatabaseSidHere/oracle/10.2/lib:/usr/lib:/oracleDatabaseSidHere/oracle/10.2/odg/lib
export ORACLE_BASE=/oracleDatabaseSidHere/oracle
export ORACLE_SID=oracleDatabaseSidHere
export ORACLE_HOME=/oracleDatabaseSidHere/oracle/10.2
# Set up the path and executable to run
PATH=.\:$PATH:$ORACLE_HOME/bin:/usrlocal/bin
PATH=$PATH:/path_to_application_logs
cd /path_to_application
application
Related to this, I just found out that I get the same error ORA-12547 TNS lost contact on my Windows machine when I try to connect to an Oracle database with PL/SQL and at the same time I have a VPN connection open.
I had a similar problem on Linux, Oracle 11gR2. Oracle owner could run SQL*Plus and get in via either TNS or local connection. Non-oracle user could log in via TNS, but not as local connection.
Turns out the answer was that the ORACLE_HOME filesystem was mounted "nosuid". Removing that mount option solved my issue.

Resources