Monday, January 9, 2012

How to recover oracle database if the archive log/redo log file is missing ?

steps are below ....

1) Set _ALLOW_RESETLOGS_CORRUPTION=TRUE in init.ora file.
2) Startup Mount
3) Recover database
4) Alter database open resetlogs.
5) reset undo_management to "manual" in init.ora file.
6) startup database

after then

I) perform a full-database export,
II) create a brand new and separate database, and finally
III) import the export dump.


7) Create new undo tablespace
changed undo_management to "AUTO" and undo_tablespace to "New undo tablespace"

9) restart the database.

How to Change ADMIN user of internal Workspace password and port in oracle apex ?

Follow the following step to change ADMIN user password in oracle apex.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator> G:

G:\cd G:\app\apex_4_install\apex

G:\app\apex_4_install\apex>
G:\app\apex_4_install\apex>
G:\app\apex_4_install\apex>
G:\app\apex_4_install\apex>sqlplus /nolog

SQL*Plus: Release 11.1.0.6.0 - Production on Tue J

Copyright (c) 1982, 2007, Oracle. All rights rese

SQL>
SQL> conn / as sysdba
Connected.
SQL>
SQL>
SQL>
SQL> @apxconf.sql

PORT
----------
8080

Enter values below for the XDB HTTP listener port and the password for the Appli
cation Express ADMIN user.
Default values are in brackets [ ].
Press Enter to accept the default value.


Enter a password for the ADMIN user []
Enter a port for the XDB HTTP listener [ 8080]
...changing HTTP Port

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


Session altered.

...changing password for ADMIN

PL/SQL procedure successfully completed.


Commit complete.

SQL>

Sunday, January 8, 2012

how to show a string as a ROW in oracle database query?

very simply you can do it. see the example......

 SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 9 10:10:57 2012  
 Copyright (c) 1982, 2005, Oracle. All rights reserved.  
 SQL> conn scott@orcl105  
 Enter password:  
 Connected.  
 SQL>  
 SQL>  
 SQL> variable a varchar2(4000) ;  
 SQL>  
 SQL> exec :a:='MUHAMMADABDULHALIM' ;  
 PL/SQL procedure successfully completed.  
 SQL> SELECT   SUBSTR (:a, LEVEL, 1)  
  2    FROM DUAL  
  3 CONNECT BY LEVEL <= LENGTH (:a);  
 S  
 -  
 M  
 U  
 H  
 A  
 M  
 M  
 A  
 D  
 A  
 B  
 D  
 S  
 -  
 U  
 L  
 H  
 A  
 L  
 I  
 M  
 18 rows selected.  
 SQL>  
 SQL>  
 SQL> exec :a:='MUHAMMAD ABDUL HALIM' ;  
 PL/SQL procedure successfully completed.  
 SQL>  
 SQL>  
 SQL> SELECT SUBSTR (:a, LEVEL, 1) FROM DUAL CONNECT BY LEVEL <= LENGTH (:a);  
 S  
 -  
 M  
 U  
 H  
 A  
 M  
 M  
 A  
 D  
 A  
 B  
 S  
 -  
 D  
 U  
 L  
 H  
 A  
 L  
 I  
 M  
 20 rows selected.  
 SQL>  


in a contrary of this, is here...
http://halimdba.blogspot.com/2009/11/use-of-vmconcat.html