Saturday, May 12, 2018

Oracle Apps DBA Interview Questions and Answers


If You have any questions relating Oracle APPS DBA Please use comment box and POST your questions.  I will try my best to answer your queries.

1)I am applying a patch , can I open another session and run adadmin ?

Ans: Yes, We can run unless you are running a process where workers are involved

2)I am applying a patch , can I open another session in another node and run adpatch?

Ans:No because it will create tables while running first session when you start the 2nd session it will fail due to the first

1. How to determine Oracle Apps 11i Version ?

Ans : select RELEASE_NAME from fnd_product_groups;

You should see output like

RELEASE_NAME———————–11.5.10.2

2. How to find Database version ?

Ans : SQL> select * from v$version;

The command returns the release information, such as the following:Oracle9i Enterprise Edition Release 9.2.0.7.0 – ProductionPL/SQL Release 9.2.0.7.0 – ProductionCORE 9.2.0.7.0 ProductionTNS for 32-bit Windows: Version 9.2.0.7.0 – ProductionNLSRTL Version 9.2.0.7.0 – Production

3. How to find opatch Version ?

Ans : opatch is utility to apply database patch , In order to find opatch version execute”$ORACLE_HOME/OPatch/opatch version”

You can check OPatch -lsinventory

4. How to find out invalid objects in the database

Ans : select count(*) from dba_objects where status =’INVALID’

5. How you will see hidden files in linux/solaris?

Ans : ls -la

6. How to find that the database is 64-bit/32-bit?

Ans : $RDBMS_ORACLE_HOME/bin/file oracle

7. What is top command?

Ans : top is a operating system command, it will display top 10 processes which are taking high cpu and memory. 8. What is a patch?Ans : A patch can be a solution for a bug/it can be a new feature.

9. What are the different types of patches?

Ans : oneoff, mini packs, family packs, maintanance packs, rollup pathches, colsolidated patches.

8. What is a oneoff patch?

Ans : An oneoff patch is a small patch of (20-90K size) without any pre-req’s

9. What is a mini pack ?

Ans : A mini pack is one which will upgrade any product patchset level to next level like AD.H to AD.I

10. What is Family pack ?

Ans : A Family pack is one which will upgade the patchset level of all the products in that family to perticular patchsetlevel.

11. What is Maintanance pack ?

Ans : A maintanance pack will upgrade applications from one version to another like 11.5.8 to 11.5.9

12. What is a Rollup patch?

Ans : A rollup patch is one which will deliver bug fixes identified after the release of any major application versions like 11.5.8/11.5.9

13. What is consilidated patch?

Ans: Consolidated patches will come into pictures after upgrades from one version of applications to anoter, all post upgrade patches will a consolidated and given as consolidated patch.

14. How u will find whether a patch is applied/not?

Ans : Query ad_bugs.

15. What is the other table where u can query what are the patches applied?

Ans : Ad_applied_patches

16. What is the difference between ad_bugs and ad_applied_patches?

Ans: A patch can deliver solution for more than one bug, so ad_applied_patches may not give u the perfect information as in case of ad_bugs.

17. How u apply a patch?

Ans : adpatch

18. What inputs you need to apply a patch other than driver name and etc?

Ans : apps and system passwords

19. What are the table u r adpatch will create and when?

Ans : Adpatch will create FND_INSTALL_PROCESSES and AD_DEFERRED_JOBS table when it will apply d,g and u drivers

20. What is the significance of FND_INSTALL_PROCESSES and AD_DEFERRED_JOBS table?Ans: FND_INSTALL_PROCESSES table will store the worker information like what job is assigned to which worker and its status. AD_DEFERRED_JOBS will come into picture when some worker is failed, it will be moved to AD_DEFERRED_JOBS table, from where again adpatch will take that job and try to resign, after doing this 3 times if still that worker is failing, then adpatch will stop patching and throw the error that perticular worker has failed. We need to trouble shoot and restrart the worker.

21. If it is a multinode installation which driver we need to apply on which node?

Ans: c,d,g on concurrent node and c, g on web node. If it is u-driver we need to apply on all nodes.

22.While applying a application patch is that necessary that u r database and listener should be up?

Ans: Yes . why because adpatch will connect to database and update so many tables etc…..



23. While applying a patch if that patch is failing because of a pre-req then how you will apply that pre-req patch and resume with the current patch?

Ans: We need to take the backup of FND_INSTALL_PROCESSES and AD_DEFERRED_JOBS tables and restart directory at APPL_TOP/amdin/SID and then use adctrl to quit all the workers. Then apply the pre-req patch , after that rename u r restart directory to its original name and create FND_INSTALL_PROCESSES and AD_DEFERRED_JOBS tables from the bcakup tables. Start adpatch session and take the options want to continue previous session.

24. What is adctrl?

Ans: Adctrl is one of the adutilities, which is used to check the status of workers and to manage the workers.

25. Can u name some of the menu options in adctrl?

Ans: Check the status of workers, tell manager that worker has quited, restart a failed worker etc….

26. How to skip a worker and why?

Ans: We can skip a worker using option 8 in adctrl which is hidden. We will go for skipping a worker when we have executed the job which the worker is supposed to do.

27. How adpatch knows what are the pre-req’s for the patch which it is applying?

Ans: With every patch a file called b.ldt file will be delivered which contain the pre-req information. adpatch load this into databse using FNDLOAD and check , whether those pre-req patches were applied or not.

28. What is FNDLOAD ?

Ans: FNDLOAD is a utility which is similar to sqlloder but loads code objects into database, where as SQLLOADER loads data objects into database.

29. What c-driver will do?

Ans: C-drive copies the files from patch unzipped directory to required location in u r application file system. Before copying it will check the file version of the existing file at the file system with the file version of the file in the patch. If the patch file version is higher than what it is at file system level then only c-driver will copy that files.

30. How adpatch will know the file versions of the patch delivered files?

Ans:With each patch a file with name f.ldt is delivered , which contain the file versions of the files dilivered with the patch. Adpatch will use this file to compare the file versions of files its delivering with the file on file system.

31. What is the adpatch log file location?

Ans : APPL_TOP/admin/SID/log

32. What is the worker log file name and its location?

Ans : adwork01,adwork02…… and location is APPL_TOP/admin/SID/log

33. How u will know what are the files the patch is going to change just my unzipping the patch?

Ans:When u unzip a patch it will keep all the files related to a particular product under that directory inside u r patch directory for example if the patch delivering files related to FND product then it will create a sub directory under the patch directory with the name FND in which it will put all related files to that product

34. What is the significance of backup directory under u r patch directory?

Ans:When we apply a patch it will keep the copy of the files which its going to change in file system.

35. What are the different modes you can run your adpatch?

Ans :1.Interactive – default mode

2.Non interactive – Use defaults files to store prompt values

(adpatch defaultsfile= interactive=no)

3. Test – Without actually applying a patch just to check what doing.(adpatch apply=no)

36. How u will monitor u r applications as well as database?

Ans: We have our custom scripts which is sheduled to run at a specific time which will monitor whether applications and databases are up/not. And it will mail us if some processes is not running. And we have one script which will check database alert log for ORA errors and mails it to us . Based on this we will react.

37. What are the latest ORA errors u have encountered?     

Ans: Useually we will get the ORA errors like unable to extend the tablespace by so and so size. And we will check those tablespaces for space, if space is not there we will resize the datafile and add one more datafile.

38. Which table u will query to check the tablespace space issues?

Ans : bytes column in dba_free_spaces and dba_data_files

39. Which table u will query to check the temp tablespace space issues?

Ans : dba_temp_files

40. What is temp tablespace? And what is the size of temp tablespace in u r instances?

Ans : Temp tablespace is used by so many application programs for sorting and other stuff. Its size is between 3 to 10 GB.

41. What is autoconfig?

Ans : Autoconfig is an adutility which is used to maintain application environment and configuration files.

42. What are the parameter autoconfig will ask for?

Ans : Context file name and apps password

43. What is context file?

Ans : Context file is a central repositary, which stores all application configuration information. The name is like _ .xml

44. How you will find autoconfig is enabled/not for u r applications?

Ans: 1. Open any env / configuration files, the first few lines will tell u that this files are maintained by autoconfig.2. If contextname.xml file is there in APPL_TOP/admin

45. How autoconfig will create env and configuration files?

Ans: Autoconfig will go to each and every top template directory take the templates from there and fill the values from xml file and create the required files.

46. In how many phases autoconfig will run?

Ans : Autoconfig will run in 3 phases.

1.INIT – Instantiate the drivers and templates

2.SETUP – Fill the templated with values from xml and create files

3.PROFILE – Update the profile values in database.

47. What is the location of adconfig log file?

Ans : APPL_TOP/admin//log/

48. Is it possiable to restore a autoconfig run?

Ans : Adconfig will create a restore.sh script at $APPL_TOP/admin//out/. This restore.sh will copy the backed up files before autoconfig run to its original locations. But the profile values updated in the database can’t be restored back.

49. How to run autoconfig in test mode?

Ans : adchkcfg.sh script at AD_TOP/bin. This script will run autoconfig in test mode and create the difference file which tells us what is going to change , when u actually run autoconfig.

50. How to find autoconfig is enabled or not for database?

Ans:  If we have appsutil directory under RDBMS_ORACLE_HOME

51. When a patch delivers java files what extra file u will get when u unzip the patch, other then u r dirver and readme files?

Ans : j.zip52.

52.What is apps.zip/appsbrog2.zip file?

Ans : apps.zip/appsbrog2.zip is the patchable archive of all java class files required for oracle application.Apps.zip was used to old application version, but from 11.5.8 onwards its appsbrog2.zip

53. What is the location of apps.zip/appsbrog2.zip?

Ans : AU_TOP/java and JAVA_TOP

54. What is for “validating apps schema” option in adadmin?

Ans: It will check for the corrupted objects in apps schema

55. What is “compile apps schema” option in adadmin?

Ans : It will compile the invalid database objects.

56. How to find invalid objects in database?

Ans : select count(*) from dba_objects where status=’INVALID’;

57. How to find MRC is enabled or not?

Ans: In adadmin if covert to MRC options is there , then MRC is not enabled,If maintain MRC options is there , then MRC is enabled.

58. How to find Multi-Org is enabled or not?

Ans : In adadmin if covert to Multi org option is there, then Multi-org is not enabled. If maintain multi-org options is there, then Multi-org is enabled.

59. What is mean by MRC?

Ans: MRC stands for Multiple reporting Currency, this should be enabled to see the reports in different currencies like (rupees,yaans etc).

60. What is Multi-Org?

Ans: If this is enabled we can store multiple organization information in a single oracle application instance.

61. What is the configuration file for adutilities (like adadmin,adconfig etc)?

Ans: adconfig.txt @APPL_TOP/admin

62. What is adrelink?

Ans : adrelink will relink the executables with the libraries. Generally we will go for adrelink when some patch delivers some library files, or when executables were corrupted.

63. How to find the version of a file?

Ans : 1. adident Header 2. strings -a filename grep Header

64. What is adodfcmp utility?

Ans : This utility is used to recreate/repair corrupted database objects from odf(object defination files) files.

65. How you will change apps password?

Ans: FNDCPASS 0 y apps/ system/ SYSTEM APPLSYS

66. What if apps password is changed with alter command?

Ans : Applications won’t work.

66. What is the difference between alter and FNDCPASS in changing apps password?

Ans : FNDCPASS will update some fnd tables other than standard tables.

67. Where the FNDCPASS utility is located?

Ans : Concurrent node @FND_TOP/bin

68. How to find out what component of u r oracle applications were installed on which node?

Ans : Xml file (context file)

69. How to find the version of httpd/Apache web server?

Ans : $IAS_ORACLE_HOME/Apache/bin/httpd –version

70. What is the configuration file for httpd and what is the location of it ?

Ans : httpd.conf @IAS_ORACLE_HOME/Apache/Apache/conf

71. Where you will see when you have some problem with u r webserver(httpd/Apache)?

Ans : access_log & error_log @IAS_ORACLE_HOME/Apache/Apache/logs

72. When Apache starts what other components its start ?

Ans : PL/SQL Listener, Servlet Engine, OJSP Engine

73. What is jserv?

Ans : jserv is nothing but servlet engine which will run u r servlets. It’s a module of apache which supports servlets.

74. What is self service application?

Ans : Whatever part of u r oracle application u r able to see through web browser is self service.

75. Where u will see when u r not able to get self service applications?

Ans : access_log,error_log, error_pls, jserv.log, wdbsvr.app(for apps password)

76. What is the location of jserv.log?

Ans : IAS_ORACLE_HOME/Apache/Jserv/log

77. What is the location of wdbsvr.app ?

Ans : IAS_ORACLE_HOME/Apache/modplsql/cfg

78. What are jserv.conf and jserv.properties files?

Ans : These are the configuration files which were used to start jvm’s(servlet engine) by apache.

79. What is mean by clearing cache and bouncing apache?

Ans : 1. Stop apache (adapcctl.sh stop apps)

2. Clear cache – Go to $COMMON_TOP/html/_pages and delete _oa_html directory

(rm –r _oa__html)

3. Start apache (adapcctl.sh start apps)

80. What is forms configuration file and its location?

Ans : appsweb_contextname.cfg @$COMMON_TOP/html/bin

81. What are the different modes u can start u r form server?

Ans : socket and servlet

82. What is the difference beween socket and servlet mode?

Ans : In socket mode forms sessions are represented by f60webmx

In servlet mode forms sessions are represented by apache processes.

83. What is forms metric server and client?

Ans : When there are more than one form sever instances then forms metric server and clinet will be used to load balance.

84. Where the forms server related errors will be logged?

Ans : access_log and error_log

85. What is report server configuration and log file name and its location?

Ans : Configuration file – REP_.ora
Log file – REP_.log @806_ORACLE_HOME/reports60/server

86. What is CGIcmd.dat file and its location?

Ans : CGIcmd.dat file is the run time parameter file the report server located @ 806_ORACLE_HOME/reports60/server

87. What is the significance of DISPLAY variable?

Ans : Vnc server should be up and running at the specified port value in DISPLAY variable, otherwise reportserver may not able to show the graphics in Reports.

88. Where is the concurrent manager log file located?

Ans : $COMMON_TOP/admin//log or $APPLCSF/$APPLLOG

89. Is apps password necessary to start all the components of oracle application?

Ans : No. Only to start/stop concurrent managers apps password is needed.

90. What is a concurrent manager?

Ans : A concurrent manager is one which runs concurrent requests.

91. What are the different types of concurrent managers?

Ans : 1. Internal concurrent manager – Will start all other managers and monitor

2. Standard Manager – All concurrent request by default will to go this

3. Conflict resolution manager – Concurrent programs with incompatabilites will be handled by this

4. Transaction manager – Handle all transaction requests

92. What are actual and target count in ‘Adminster Concurrent Managers form’?

Ans : Target is the no. of concurrent processes a manager is supposed to start(specified in the defination of concurrent manager).Actual is the no. of processes a manager started actually.

Target and Actual should be always same.

93. What if Target and Actual are not same?

Ans : It means at operating system level resources are low to accomidate the required processes for concurrent managers.

94. What are work shifts?

Ans : Work shifts are nothing but timings at which the concurrent manager is supposed to run.

95. What if internal concurrent manager target and actual are not same?

Ans : we need to bounce the concurrent manager using adcmctl.sh
96. How to bounce a single concurrent manager?

Ans : From frontend using ‘Administer Concurrent Manager form’.

97. When we change apps password , is it necessary to bounce application?

Ans : Only we need to bounce concurrent managers.

98. What is dbc file and its location?

Ans : dbc file contain database connection information. DBC file is used by oracle applications to connect to database. Its location is $FND_TOP/secure

99. What is the other script by which u can start apache other than adapcctl.sh?

Ans : apachectl @IAS_ORACLE_HOME/Apache/bin

100. What is the configuration file for PL/SQL listener?

Ans : httpd_pls.conf @IAS_ORACLE_HOME/Apache/Apache/conf

101. How to skip copy portion while applying a patch?

Ans : Adpatch options=nocopyportion

102. How to merge patches and what type of patches can be merged?

Ans : admrgpch. We can merge any kind of application patches, if any of the patch contain a u-driver then merged patch will contain u_merged.drv otherwise c_merged.drv, d_merged.drv and g_merged.drv
103. What is the Tiered architecture of u r instance?

Ans : Two Tier: Web and Forms on one node and Conc, admin and report on other node.

104. How to find formserver version?

Ans: f60gen and press enter, it will tell u the formserver version or we can find out from the frondend using help menu.

105. What is RRA?

Ans : RRA stands for Report Review Agent. RRA is nothing but FNDFS which is part of apps listener. RRA job is to pick the log/out file from the file system and show on the editor when u press view log/out button in ‘View concurrent request form’.

106. What is apps listener?

Ans : Apps lintener is the combination of FNDFS and FNDSM. FNDSM is service manager which will monitor application services on that node when GSM:enable profile value is ‘Y’.

107. What is GSM?

Ans : GSM stands for Generic service Manager, which will monitor application processes like web, forms etc and restarts any of this processes if goes down.

108. How to find the application version like 11.5.8/11.5.9….?

Ans : select release_name from fnd_product_groups;

109. How to find the database/sqlplus version?

Ans : select banner from v$version;

110. How to find out what are the languages enabled in u r applications?

Ans : Query fnd_languages

111. What is the size of u r database?

Ans : 200 to 500 GB

112. How to find operating system version?

Ans : uname –a

113. What are the problems u have faced while shutting down applications?

Ans : While shutting down application generally concurrent manager won’t go down because some or the other request may be running. We will see what are the concurrent requests running by querying fnd_concurrent_requests, fnd_concurrent_program_vl, v$session,v$process and v$sqltext. If that request is only doing some select statement then we will kill those requests, otherwise we will check what time it will take to complete by querying the previous runs of that request and then we will decide what to do.

114. What are the problems u have faced while starting up applications?

Ans : Most of the time we will encounter problem with starting up concurrent managers. Reasons , database listener may be down or FNDSM entries are wrong in tnsnames.ora of 806_ORACLE_HOME.

115. How to find the locks and what is the resolution?

Ans : we can find general locks with the following query:

select * from sys.dba_dml_locks order by session_id.

We can find the dead locks with the following query:

select * from v$lock where lmode > 0 and id1 in (select distinct id1 from v$lock where request > 0)

If it’s a dead lock, we need to kill that session.

116. How to kill a database session?

Ans : alter system kill session ‘&sid,&sno’;

117. How to find adconfig is enabled for oracle operating system user/database?

Ans : If appsutil directory is there in RDBMS_ORACLE_HOME

118. Which files tell u the database helath?

Ans : alert log file @RDBMS_ORACLE_HOME/admin//bdump

119. How to apply a rdbms patch?

Ans : Using opatch

120. How to find opatch is enabled or not for u r database?

Ans : If Opatch directory exists under RDBMS_ORACLE_HOME.

121. What is the pre-req for applying a rdbms patch?

Ans : Inventory should be set in file oraInst.loc @/var/opt/oracle or /etc

122. What is Inventroy?

Ans: The oraInventory is the location for the OUI (Oracle Universal Installer)’s bookkeeping. The inventory stores information about: All Oracle software products installed in all ORACLE_HOMES on a machine Other non-Oracle products, such as the Java Runtime Environment (JRE)

In a 11i Application system the RDBMS and iAS ORACLE_HOMEs are registered in the oraInventory. The 806 ORACLE_HOME, which is not managed through OUI, is not.

123. What are different types of inventories?

Ans: The Global inventory (or Central inventory) The Local inventory (or Home inventory)

124. What is Global inventory?

Ans : The Global Inventory is the part of the XML inventory that contains the high level list of all oracle products installed on a machine. There should therefore be only one per machine. Its location is defined by the content of oraInst.loc.The Global Inventory records the physical location of Oracle products installed on the machine, such as ORACLE_HOMES (RDBMS and IAS) or JRE. It does not have any information about the detail of patches applied to each ORACLE_HOMEs.The Global Inventory gets updated every time you install or de-install an ORACLE_HOME on the machine, be it through OUI Installer, Rapid Install, or Rapid Clone.

Note: If you need to delete an ORACLE_HOME, you should always do it through the OUI de-installer in order to keep the Global Inventory synchronized.

125. What is local inventory?

Ans : There is one Local Inventory per ORACLE_HOME. It is physically located inside the ORACLE_HOME at $ORACLE_HOME/inventory and contains the detail of the patch level for that ORACLE_HOME.The Local Inventory gets updated whenever a patch is applied to the ORACLE_HOME, using OUI.

126. What is rapid clone?

Ans : Rapid Clone is the new cloning utility introduced in Release 11.5.8. Rapid Clone leverages the new installation and configuration technology utilized by Rapid Install

127. How do I determine if my system is rapid clone enabled?

Ans : First, verify that your system is AutoConfig enabled. Then, verify that you have applied the latest Rapid Clone patch.

128. Explain the cloning process?

Ans :1. Run adpreclone as applmgr and oracle user on source Perl adpreclone.pl dbTier as oracle user Perl adpreclone.pl appsTier as applmgr user

2. Take the cold/hotbackup of source database

3. Copy the five directories appl,comn,ora , db,data to target

4. Rename the directories, and change the permisssion

5. Set the inventory in oraInst.loc
6. Run perl adcfgclone.pl dbTier as oracle user,if the backup type is cold

7. If the backup type is hotbackup then Perl adcfgclone.pl dbTechStack. Create the control file on target from the control script trace file from source Recover the database Alter database open resetlogs

8. Run autoconfig with the ports changed as per requirement in xml.

9. Run perl adcfgclone.pl appsTier as applmgr

10. Run autoconfig with the ports changed as per requirement in xml.

129. What is the location of adpreclone.pl for oracle user?

Ans : RDBMS_ORACLE_HOME/appsutil/scripts/

130. What is the location of adpreclone.pl for applmgr user?

Ans : $COMMON_TOP/admin/scripts/

131. What is the location of adcfgclone.pl for oracle user?

Ans : $RDBMS_ORACLE_HOME/appsutil/clone/bin

132. What is the location of adcfgclone.pl for applmgr user?

Ans : $COMMON_TOP/clone/bin

133. What is statspack?

Ans : Statspack is a database utility to gather database and session level performance information.

134. How to install statspack?

Ans : Run the script spcreate.sql @RDBMS_ORACLE_HOME/rdbms/admin

Note more details on statspack refer metalink noteid: 149113.1

135. How to enable trace at database level?

Ans : set init.ora parameter sql_trace

136. How to enable trace for a session?

Ans: Alter system set sql_trace=true;

Execute the sql query

Alter system set sql_trace=false;

This will create a trace file at

$RDBMS_ORACLE_HOME/admin/contextname/udump with the spid of the current sql session.

137. How to enable trace for other session?

Ans : exec sys.dbms_system.set_sql_trace_in_session(sid,serial#,true/false)

Eg: To enable trace for sql session with sid 8SQL> exec sys.dbms_system.set_sql_trace_in_session(8,121,true);

PL/SQL procedure successfully completed.

To disable trace

SQL> exec sys.dbms_system.set_sql_trace_in_session(8,121,false);

138.What is the location of inint.ora ?

Ans : $RDBMS_ORACLE_HOME/dbs

139. What is that trace files contains and the utiliy used to read them?

Ans : Trace file contains the detail diagnostics of a sql statement like explain plan, physical reads, logical reads, buffer gets etc. Tkprof utility is used to convert trace file into readable format.

140. What is the syntax for tkprof?

Ans: tkprof explain=apps/ sys=no

141.How do we find adpreclone is run in source or not ?

Ans : If clone directory exists under RDBMS_ORACLE_HOME/appsutil for oracle user and $COMMON_TOP for applmgr user.

143. How to find trace file for a given concurrent request id?

Ans : Go to $RDBMS_ORACLE_HOME/admin//udump

grep “ “ *

144. What is a database link? How to create it?

Ans : If we want to access objects of another database from this database then we need a database link from this database to the other.

1.Login as oracle user

2.sqlplus “/as sysdba”

3. create database link connect to identified by using ”;

Ex

SQL> create database link TEST1_TO_TEST2 connect to apps identified by apps using ‘TEST2';

Database link created.

SQL> select name from v$database@ TEST1_TO_TEST2;

NAME

———

TEST2

SQL>select db_link from dba_db_links;

4. Add destination database tns entry in tnsnames.ora
145. How many clonings u have done?

Ans : If u r very much confident on cloning processes then say 5 to 8 otherwise just 2 or 3.

146. What u know abt RMAN?

Ans : If u r good at RMAN then say yes, otherwise say we are not using RMAN for backup/recovery , why because we are using netapp snap technology for backups.

147. What is netapp?

Ans : Netapp is a storage technology.

148. What is formserver url?

Ans :http://hostname.domain:/dev60cgi/f60cgi

149. What is jinitiator?

Ans : Oracle jinitiator is the one which provide the required jvm to run forms interface/applet. When we access forms applet first time , oracle jinitiator will be installed automatically.

150. What is discoverer server?

Ans : Discoverer server is reporting tools which allows novoice user to use oracle application reports. Discoverer will come along with oracle applications when installed.

151. What is discoverer viewer url?

Ans: /discoverer4i/viewer152. What is discoverer plus url?

Ans : Ans : Aoljtest is a web based utility to test the availability of the different components of oracle applications like jserv,modplsql,jsp,forms etc

URL: /OA_HTML/jsp/fnd/aoljtest.jsp
154. What is adsplicer?

Ans : Adsplicer is a uitility used to register off cycle products.

155. What is licence manager?

Ans : Licence manager(adlicmgr) utility is used to licence/unlicence , enable new languages,enbale country specific functionality.

156. What is tnsping?

Ans : tnsping is command used to check the connectivity to the database server node from other nodes.

Ex: tnsping

Note: Tns entry should be there in tnsnames.ora for the database we are trying to work this command.

158. How to compile a form using f60gen?Ans :

f60gen module=/TEST/testappl/au/11.5.0/forms/F/ARXTWMAI.fmb userid=APPS/APPS output_file=/TEST/testappl/ar/11.5.0/forms/F/ARXTWMAI.fmx module_type=form batch=yes compile_all=special

160. What is APPLPTMP environment variable?

Ans : This is the temporary file location for the pl/sql temp files. If this variable was not set then the concurrent programs may errored out. 161. What is mean by enabling maintanance mode?

Ans : Maintanance mode is the adadmin option introduced from AD.I. When maintanance mode is enabled user may able to login to application but they only get profile option in the frontend navigation menu.

162. Is that necessary to enable maintanance mode while applying a patch?

Ans : We can even apply a patch without enabling maintanance mode with the following option

Adpatch options=hotpatch

163. How to find out oracle application framework version?

Ans : 1. Through aoljtest2. cd $COMMON_TOP/html/3. adident Header OA.jsp
164. How to find out what are the rdbms patches applied to an oracle home?

Ans :1. opatch lsinventory

2. $RDBMS_ORACLE_HOME/.patch_storage directory contains the directories with the rdbms patch number, which are applied to this oracle home.

165. Is that necessary to shutdown database while applying a database patch?

Ans : Yes.

166. What is the command line utility to submit a concurrent request?

Ans : CONSUB

167. What is the significance of utl_file_dir parameter in init.ora file?

Ans : The value of this parameter is the group of directories to which u r database can write, means u r database packages have permission to write to flat files in these directories.

168. How you will find out discoverer version?

Ans : cd $806_ORACLE_HOME/discwb4/lib strings libd* grep ‘Version:’

169. While applying a rdbms patch using opatch you are getting the error, unable to read inventory/inventory is corrupted/ORACLE_HOME is not not registered, what you will do, and how you will apply the patch?

Ans: We will check the inventory directory permission, try to apply the patch after giving 777 permissions to that inventory directory. If still it won’t work we will apply patch with the following command:

Opatch apply no_inventory

172. Have you applied rdbms patches and for what?

Ans : We got ORA-7445 error in alert log, for which oracle recommended to apply a rdbms patch.

173. What are the patch errors , you have encountered?

Ans :1)Patch fails with the error, unable to generate perticular form, do u want to continue. We continue patching by saying “yes”, then we manually regenarate the form using f60gen utility.

2) Unable to generate jar files under JAVA_TOP AutoPatch error: Failed to generate the product JAR files Solution:Run adjkey -initialize ———–to creat identitydb.obj file which will beused by adjava to sign jar files.

174. How Frequently you apply patches

Ans : As and when I get a requirement.

175. What type of patches you have applied so far?

Ans : One-off,Mini,Family

177. What are the clone errors, you have encountered?

Ans : Error:

RC-50013: Fatal: Failed to instantiate driver/u01/fms2c/appfms2c/fms2cora/iAS/appsutil/driver/instconf.drvCauseThe source instance has files that adpreclone flags as ‘autoconfigable’ but in reality they are not. So adpreclone.pl adds these files into the instconf.drv. Then when adcfgclone.pl is run on target it looks for the template file to instantiate for these files and since there isn’t a template file adcfgclone.pl fails. SolutionModify the target’s instconf.drv and remove the offending lines. Then rerun adcfgclone.pl
178. What are the real time problems you have encountered and how you trouble shooted that?

Ans:1. Concurrent Program is erroing out with snapshot too old error. To resolve this we have added space to temp tablespace.2. Concurrent Program is erroing out with unable to extent a perticular tablespace by so and so extents. To resolve this we have added on more data file to that tablespace.3. When we are trying to start apache with adapcctl.sh script after a autoconfig run, its saying that “node id is not matching with the application server id”. To resolve this we have updated the server id column in fnd_nodes table with the server id value in dbc file.

179. How you will find workflow version?

Ans : Run wfver.sql@FND_TOP/sql script as apps user

180 . When forms are running in servlet mode then the environment variables required for forms must be defined in what file and its location?

Ans : formsservlet.ini@$APACHE_TOP/Jserv/etc.

181. How to find out which patch driver is applied(like c,d,g or u)?

Ans: query ad_patch_drivers.

182. How to find out whether a language patch is applied for a perticular patch?

Ans : Query ad_patch_driver_langs.

183. How to validate that sysadmin password is correct or not from backend?

Ans: select fnd_web_sec.validate_login(‘SYSADMIN’,’Qwert8765') from dual;

184. How to compile jsp’s(other than from adadmin)?

Ans: Force compilation of all jsps using the following command ojspCompile.pl –compile –flush

185. How to rotate logs for apache logs?

Ans: Using rotatelogs executable in httpd.conf file. Use Errorlog for error_log file rotation. Transferlog for other log files.

186. Other way of checking whether MRC is enabled or not besides using adadmin?

Ans : select multi_currency_flag from fnd_product_groups;

187. How to compile rdf?

Ans: Either using adadmin or rwcon60

189. How to change file/directory owner in linux/solaris?

Ans : chown – R :

Ex: chown – R applmgr:dba testappl

190. How to change the permission of file/directory in linux/solaris?

Ans : chmod –R

Ex : chmod –R 755 testappl

191. What are the files which contain apps password?

Ans :

1. wdbsrv.app@IAS_ORACLE_HOME/Apache/modplsql/cfg
2. CGIcmd.dat@806_ORACLE_HOME/reports60/server
3. wfmail.cfg@FND_TOP/resource – optional

4. CatalogLoader.conf@OA_JAVA – optional

5. CatalogLoader.xml@OA_HTML – optional

192. What is the script to find out ICM status?

Ans : afimchk.sql@FND_TOP/sql
193. What is the script to list the concurrent request status?

Ans: afrqrun.sql@FND_TOP/sql
194. What is the script that Lists managers that currently are running a request?

Ans : afcmrrq.sql@FND_TOP/sql
195) How can I determine whether a template is customizable or non-customizable?

Ans : If a keyword “LOCK” is present at the end of the file entry in the respective driver, then it is a non-customizable template. If the “LOCK” keyword is not seen, then that template can be customized.

196) How to find out JDBC version :

Ans : In the middle tier, edit the jserv.properties file located in the IAS_ORACLE_HOME/Apache/Jserv/etc directory- Locate the wrapper.classpath that is pointing to the jdbc zip file/opt/oracle/apps/$TWO_TASK/comn/java/jdbc14.zip

197)How to findout XML Parser Version

Ans : SQL> select WF_EVENT_XML.XMLVersion() XML_VERSION from sys.dual;

198)How to find out WorkFlow Version

Ans SQL> select TEXT Version from WF_RESOURCES where TYPE = ‘WFTKN’ and NAME = ‘WF_VERSION’;

199) How to find a file version in Application DB:

select v.version,v.CREATION_DATE,c.CREATION_DATE from AD_FILES c,AD_FILE_VERSIONS v where c.FILENAME like ‘ARPURGEB.pls’ AND c.file_id = v.file_id AND c.app_short_name = ‘AR’;

When a copy driver (C) or the copy portion of a unified driver (U) are aborted for any reason, upon reapplying, the CREATION_DATE and/or LAST_UPDATE_DATE columns in the patching history tables (Ex: AD_FILE_VERSIONS)are not updated to show the proper installation date but are left with the 01-01-1950 date. you can resolve the issuse by applying the latest ad.I patch.

200) How to check whether the product is install,shared and Not installed in Apps.?

Ans : By using below Query we can find.

SQL>select t.application_name, t.application_id, i.patch_level, decode(i.status,’I’,’Fully Installed’,‘N’,’Not Installed’,’S’,’Shared’,’Undetermined’) statusfrom fnd_product_installations i, fnd_application_vl twhere i.application_id = t.application_idorder by t.application_id;

adpatch failed with “ld.so.1: adpatchnew: fatal: libm.so.2: open failed: No such file or directory


Solution

To implement the solution, execute the following steps:

1. log in as appl user

2. adrelink.sh force=y “ad adpatch”

3. adrelink.sh force=y “ad all”

Friday, May 11, 2018

Configure PCP with Application Tier with 12c Database.



Configure and verify Load Balancer
Configure context file parameter as per below table. And run autoconfig on both node
 RUN AND PATCH FILE SYSTEM.
Parameters                        Values

s_tools_twotask                  EBSPROD_BALANCE
s_weboh_twotask                  EBSPROD_BALANCE
s_apps_jdbc_connect_alias        EBSPROD_BALANCE
s_webentryurlprotocol            https
s_webentryhost                   ebsprod
s_webentrydomain                tracintermodal.com
s_active_webport                 443
s_login_page                     https://ebsprod.xxxx.com/OA_HTML/AppsLogin



 PCP Setup
Update context file with below parameter values and run autoconfig on both node 
RUN AND PATCH FILE SYSTEM.


Parameters                   Values
s_applcsf                      /app/ebsprod/fs_ne/inst/EBSPROD_svr-ebs-appro01/logs/appl/conc
s_fndreviverpiddir       /app/ebsprod/fs1/inst/apps/EBSPROD_svr-ebs-approd01/pids/appl
s_isAdConc                   YES
s_isAdConcDev             YES
s_batch_status               Enabled
s_tnsstatus                    Enabled

Check the tnsnames.ora and listener.ora configuration files located in
$INST_TOP/ora/10.1.2/network/admin.
Ensure that the required FNDSM and FNDFS entries are present for 
all other concurrent nodes.

Restart the Applications listener processes on each Applications tier.
Log on to Oracle E-Business Suite Release 12 using the SYSADMIN account,
and choose the 
System Administrator Responsibility. Navigate to Install > Nodes screen, 
and ensure that each node in the cluster is registered.
Verify that the Internal Monitor for each node is defined with the
correct primary node specification and work shift details. 
For example, Internal Monitor: Host must have primary node as host.
Also ensure that the Internal Monitor manager is activated: 
this can be done from Concurrent > Manager > Administrator. 
Set the $APPLCSF environment variable on 
all Concurrent Processing nodes to point to a log directory on a shared file system.
Set the $APPLPTMP environment variable on 
all Concurrent Processing nodes to the value of the
 UTL_FILE_DIR entry in init.ora on the database nodes.

Perform the following steps using AD Administration.

1. Relink AD executables (Use AD Relink for this step)
2. Relink Applications programs
3. Generate message files
4. Generate form files
5. Generate report files
6. Generate jar file






Output Post Processor (OPP) Fails To Pick Up Concurrent Requests With Error ‘Unable to find an Output Post Processor service to post-process request

Requests fail during Post Processing with the following errors:

ERROR

———————–

Unable to find an Output Post Processor service to post-process request xxxxx.

Check that the Output Post Processor service is running

CAUSE

Incorrect data in the OPP queue table AQ$FND_CP_GSM_OPP_AQTBL_S, most likely caused by the concurrent managers not being shutdown correctly.

EVIDENCE OF CAUSE

—————

Query shows orphaned OPP subscribers in APPLSYS.AQ$FND_CP_GSM_OPP_AQTBL_S

This is causing select_random_subscriber routine to pick the name of a non-running process.

Solution

Find the active processes for OPP:
SELECT fcp.concurrent_process_id

FROM fnd_concurrent_queues fcq, fnd_concurrent_processes fcp

WHERE concurrent_queue_name = ‘FNDCPOPP’

AND fcq.concurrent_queue_id = fcp.concurrent_queue_id

AND fcq.application_id = fcp.queue_application_id

AND fcp.process_status_code = ‘A’;

Output example:

CONCURRENT_PROCESS_ID

———————

93557

93558

Find the OPP subscribers:

select name from APPLSYS.AQ$FND_CP_GSM_OPP_AQTBL_S;

The name in the table is the concurrent_process_id prefixed with ‘OPP’.

The output should normally correspond to the output of first query: have the same number of records and have as name the concurrent_process_id of the running OPP processes prefixed by OPP

Output example:

NAME

——————————

OPP93558

OPP93557

OPP88933

OPP92625

If there are extra subscribers which are left from previous runs of OPP processes, unsubscribe them:
exec fnd_cp_opp_ipc.unsubscribe(‘<concurrent_process_id>’);

Example:

exec fnd_cp_opp_ipc.unsubscribe(‘88933’);

exec fnd_cp_opp_ipc.unsubscribe(‘92625’);

libXtst.so.6: cannot open shared object file: No such file or directory

While executing rapidwiz for Online Application ( 12.2.0) installation, facing an error related to jre file:
Error:libXtst.so.6: cannot open shared object file: No such file or directory
Solution:
Installed OS Package: xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386.
First remove softlink as below
# unlink /usr/lib/libXtst.so.6

Then create softlink as below commnad.

# ln -s /usr/X11R6/lib/libXtst.so.6.1 /usr/lib/libXtst.so.6

ORA-04031 unable to allocate 720 bytes of shared memory

The error ORA-4031 on the shared pool can indicate one of two things:
– insufficient space for the shared pool
OR
– although there is enough memory, it is fragmented and no contiguous chunk can be allocated to satisfy the latest memory request.
SQL> alter system set “_enable_shared_pool_durations” = false scope=spfile;
System altered.

Saturday, August 26, 2017

OEM CONFIGURATION IN RAC

OEM CONFIGURATION IN RAC



SQL> alter user sysman identified by sysman;

User altered.

SQL> alter user sysman account unlock;

User altered.

SQL>  alter user dbsnmp  account unlock;

User altered.

SQL> alter user dbsnmp  identified by dbsnmp;

User altered.

SQL> conn sysman/sysman;
Connected.
SQL> select * from session_privs;

PRIVILEGE
----------------------------------------
CREATE SESSION
ALTER SESSION
UNLIMITED TABLESPACE
ALTER USER
CREATE TABLE
CREATE CLUSTER
CREATE PUBLIC SYNONYM
CREATE VIEW
CREATE SEQUENCE
CREATE PROCEDURE
CREATE TRIGGER

PRIVILEGE
----------------------------------------
CREATE TYPE
CREATE OPERATOR
CREATE INDEXTYPE
SELECT ANY DICTIONARY

15 rows selected.

SQL> select * from session_roles;

ROLE
------------------------------
RESOURCE
SELECT_CATALOG_ROLE
HS_ADMIN_SELECT_ROLE
MGMT_USER

SQL>

SQL> conn dbsnmp/dbsnmp
Connected.
SQL>  select * from session_roles;

ROLE
------------------------------
OEM_MONITOR
SELECT_CATALOG_ROLE
HS_ADMIN_SELECT_ROLE

SQL>  select * from session_privs;

PRIVILEGE
----------------------------------------
CREATE SESSION
UNLIMITED TABLESPACE
CREATE TABLE
CREATE PROCEDURE
ANALYZE ANY
MANAGE ANY QUEUE
SELECT ANY DICTIONARY
ANALYZE ANY DICTIONARY
ADVISOR
CREATE JOB

10 rows selected.

SQL>


You have specified the following settings

Database ORACLE_HOME ................ /u01/app/oracle/product/11204/dbhome

Database instance hostname ................ Listener ORACLE_HOME ................ /u01/app/11204/grid
Listener port number ................ 1521
Cluster name ................ rcscan
Database unique name ................ DEV
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
ASM ORACLE_HOME ................ /u01/app/11204/grid
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ ASMSNMP


192.168.1.111   rac1pub111.dba.com    rac1pub111

INFO: >>>>>>>>>>> The Database Control URL is https://rac1pub111.dba.com:1158/em <<<<<<<<<<<
Aug 12, 2017 6:31:59 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO:
****************  Current Configuration  ****************
 INSTANCE            NODE           DBCONTROL_UPLOAD_HOST
----------        ----------        ---------------------

DEV               rac1pub111               rac1pub111.dba.com
DEV               rac2pub112               rac1pub111.dba.com


Aug 12, 2017 6:31:59 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************  WARNING  ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /u01/app/oracle/product/11204/dbhome/rac1pub111_DEV/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost.

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Aug 12, 2017 6:31:59 PM



SQL> select status from gv$instance;

STATUS
------------
OPEN
OPEN

SQL> desc v$instance;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 INSTANCE_NUMBER                                    NUMBER
 INSTANCE_NAME                                      VARCHAR2(16)
 HOST_NAME                                          VARCHAR2(64)
 VERSION                                            VARCHAR2(17)
 STARTUP_TIME                                       DATE
 STATUS                                             VARCHAR2(12)
 PARALLEL                                           VARCHAR2(3)
 THREAD#                                            NUMBER
 ARCHIVER                                           VARCHAR2(7)
 LOG_SWITCH_WAIT                                    VARCHAR2(15)
 LOGINS                                             VARCHAR2(10)
 SHUTDOWN_PENDING                                   VARCHAR2(3)
 DATABASE_STATUS                                    VARCHAR2(17)
 INSTANCE_ROLE                                      VARCHAR2(18)
 ACTIVE_STATE                                       VARCHAR2(9)
 BLOCKED                                            VARCHAR2(3)

SQL> select INSTANCE_NUMBER,INSTANCE_NAME,ACTIVE_STATE from  gv$instance;

INSTANCE_NUMBER INSTANCE_NAME    ACTIVE_ST
--------------- ---------------- ---------
              1 DEV1             NORMAL
              2 DEV2             NORMAL

SQL>

How to check oem is running or not

[oracle@rac1pub111 u01]$ export ORACLE_UNQNAME=DEV
[oracle@rac1pub111 u01]$ emctl status agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.4.5
OMS Version       : 10.2.0.4.5
Protocol Version  : 10.2.0.4.5
Agent Home        : /u01/app/oracle/product/11204/dbhome/rac1pub111_DEV
Agent binaries    : /u01/app/oracle/product/11204/dbhome
Agent Process ID  : 51983
Parent Process ID : 51937
Agent URL         : https://rac1pub111.dba.com:3938/emd/main
Repository URL    : https://rac1pub111.dba.com:1158/em/upload/
Started at        : 2017-08-12 18:29:36
Started by user   : oracle
Last Reload       : 2017-08-12 19:05:34
Last successful upload                       : 2017-08-12 21:39:51
Total Megabytes of XML files uploaded so far :    24.32
Number of XML files pending upload           :        0
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :    87.84%
Data channel upload directory                : /u01/app/oracle/product/11204/dbhome/rac1pub111_DEV/sysman/recv
Last successful heartbeat to OMS             : 2017-08-12 21:42:43
---------------------------------------------------------------
Agent is Running and Ready

How to start OEM:

$ emctl start dbconsole

from chrome: https://racpub111.dba.com

No rac to rac cloning Method 1(RCONFIG)

Method 1(RCONFIG):-
-----------------------------
1. Copy database / archive /controlfile backup from standalone to rac server 1)
----RAC SERVER 1:-
2. Create parameter file
vi initTEST.ora

*.audit_file_dest='/u01/app/oracle/admin/TEST/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_name='TEST'
*.diagnostic_dest='/u01/app/oracle'
*.remote_login_passwordfile='exclusive'
*.undo_tablespace='UNDOTBS01'
*.db_file_name_convert='/u01/prod','+DATA'
*.log_file_name_convert='/u01/prod','+DATA'
*.cluster_database=false
*.control_files='+DATA/TEST/CONTROLFILE/current.260.936693527'



SQL> create spfile='+DATA/spfileTEST.ora' from pfile;

[oracle@rac1pub dbs]$ cat initTEST.ora
spfile='+DATA/spfileTEST.ora'
[oracle@rac1pub dbs]$ export ORACLE_SID=TEST

SQL> startup nomount;
ORACLE instance started.

Total System Global Area  238034944 bytes
Fixed Size                  2252016 bytes
Variable Size             180355856 bytes
Database Buffers           50331648 bytes
Redo Buffers                5095424 bytes

[oracle@rac1pub rman]$ rman auxiliary /
RMAN> duplicate target database to TEST backup location '/u01/rman/' nofilenamecheck;

RCONFIG:-CONVERT TEST TO RAC DATABASE

[oracle@rac1pub sampleXMLs]$ pwd
/u01/app/oracle/product/11203/dbhome_1/assistants/rconfig/sampleXMLs
[oracle@rac1pub sampleXMLs]$ cp -rf ConvertToRAC_AdminManaged.xml /u01/app/oracle/
[oracle@rac1pub oracle]$ mv ConvertToRAC_AdminManaged.xml rconfig.xml


[oracle@rac1pub oracle]$ cat rconfig.xml
<?xml version="1.0" encoding="UTF-8"?>
<n:RConfig xmlns:n="http://www.oracle.com/rconfig"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.oracle.com/rconfig rconfig.xsd">
    <n:ConvertToRAC>
<!-- Verify does a precheck to ensure all pre-requisites are met, before the conversion is attempted. Allowable values are: YES|NO|ONLY -->
        <n:Convert verify="ONLY">  ###CHANGE from YES TO ONLY####
<!--Specify current OracleHome of non-rac database for SourceDBHome -->
              <n:SourceDBHome>/u01/app/oracle/product/11203/dbhome_1</n:SourceDBHome>  ##CHANGE O_H
<!--Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome -->
              <n:TargetDBHome>/u01/app/oracle/product/11203/dbhome_1</n:TargetDBHome> ##CHANGE O_H
<!--Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion -->
              <n:SourceDBInfo SID="TEST">  ###SID NAME
                <n:Credentials>
                  <n:User>sys</n:User>
                  <n:Password>manager</n:Password>  ###PASSWORD
                  <n:Role>sysdba</n:Role>
                </n:Credentials>
              </n:SourceDBInfo>
<!--Specify the list of nodes that should have rac instances running for the Admin Managed Cluster Database. LocalNode should be the first node in this nodelist. -->
              <n:NodeList>
                <n:Node name="rac1pub"/>  ###NODE NAME
                <n:Node name="rac2pub"/>  ### NODE NAME
              </n:NodeList>
<!--Specify RacOneNode along with servicename to convert database to RACOne Node -->
              <!--n:RacOneNode  servicename="TEST"/-->  ###SERVICE  NAME####
<!--Instance Prefix tag is optional starting with 11.2. If left empty, it is derived from db_unique_name.-->
              <n:InstancePrefix>TEST</n:InstancePrefix>  ####INSTANCE NAME###
<!-- Listener details are no longer needed starting 11.2. Database is registered with default listener and SCAN listener running from Oracle Grid Infrastructure home. -->
<!--Specify the type of storage to be used by rac database. Allowable values are CFS|ASM. The non-rac database should have same storage type. ASM credentials are no needed for conversion. -->
              <n:SharedStorage type="ASM">
<!--Specify Database Area Location to be configured for rac database.If this field is left empty, current storage will be used for rac database. For CFS, this field will have directory path. -->
                <n:TargetDatabaseArea>+DATA</n:TargetDatabaseArea>  ###DISKGROUP  NAME###
<!--Specify Fast Recovery Area to be configured for rac database. If this field is left empty, current recovery area of non-rac database will be configured for rac database. If current database is not using recovery Area, the resulting rac database will not have a recovery area. -->
                <n:TargetFlashRecoveryArea>+FRA</n:TargetFlashRecoveryArea>  ##FRA DISKGROUP NAME###
              </n:SharedStorage>
        </n:Convert>
    </n:ConvertToRAC>
</n:RConfig>


[oracle@rac1pub oracle]$ rconfig rconfig.xml
<?xml version="1.0" ?>
<RConfig version="1.1" >
<ConvertToRAC>
    <Convert>
      <Response>
        <Result code="0" >
          Operation Succeeded  #####IMP####
        </Result>
      </Response>
      <ReturnValue type="object">
There is no return value for this step     </ReturnValue>
    </Convert>
  </ConvertToRAC></RConfig>

$vi rconfig.xml

!-- Verify does a precheck to ensure all pre-requisites are met, before the conversion is attempted. Allowable values are: YES|NO|ONLY -->
        <n:Convert verify="YES">  ###CHANGE from ONLY TO YES####

[oracle@rac1pub oracle]$ rconfig rconfig.xml
Converting Database "TEST" to Cluster Database. Target Oracle Home: /u01/app/oracle/product/11203/dbhome_1. Database Role: PRIMARY.
Setting Data Files and Control Files

NON RAC TO RAC CLONING(METHOD-MANNUAL)

NON RAC TO RAC CLONING(METHOD-MANNUAL)

1. Copy backup of database/ archivelog / controlfile
[oracle@rac1pub111 u01]$ ls
11.2.0.4  11g.env  app  backup  grid.env  gridsw  lost+found
[oracle@rac1pub111 u01]$

2. scp backup to rac node 1
3. create parameter file and copy to asm disk group


[oracle@rac1pub111 dbs]$ cat initPROD.ora
*.audit_file_dest='/u01/app/oracle/admin/PROD/adump'
*.audit_trail='db'
*.cluster_database=false
*.compatible='11.2.0.4.0'
*.control_files='+DATA/PROD/controlfile/current.260.951842647'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_name='PROD'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=PRODXDB)'
*.open_cursors=300
*.processes=150
*.remote_listener='rcscan:1521'
*.remote_login_passwordfile='exclusive'
*.undo_tablespace='UNDOTBS1'

log_file_name_convert='/u01/test','+DATA'
db_file_name_convert=='/u01/test','+DATA'
[oracle@rac1pub111 dbs]$


4. start database in nomount stage.

ASMCMD> mkdir PROD
ASMCMD> ls
DEV/
PROD/
shz1.dbf
tbs01.dbf
ASMCMD

ASMCMD> mkdir spfile
ASMCMD> pwd
+DATA/PROD
ASMCMD>

[oracle@rac1pub111 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Aug 14 21:02:20 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area  246386688 bytes
Fixed Size                  2252096 bytes
Variable Size             188744384 bytes
Database Buffers           50331648 bytes
Redo Buffers                5058560 bytes
SQL>


SQL>  create spfile='+DATA/PROD/spfile/spfilePROD.ora' from pfile;

File created.

SQL>

5. duplicate target database to clone
    rman auxiliary /

Recovery Manager: Release 11.2.0.4.0 - Production on Mon Aug 14 21:04:49 2017

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to auxiliary database: PROD (not mounted)

RMAN> duplicate target database to 'PROD' backup location '/u01/backup' nofilenamecheck;
6.clone database open.




Mannually setps to convert non rac to rac.

first create spfile from pfile
SQL> create spfile='+DATA/PROD/spfile/spfilePROD.ora' from pfile;

File created.

then create pfile and add loction of spfile.
[oracle@rac1pub111 dbs]$ cat initPROD.ora
spfile='+DATA/PROD/spfile/spfilePROD.ora'

[oracle@rac1pub111 dbs]$


SQL> startup
ORACLE instance started.

Total System Global Area  246386688 bytes
Fixed Size                  2252096 bytes
Variable Size             188744384 bytes
Database Buffers           50331648 bytes
Redo Buffers                5058560 bytes
Database mounted.
Database opened.
SQL> show parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/prod/spfile/spfileprod.o
                                                 ra
SQL>


SQL> alter system checkpoint;

System altered.

SQL> alter system switch logfile;

System altered.

SQL>  alter database add logfile thread 2 group 3 size 100m;

Database altered.

SQL>  alter database add logfile thread 2 group 5 size 100m;

Database altered.

SQL> alter database enable thread 2;

Database altered.

SQL> alter database add logfile thread 1 group 6 size 100m;

Database altered.

SQL> alter database add logfile thread 1 group 7 size 100m;

Database altered.

SQL>  alter database add logfile thread 1 group 8 size 100m;

Database altered.

SQL> alter database drop logfile group 3;

Database altered.

SQL> alter database drop logfile group 2;

Database altered.

SQL> select thread#,group#,bytes/1024 from v$log;

   THREAD#     GROUP# BYTES/1024
---------- ---------- ----------
         1          3      51200
         2          4     102400
         2          5     102400
         1          6     102400
         1          7     102400
         1          8     102400



SQL> create undo tablespace UNDOTBS2 datafile '+DATA';

Tablespace created.



SQL> alter system set cluster_database=true scope=spfile;

System altered.

SQL> alter system set cluster_database_instances=2 scope=spfile;

System altered.

SQL> alter system set THREAD=1 scope=spfile sid='PROD1';

System altered.

SQL>  alter system set THREAD=2  scope=spfile sid='PROD2';

System altered.

SQL> show parameter undo_tablespace;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_tablespace                      string      UNDOTBS1
SQL> alter system set undo_tablespace=UNDOTBS1 scope=spfile SID='PROD1';

System altered.

SQL> alter system set undo_tablespace=UNDOTBS2 scope=spfile SID='PROD2';

System altered.

SQL> alter system set INSTANCE_NUMBER=1 scope=spfile sid='PROD1';

System altered.

SQL> alter system set INSTANCE_NUMBER=2 scope=spfile sid='PROD2';

System altered.


SQL> alter system set diagnostic_dest='/u01/app/oracle' scope=spfile sid='PROD1';

System altered.

SQL> alter system set diagnostic_dest='/u01/app/oracle' scope=spfile sid='PROD2';

System altered.

[oracle@rac1pub111 dbs]$ vi initPROD1.ora
[oracle@rac1pub111 dbs]$ orapwd file=orapwPROD1 password=manager
[oracle@rac1pub111 dbs]$ export ORACLE_SID=PROD1
[oracle@rac1pub111 dbs]$ !sq


node 2

[oracle@rac2pub112 dbs]$ mkdir -p /u01/app/oracle/admin/PROD/adump                  [oracle@rac2pub112 dbs]$

[oracle@rac2pub112 dbs]$ vi initPROD2.ora
[oracle@rac2pub112 dbs]$ orapwd file=orapwPROD2 password=manager
[oracle@rac2pub112 dbs]$ export ORACLE_SID=PROD2
[oracle@rac2pub112 dbs]$ !sq
SQL> startup
ORACLE instance started.

Total System Global Area  263090176 bytes
Fixed Size                  2252256 bytes
Variable Size             205521440 bytes
Database Buffers           50331648 bytes
Redo Buffers                4984832 bytes
Database mounted.
Database opened.
SQL>

SQL>  select status, instance_name  from gv$instance;

STATUS       INSTANCE_NAME
------------ ----------------
OPEN         PROD2
OPEN         PROD1

SQL>


[oracle@rac2pub112 admin]$ pwd
/u01/app/oracle/product/11204/dbhome/rdbms/admin
[oracle@rac2pub112 admin]$ ll catc
catcapi.sql   catcdc.sql    catclust.sql  catcrc.sql
catcapit.sql  catchnf.sql   catcmprm.sql  catcrsc.sql
catcap.sql    catcio.sql    catcmp.sql    catcr.sql
[oracle@rac2pub112 admin]$ ll catclust.sql
-rw-r--r-- 1 oracle oinstall 30182 Aug 12 16:26 catclust.sql
[oracle@rac2pub112 admin]$

FRom node 1


SQL> @?/rdbms/admin/catclust.sql;
 Node 2


SQL> sho parameter remote_listener;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_listener                      string      rcscan:1521
SQL>


node 1

# Generated by Oracle configuration tools.

DEV =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rcscan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DEV)
    )
  )


PROD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rcscan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = PROD)
    )
  )

[oracle@rac1pub112 admin]$

 node 2:

DEV =
(DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rcscan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DEV)
    )
  )


PROD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rcscan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = PROD)
    )
  )



node 1

alter system set local_listener='(ADDRESS = (PROTOCOL=TCP)(HOST=192.168.1.113)(PORT=1521))' scope=both sid='PROD1' ;

alter system set local_listener='(ADDRESS = (PROTOCOL=TCP)(HOST=192.168.1.114)(PORT=1521))' scope=both sid='PROD2' ;


SQL> alter system register;

System altered.

SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

From node 1 only:


[oracle@rac1pub111 u01]$ srvctl add database -d PROD -o /u01/app/oracle/product/11204/dbhome -y AUTOMATIC

[oracle@rac1pub111 u01]$ srvctl config database -d prod
Database unique name: PROD
Database name:
Oracle home: /u01/app/oracle/product/11204/dbhome
Oracle user: oracle
Spfile:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: PROD
Database instances:
Disk Groups:
Mount point paths:
Services:
Type: RAC
Database is administrator managed

[oracle@rac1pub111 u01]$ srvctl modify database -d PROD -p '+DATA/prod/spfile/spfilePROD.ora' -s open

[oracle@rac1pub111 u01]$ srvctl add instance -d PROD -i PROD1 -n rac1pub111
[oracle@rac1pub111 u01]$ srvctl add instance -d PROD -i PROD2 -n rac2pub112

node 1:
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

node 2:

SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

NODE 1:

[oracle@rac1pub111 u01]$ srvctl start database -d PROD
[oracle@rac1pub111 u01]$ srvctl status database -d PROD
Instance PROD1 is running on node rac1pub111
Instance PROD2 is running on node rac2pub112
[oracle@rac1pub111 u01]$


HOW TO ENABLE FRA IN RAC



SQL> show parameter db_recovery_;

NAME                                 TYPE        VALUE
------------------------------------ ----------- -------------           -----------------
db_recovery_file_dest                string
db_recovery_file_dest_size           big integer 0

FROM ANY NODE

SQL> alter system set db_recovery_file_dest_size=20g scope=spfile sid='*';

System altered.

SQL> alter system set db_recovery_file_dest='+FRA' scope=spfile sid='*';

System altered.

SQL>

[oracle@rac1pub111 u01]$ srvctl stop database -d DEV
[oracle@rac1pub111 u01]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sat Aug 12 22:27:59 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.

Total System Global Area 1653518336 bytes
Fixed Size                  2253784 bytes
Variable Size            1040190504 bytes
Database Buffers          603979776 bytes
Redo Buffers                7094272 bytes
Database mounted.
SQL> alter database flashback on;

Database altered.

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
YES

SQL>

[oracle@rac1pub111 u01]$ srvctl stop database -d DEV
[oracle@rac1pub111 u01]$ srvctl start database -d DEV
[oracle@rac1pub111 u01]$ srvctl status database -d DEV
Instance DEV1 is running on node rac1pub111
Instance DEV2 is running on node rac2pub112
[oracle@rac1pub111 u01]$


[oracle@rac2pub112 admin]$ !sq
sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sat Aug 12 22:33:51 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL>  select flashback_on from v$database;

FLASHBACK_ON
------------------
YES

SQL>

Wednesday, August 2, 2017

How to configure Flashback Data Archive on Table level

Flashback Data Archive (FDA)

Points to Remember

1) A FDA can be configured to guarantee the ability to flash back a table to any time(perhaps to a time years ago).

2) Easy to configure – apply to all tables, one or a group of tables with simple “enable archive” command.

3) Secure – complete protection from accidental or malicious updates and deletes.

4) However, you cannot use this feature with clustered, temporary, nested, remote or external tables and
long or nested columns.


Create a new user and grant him the required privileges

SQL> create user adeeb identified by adeeb
Grant succeeded.


SQL> grant connect, resource, flashback archive administer to adeeb;

Grant succeeded.


Create a new separate tablespace for data archive

SQL> create tablespace fda_tsb datafile '/u01/panclone/fda_tsb.db' size 30m;

Tablespace created.



Create flashback archive on this tablespace using the create flashback archive commands follows

SQL>
create flashback archive fl_arch tablespace fda_tsb retention 1 year;
Flashback archive created.


With the above command, a flashback archive named fl_arch is created which resides in the 
tablespace fda_tsb and holds information for one year.
It means that you can use any flashback query which contains one year of historical information regarding the table that is assigned to this flashback archive.

Now, create a table, insert one row and assign it to the flashback archive

SQL> conn adeeb/adeeb
Connected.
SQL> create
table tbl_fl_archive (id number, name varchar2(20));  2

Table created.

SQL> insert into
tbl_fl_archive values(1,'Flashback Archive');  2

1 row created.

SQL> commit
  2  ;

Commit complete.

SQL>

SQL> select * from
tbl_fl_archive;  2

        ID NAME
---------- --------------------
         1 Flashback Archive

SQL>

SQL>  alter table  tbl_fl_archive flashback archive fl_arch;

Table altered.


The historical change on the table tbl_fl_archive will now be written to the flashback archive named fl_archive.

To test it, delete all rows from the table and use flashback queryon that table. Remember, it will not look for the undo data; it will look to the flashback archive file for the changes.



SQL>    select
to_char(sysdate,'ddmmyyyy hh24:mi:ss') ddate
from
dual;  2    3    4

DDATE
-----------------
28072017 19:07:33

SQL> delete
from tbl_fl_archive;  2

1 row deleted.

SQL> commit
  2  ;

Commit complete.

SQL> select * from
tbl_fl_archive;  2

no rows selected


SQL> select * from
tbl_fl_archive as of timestamp to_timestamp('28072017
19:07:33','ddmmyyyy hh24:mi:ss');
  2    3
        ID NAME
---------- --------------------
         1 Flashback Archive

SQL>


How to recover Data using Flashback Data Archive.

SQL> insert into tbl_fl_archive select * from tbl_fl_archive as of timestamp to_timestamp('28072017
19:07:33','ddmmyyyy hh24:mi:ss');  2

1 row created.

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
SYS_FBA_DDL_COLMAP_88630       TABLE
SYS_FBA_HIST_88630             TABLE
SYS_FBA_TCRV_88630             TABLE
TBL_FL_ARCHIVE                 TABLE

SQL> show user;
USER is "ADEEB"
SQL>
























Featured post

Migrate OCR & vote from external to normal or High redundancy in ASM

How to Move OCR & Vote from external to Normal or high. 1)  Create New diskgroup(CRS) with suitable redundancy for OCR and Voting files....

Popular Posts