upgrade failed oracle apex 4.0 to 4.2 - oracle

i got stuck in a failed upgrade from apex 4.0 to 4.2
The following is the log after the upgrade. I only see application login page no other page including apex admin is working i-e. admin page loads but its blank.
1> my 11g XE installation is in G:\ORAXE.
2> i downloaded the application upgrade in downloads folder, and moved the extracted contents of apex folder to C:.
3> i am on hp desktop using windows 7 64bit.
C:\apex>sqlplus /nolog
SQL*Plus: Release 11.2.0.2.0 Production on Mon Sep 29 10:01:00 2014
Copyright (c) 1982, 2014, Oracle. All rights reserved.
SQL> connect sys as sysdba
Enter password:
Connected.
SQL>#apexins SYSAUX SYSAUX TEMP /i/
...
...
...
PL/SQL procedure successfully completed.
SQL> #apxldimg.sql C:\apex
...
declare
*
ERROR at line 1:
ORA-22288: file or LOB operation FILEOPEN failed
The system cannot find the path specified.
ORA-06512: at "SYS.XMLTYPE", line 296
ORA-06512: at line 16
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Commit complete.
Directory dropped.
timing for: Load Images
Elapsed: 00:00:10.98
SQL>

you are loading images at wrong location,load image at as follows
SQL> #apxldimg.sql C:\
for more
refer installation guide http://www.oracle.com/technetwork/developer-tools/apex/application-express/upgrade-apex-for-xe-154969.html

unzip your apex zip on a folder, for example: c:\apex
go to c:\apex
sqlplus sys as sysdba
run previous scripts...
SQL> #apxldimg.sql C:\
Notice that if you use c:\apex, the script will try to create a folder named images on c:\apex/apex/ , which is an inexistent directory

After having the same issue installing apex in dev enviroment for the third time, and reading, and searching, and guessing, this link confirmed what I was beginning to suppose.
When you download APEX from Oracle page, you get a zip file. This error is the result hardcoding paths in scripts, so when you unzip your downloaded file you have to unzip it to a folder named "apex" otherwise EPG configuration and images configuration will fail. If you want to keep track of the version of the unzipped apex version, you can have something like c:\oracle\apex_18.2\apex.

I had the same problem ... I tried everything I found that was supposed to resolved the problem ...
Noted that this apply to windows installation and NOT Linux one.
The fact is that someone mess it up when he made the script ... or maybe its a unix script that has been put in the windows installation kit by mistake, I don't know but the problem is :
Search in the files of your Apex upgrade folder where you unzip all the migration files for the upgrade and search all files for exactly "/apex/images".
You should find it in the file "apex_epg_config_core.sql".
Open this file and change (I found it only once in the file) "/apex/images" for "\apex\images" (change the slashs for back-slashs). Noticed that mean that when you will enter the command in SQL, you should not include the "apex" directory in the path parameter to the script because the code in the script should not have been written "/apex/images" but only "\images" ... You can also correct it in the script and remove the "\apex" from the path in the sql file.
As an instance, in my case, I unzipped all the files in the folder "C:\temp\apex" ... so the right command for me to get it successfull without removing the "\apex" part from the path in the sql file was exactly "#apex_epg_config.sql C:\temp" and not "#apex_epg_config.sql C:\temp\apex" ...
After this, i can now log properly on my apex environment at "http://localhost:8080/apex/apex_admin" as stated in the installation guide ...
Hope this will help you guys ... (sorry for my poor english guys, i usually speak french...)
Thank you!

Related

upgrading oracle 11 to oracle 18

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.

Failure while exporting table from Oracle XE Database

We have XE running on a docker container. When trying to export a table I got the below error
expdp test/test#XE tables=UserProfile directory=/tmp dumpfile=profile.dmp logfile=logger
ORA-39006: internal error
ORA-39213: Metadata processing is not available
I googled a bit and found that I need to execute the below command but that failed too
execute dbms_metadata_util.load_stylesheets
ERROR at line 1:
ORA-31609: error loading file "kucolumn.xsl" from file system directory
"/u01/app/oracle/product/11.2.0/xe/rdbms/xml/xsl"
ORA-06512: at "SYS.DBMS_METADATA_UTIL", line 2397
ORA-06512: at line 1
I traversed to the directory and found that the "xsl" directory was missing, is this directory created by default with XE installation or we require a specific setting to get the "xsl" folder?
XE was installed using the rpm - oracle-xe-11.2.0-1.0.x86_64.rpm. Any idea what could be the issue?
The value you specify as directory needs to be an Oracle database directory object, not the value of a directory on your file system.
create directory export_directory as '/tmp';
expdp test/test#XE tables=UserProfile directory=export_directory dumpfile=profile.dmp logfile=logger
There is a 2011 discussion about this at https://community.oracle.com/thread/2278841. It says you have to copy the directory $ORACLE_HOME/rdbms/xml/xsl from a working installation. So the problem seems to be a known one, and if you do not have a working installation you are out of luck.
The problem does not seem to be limited to Linux (I used the same rpm as the OP), as the discussion says the working installation can be “even a Linux one.”

Errors on importing Oracle backup

I have created a directory:
SQL> create or replace directory dir as '/home/oracle12c/Desktop/latest_exp.dmp';
I am trying to run an import, as sysdba:
impdp \'/as sysdba\' full=Y directory=dir dumpfile=importDump.dmp logfile=import.log;
I am getting these errors:
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics, and Real Application Testing options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
As far as I can see from the result on my search, it as to do with permissions. The Oracle user should own the files.
The permission to the file I am trying to import looks like this:
-rw-r--r-- 1 oracle12c root 2201247744 Feb 21 16:51 latest_exp.dmp
What is my problem here, and how do I overcome it? Is there a problem when the owner of the file is oracle12? Some solutions on the internet say that the files must be owned by the user trying to access the files, who in my case is sysdba. But I cannot change the owner to my file to be sysdba, as that user does not exist on my Ubuntu.
Also, we specify the dumfile and logfile, but we do not specify the location. Where will it create the locations for these? I assumed it would look for them here: /u01/app/oracle/oradata/orcl$ where orcl is my SID
I have not been able to solve my problem with the help of Google and Oracle Doc.
I am running on Ubuntu.
The Oracle directory object should point to an operating system directory, not a file; instead of:
create or replace directory dir as '/home/oracle12c/Desktop/latest_exp.dmp'
it should just be:
create or replace directory dir as '/home/oracle12c/Desktop'
The dump file should sit in that directory, and by default the log and bad files will be created in there too.
At the moment you're asking it to create log file under the directory /home/oracle12c/Desktop/latest_exp.dmp, i.e. /home/oracle12c/Desktop/latest_exp.dmp/import.log - which clearly isn't a valid full path; and also to look for the file importDump.dmp under that not-a-directory.
Your command line looks like it has the wrong name anyway:
impdp ... directory=dir dumpfile=latest_exp.dmp logfile=import.log

ora-09925 unable to create audit trail file no such file or directory

I have just installed a oracle 12c 12.1.0 DB on a linux machine.
after completing the installation i tried to login to database as sysdba
[oracle#bjorn adump]$ sqlplus sys as sysdba/welcome
SQL*Plus: Release 12.1.0.2.0 Production on Wed Oct 12 16:41:17 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter password:
Connected to an idle instance.
Now i tried to startup the DB using below command
SQL> startup mount
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
and this error pop up !
my ENV variable are --
[oracle#bjorn adump]$ echo $ORACLE_BASE
/oracle
[oracle#bjorn adump]$ echo $ORACLE_HOME
/oracle/product/12.1.0/db_1
I have checked into pfile which is $ORACLE_HOME/dbs/init.ora
there is the entry for audit file
audit_file_dest="/oracle/admin/orcl/adump"
I also go to this location and check if the folder exists or nt but the folder was there and it aleady has some files in it like
orcl_m000_21634_20161012143245012051143795.aud
there are lots of file with names like this.
I gave permission to this folder
chmod -R 755 /oracle/admin/orcl/adump
tried creating a new file using
touch afile
and file get created.
It also got connect to the idle session but when i tried to do a startup the error pops up !
Please suggest what i am overlooking here which needs to be corrected.
Usually this could happen because:
AUDIT_FILE_DEST is not writable(chown +w $AUDIT_FILE_DEST)
$ORACLE_BASE/admin/$ORACLE_SID/adump exists and is not writable
$ORACLE_HOME/rdbms/audit is not writable
PS: Make sure to check permissions for the oracle user
Also please check for disk space availability
In our case, one of the drives in one of our 2-node RAC servers was failing - the reason why the OS (Linux) limited anyone's access, including root, to read-only.
The amber light was suppose to turn on but it didn't. It only turned on when we restarted that particular node.
You also have 3 things to verify:
- As already mentionned, check free space with df -have
- Check if the file system are Read/Write or read-only: cat /proc/mounts
- Finally, you can check free inodes space with df -i
Detailled information can be found here: https://www.oracle-scripts.net/unable-to-create-audit-trail-file-read-only-file-system/

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

Resources