Tuesday 10 January 2017

Adding a Component in 11g or 12c

Create New Report Server in Oracle 12c and 11g
Oracle 12c Methods:
1.    Create a reports tools instance (Mandatory, if you are planning to use the same box for reports development)
2.    Create a reports server instance (OPTIONAL, only if you want to host a standalone reports instance)
3.    Goto‘C:\Oracle\Middleware\Oracle_Home\user_projects\domains\Classic_domain\bin>
startComponent<Report Server name>’
Start WLST(Weblogic Scripting Tool) console, and execute the below commands one after another (Make sure the node manager & the Weblogic admin server services are already started)
connect("weblogic","weblogic password", "hostname:7001")
my weblogic password :weblogic123
my hostname : localhost
createReportsToolsInstance(instanceName='reptools1', machine='AdminServerMachine')
createReportsServerInstance(instanceName='repserver', machine='AdminServerMachine')
exit()
Oracle 11g Methods:
For running reports, if you need to create a new standalone report server, you can do so by the following steps:
1.     Go to %ORACLE_INSTANCE%\bin ($ORACLE_INSTANCE/bin in Unix)
2.     Type in “opmnctl status” to see if opmn is running. If not, run “opmnctl startall”.
3.     Type in the following to create a new standalone reports server: 
opmnctl createcomponent -adminUsername weblogic -adminHost full_computer_hostname -adminPort 7001 -oracleHome C:\Oracle\Middleware\as_1 -oracleInstance C:\Oracle\Middleware\asinst_1 -instanceName asinst_1 -componentName name_of_report_server -componentType ReportsServerComponent
Example : opmnctl createcomponent –adminUsername weblogic –adminhost localhost –adminport 7001 –oracleHome C:\Oracle\Middleware\FRMHome_1 –oracleInstance  C:\Oracle\Middleware\asinst_1 –instanceName asinst_1 –componentName repserver –componentType ReportServerComponent
4.     Start the server “opmnctl startproc ias-component=name_of_report_server”

REP-51019: System user authentication is missing.

Error:
REP-51019: System user authentication is missing.
Solution:
First take a back/rename up of your rwserver.conf original file.

Some changes required in rwserver.conf
remove security tag from

<job jobType="report" engineId="rwEng" securityId="rwJaznSec"/>
to
<job jobType="report" engineId="rwEng"/>

And
Comment the line below from
<security id="rwJaznSec" class="oracle.reports.server.RWJAZNSecurity"/> to <!--security id="rwJaznSec" class="oracle.reports.server.RWJAZNSecurity"/-->

You will find the rwserver.conf file from the below path.

C:\Oracle\Middleware\Oracle_Home\user_projects\domains\Classic_domain\config\fmwconfig\components\ReportsServerComponent\Your_report_server_name\rwserver.conf

C:\Oracle\Middleware\Oracle_Home\user_projects\domains\Classic_domain\config\fmwconfig\servers\WLS_REPORTS\applications\reports_12.2.1\configuration\rwserver.conf

C:\Oracle\Middleware\Oracle_Home\user_projects\domains\Classic_domain\config\fmwconfig\components\ReportsToolsComponent\reptools1\rwserver.conf


1)    Make single signon yes
2)      Add the below <webcommandaccess>L2</webcommandaccess> 

Path may be different from machine to machine.

Check with your path.

Restart your Report Server….

Displaying Icon on Button in Oracle Forms 12c


Icons Buttons in 12c Fusion Middleware.
1. Start the following Services
     Start Weblogic Admin Server
     Start Weblogic Server WLS_FORMS
2. copy the icon folder in following path
    C:\Oracle\Middleware\<ORACLE_HOME>\forms\java

3. Switch to command Prompt
   cd C:\Oracle\Middleware\<ORACLE_HOME>\forms\java\icons
   now apply the following command
   C:\Oracle\Middleware\<ORACLE_HOME>\forms\java\icons>C:\Oracle\Middleware\<ORACLE_HOME>\oracle_common\jdk\bin\jar -cvf frmicons.jar *.gif


4.copy the icons.jar file into C:\Oracle\Middleware\<ORACLE_HOME>\forms\java

5. Edit/update formsweb.cfg file: (Don’t Forget to take back up File)
Path=C:\Oracle\Middleware\<ORACLE_HOME>\user_projects\domains\<my_domain>\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_12.1.1\config\formsweb.cfg  …to update/include:
Forms applet parameter
codebase=/forms/java
# Forms applet parameter
imageBase=codebase
# Forms applet archive setting for other clients (Sun Java Plugin…etc)
archive=frmall.jar,frmicons.jar
# Forms applet archive setting for JInitiator
archive_jini=frmall_jinit.jar,frmicons.jar[/text]

6. Edit/update Registry.dat file: (Don’t Forget to take back up File)
Path=C:\Oracle\Middleware\<ORACLE_HOME>\user_projects\domains\<my_domain>\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_12.1.1\config\forms\registry\oracle\forms\registry\Registry.dat
[text]default.icons.iconpath=icons/
default.icons.iconextension=gif[/text]

7. At the end of CLASSPATH in DEFAULT.env add the following value
  ;C:\Oracle\Middleware\<ORACLE_HOME>\forms\java\icons.jar
8. a block message appear from java, press do not block
9. now run your forms.

The path and drive i used to this practical its created on my PC, but you must change the path and drive where you install the oracle forms.

Character Set Change


--------------Steps to change the database character set------------


To change the database character set, perform the following steps:

1. Shut down the database, using either a SHUTDOWN IMMEDIATE or a SHUTDOWN NORMAL statement.

2. Do a full backup of the database because the ALTER DATABASE CHARACTER SET statement cannot be rolled back.

3. Startup Oracle database

SQL> startup mount;
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SQL> ALTER SYSTEM SET AQ_TM_PROCESSES=0;
SQL> ALTER DATABASE OPEN;
SQL> ALTER DATABASE CHARACTER SET AL32UTF8;
If you get the error ORA-12712, please update the following table.

"ORA-12712: new character set must be a superset of old character set"

SQL> update sys.props$ set VALUE$='AL32UTF8' where NAME='NLS_CHARACTERSET';
SQL> commit;
If you get the error ORA-12721, please login as DBA user.

"ORA-12721: operation cannot execute when other sessions are active"

4. shutdown immediate; or shutdown normal;

5. startup oracle database

SQL> startup mount;
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SQL> ALTER SYSTEM SET AQ_TM_PROCESSES=0;
SQL> ALTER DATABASE OPEN;
SQL> ALTER DATABASE CHARACTER SET AL32UTF8;
select open_mode from v$database;
SQL> shutdown immediate;
SQL> startup;

--------------------Check the NLS parameters--------------------------

SQL> SELECT PARAMETER, VALUE FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER IN ('NLS_CHARACTERSET', 'NLS_NCHAR_CHARACTERSET');