Sports

https://www.espncricinfo.com/ci/engine/match/scores/desktop.html
Showing posts sorted by relevance for query Oracle. Sort by date Show all posts
Showing posts sorted by relevance for query Oracle. Sort by date Show all posts
Tuesday, August 12, 2014

How to Check Application Version in Oracle Apps R12

sql query to find file version in oracle apps

how to check database version in oracle

Join the newsletter

Subscribe to get our latest content by email.
You can use adident after setting APPS<SID>.env variable in ERP R12 or 11i

adident Header <file name>

Example :

You can give the whole directory path and run this as
[oracle@test server]$ adident Header $JAVA_TOP/oracle/apps/pos/supplier/webui/ByrMngSitesCO.class

$Header ByrMngSitesCO.java 120.22.12010000.8 2009/11/20 19:13:22 atjen ship $

or goto $JAVA_TOP/oracle/apps/pos/supplier/webui directory and type

[oracle@test server]$ cd $JAVA_TOP/oracle/apps/pos/supplier/webui
[oracle@test webui]$ adident Header ByrMngSitesCO.class
ByrMngSitesCO.class:
$Header ByrMngSitesCO.java 120.22.12010000.8 2009/11/20 19:13:22 atjen ship $

The alternate Linux command strings -a and it will return the same result for you

strings -a ByrMngSitesCO.class | grep '$Header'
N$Header: ByrMngSitesCO.java 120.22.12010000.8 2009/11/20 19:13:22 atjen ship $

I hope this helps you understand these two important commands

Thanks in advance,

Muhammad Kamran Saeed

Thursday, September 15, 2022

Migrate Weblogic Domain to another Server

Migrate WebLogic 12c steps in Linux

Overview

Here I am going to share with you how we can rename WebLogic 11g Instance for cloning purposes or as per any other requirement.

Example

We have 2 x Linux Servers

Server 1 = prodserver.domain.com

Server 2 = testserver.domain.com

Step 1

Edit file vi /oracle/domains/FRDomain/config/fmwconfig/servers/AdminServer/applications/em/META-INF/emoms.properties

And change

1.       oracle.sysman.emSDK.svlt.ConsoleServerHost=testserver.domain.com

2.       oracle.sysman.emSDK.svlt.ConsoleServerName=testserver.domain.com:7001_Management_Service

Step 2

Open file /oracle/domains/FRDomain/servers/WLS_REPORTS/tmp/_WL_user/reports_11.1.2/uxabaw/configuration/rwservlet.properties and change host name entry.

Step 3

Edit Start and Stop Web logic scripts

Open file /oracle/domains/FRDomain/bin/startWebLogic.sh and edit host name entry.

Open file /oracle/domains/FRDomain/bin/stopWebLogic.sh and edit host name entry.

Open file /oracle/domains/FRDomain/bin/startManagedWebLogic.sh and edit host name entry.

Open file /oracle/domains/FRDomain/bin/stopManagedWebLogic.sh and change host name entry.

Step 4

Verify both scripts

1)      Start Weblogic using script and Form and Report Services.

2)      Stop Weblogic using script and Form and Report Services.

Conclusion

In this way, we can make a Test Server for Weblogic Forms and Reports environment.

Thursday, September 15, 2022

Scheduling Oracle Enterprise 13c OMS backup

13c OMS Schedule Backup

Overview

Let's configure Oracle 13c OMS that is running with the following details:-

Operating System        Oracle Linux 6.10 (el6uek.x86_64)

Database SID               testdb

Database Version         Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

Oracle 13c OMS Ver   Oracle Enterprise Manager Cloud Control 13c Release 3

Following is the script for taking weekly cold backup for 13c OMS Server in a Linux environment

Step 1

Create a script with cold.sh as per my sample script

Script

echo

echo

date

echo

echo "Shutting Down OMS Services of 13c Monitoring Cloud Control for Cold Backup ......."

echo

echo

echo

export ORACLE_HOME=/u01/db/dbhome_1

export ORACLE_SID=testdb

export OMS_HOME=/u01/cloud/middleware

export AGENT_HOME=/u01/cloud/agent/agent_13.3.0.0.0

$OMS_HOME/bin/emctl stop oms -all

/u01/cloud/agent/agent_13.3.0.0.0/bin/emctl stop agent

echo "Shutting Down Database and Listener Services of 13c Monitoring Cloud Control for Cold Backup ......."

echo

echo

echo

#$ORACLE_HOME/bin/sqlplus "/ as sysdba" <<EOF1

#shutdown immediate;

#EOF1

#sqlplus "/ as sysdba" <<EOF1

#shutdown immediate;

#EOF1

#$ORACLE_HOME/bin/lsnrctl stop

date

echo

sleep 10;

date

echo "All Services are down for 13c Monitoring Cloud Control Cold Backup ......."

echo

echo

echo

date

echo "Starting Tar Backup for 13c Monitoring Cloud Control with Database"

echo

echo

echo

AS1=Oracle13c-OMS-TAR_$(date +%d-%m-%Y).tgz

#AS2=Oracle13c-DB-TAR_$(date +%d-%m-%Y).tgz

#AS3=Oracle13c-DBInventory-TAR_$(date +%d-%m-%Y).tgz

echo

/bin/tar -cvzf /u01/backup/cold/$AS1 /u01/cloud

#/bin/tar -cvzf /u01/backup/cold/$AS2 /u01/db

#/bin/tar -cvzf /u01/backup/cold/$AS3 /u01/oraInventory

echo

echo

date

echo

echo "Backup Successfully Completed for 13c Monitoring Cloud Control"

echo "Starting 13c Monitoring Cloud Control Services ......."

$ORACLE_HOME/bin/lsnrctl start

$ORACLE_HOME/bin/sqlplus "/ as sysdba" <<EOF1

startup;

EOF1

$OMS_HOME/bin/emctl start oms

/u01/cloud/agent/agent_13.3.0.0.0/bin/emctl start agent

date

echo "All Services are Up after 13c Monitoring Cloud Control Cold Backup Completion ......."

echo

echo


Step2

Create a crontab schedule job for running the above script on a weekly basis

01 00 * * 6 /home/oracle/backup/scripts/cold.sh > /home/oracle/backup/logs/cold.log

Conclusion

This script will run at 00:01 on Saturday Night, you may change it accordingly as per your desired time.


Wednesday, October 15, 2014

Export Data from Oracle using SQL*Loader


sql loader xlsx file

Using SQL Loader for Single and Multiple Files


Hello, All My Friends,
=====
This is for Windows Scenario, You can add Service using Net Configuration Assistant to connect to your server machine and that is the much safer way in my little opinion.

Let's Start it right now

For Single Load File

=======================

Requirements are as under:-
===================

  1. Create a sample table (I use Scott.dept2 table created from dept with the addition of  ENTDATE column)
  2. One control file (control.txt)
  3. One data file (data.csv)
  4. One batch file (optional)
Important Note:-

Join the newsletter

Subscribe to get our latest content by email.
Before you start working on this article, just remember that file paths must be correct and clearly mentioned with their drive letters for avoiding any inconvenience.

Here is the example

Control File (ControlFile.txt)
========

------------------------------------------------------------
-- SQL-Loader Basic Control File
------------------------------------------------------------
options  ( skip=1 )
load data
  infile 'F:\oracle\dbHome\BIN\sqlloader\single_file_Insert\dept.csv'           
  truncate into table   scott.dept2
fields terminated by ","       
optionally enclosed by '"' 
  ( DEPTNO
  , DNAME
  , LOC
  , ENTDATE
  ) 

Data File (dept.csv)
======================

  DEPTNO,DNAME,LOC,entdate
1,F1,X1,15-Oct-14
2,G1,X2,16-Oct-14
3,H1,X3,17-Oct-14
4,I1,X4,18-Oct-14
5,J1,X5,19-Oct-14
6,K1,X6,20-Oct-14
7,L1,X7,21-Oct-14
8,M1,X8,22-Oct-14
9,N1,X9,23-Oct-14
10,O1,X10,24-Oct-14
11,P1,X11,25-Oct-14
12,Q1,X12,26-Oct-14
13,R1,X13,27-Oct-14
14,S1,X14,28-Oct-14
15,T1,X15,29-Oct-14
16,U1,X16,30-Oct-14
17,V1,X17,31-Oct-14
18,W1,X18,1-Nov-14
19,X1,X19,2-Nov-14
20,Y1,X20,3-Nov-14
21,Z1,X21,4-Nov-14

Batch File (Start_SQL_Load.bat)
============

@echo off
F:\oracle\dbHome\BIN\sqlldr 'scott@pmstest' control='F:\oracle\dbHome\BIN\sqlloader\single_file_Insert\ControlFile.txt'
log='F:\oracle\dbHome\BIN\sqlloader\single_file_Insert\Results.log'
pause

Last Step
======
Just double-click this batch file. (Then just verify that records are inserted successfully)

Note: No need to create dept.bad file it will create this automatically


For Mulitple File Insertion

==============================

Requirements are as under:-
===================
  1. Create a sample table (same as above dept2 with ENTDATE column addition)
  2. Single control file (control.txt)
  3. multiple data file (data1.csv , data2.csv)
  4. One batch file (optional)

Control File (control.txt)
------------------------------------------------------------
-- SQL-Loader Basic Control File
------------------------------------------------------------
options  ( skip=1 )
load data
  infile 'F:\oracle\dbHome\BIN\sqlloader\multi_file_insert\dept1.csv'        
  infile 'F:\oracle\dbHome\BIN\sqlloader\multi_file_insert\dept2.csv'        
  truncate into table   scott.dept2
fields terminated by ","    
optionally enclosed by '"'
  ( DEPTNO
  , DNAME
  , LOC
  , entdate
  )

Ist Data File (dept1.csv)
======================

 DEPTNO,DNAME,LOC,entdate
1,F1,X1,15-Oct-14
2,G1,X2,16-Oct-14
3,H1,X3,17-Oct-14
4,I1,X4,18-Oct-14
5,J1,X5,19-Oct-14
6,K1,X6,20-Oct-14
7,L1,X7,21-Oct-14
8,M1,X8,22-Oct-14
9,N1,X9,23-Oct-14
10,O1,X10,24-Oct-14
11,P1,X11,25-Oct-14
12,Q1,X12,26-Oct-14
13,R1,X13,27-Oct-14
14,S1,X14,28-Oct-14
15,T1,X15,29-Oct-14
16,U1,X16,30-Oct-14
17,V1,X17,31-Oct-14
18,W1,X18,1-Nov-14
19,X1,X19,2-Nov-14
20,Y1,X20,3-Nov-14
21,Z1,X21,4-Nov-14



2nd Data File (dept2.csv)
======================
 DEPTNO,DNAME,LOC,entdate
22,F2,X1,17-Oct-14
23,G2,X2,18-Oct-14
24,H2,X3,19-Oct-14
25,I2,X4,20-Oct-14
26,J2,X5,21-Oct-14
27,K2,X6,22-Oct-14
28,L2,X7,23-Oct-14
29,M2,X8,24-Oct-14
30,N2,X9,25-Oct-14
31,O2,X10,26-Oct-14
32,P2,X11,27-Oct-14
33,Q2,X12,28-Oct-14
34,R2,X13,29-Oct-14
35,S2,X14,30-Oct-14
36,T2,X15,31-Oct-14
37,U2,X16,01-Nov-14
38,V2,X17,02-Nov-14
39,W2,X18,03-Nov-14
40,X2,X19,04-Nov-14
41,Y2,X20,05-Nov-14
42,Z2,X21,06-Nov-14

Batch File (Start_SQL_Load.bat)
============

@echo off
F:\oracle\dbHome\BIN\sqlldr 'scott@pmstest' control='F:\oracle\dbHome\BIN\sqlloader\multi_file_insert\ControlFile.txt'
log='F:\oracle\dbHome\BIN\sqlloader\multi_file_insert\Results.log'

pause
Last Step
=======

Just double-click this batch file. (Then just verify that records are inserted successfully using sqlplus)

Result
=======
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining, and Real Application Testing options

SQL> select * from dept2;

    DEPTNO DNAME          LOC           ENTDATE
---------- -------------- ------------- ---------
         1 F1             X1            15-OCT-14
         2 G1             X2            16-OCT-14
         3 H1             X3            17-OCT-14
         4 I1             X4            18-OCT-14
         5 J1             X5            19-OCT-14
         6 K1             X6            20-OCT-14
         7 L1             X7            21-OCT-14
         8 M1             X8            22-OCT-14
         9 N1             X9            23-OCT-14
        10 O1             X10           24-OCT-14
        11 P1             X11           25-OCT-14

    DEPTNO DNAME          LOC           ENTDATE
---------- -------------- ------------- ---------
        12 Q1             X12           26-OCT-14
        13 R1             X13           27-OCT-14
        14 S1             X14           28-OCT-14
        15 T1             X15           29-OCT-14
        16 U1             X16           30-OCT-14
        17 V1             X17           31-OCT-14
        18 W1             X18           01-NOV-14
        19 X1             X19           02-NOV-14
        20 Y1             X20           03-NOV-14
        21 Z1             X21           04-NOV-14
        22 F2             X1            17-OCT-14

    DEPTNO DNAME          LOC           ENTDATE
---------- -------------- ------------- ---------
        23 G2             X2            18-OCT-14
        24 H2             X3            19-OCT-14
        25 I2             X4            20-OCT-14
        26 J2             X5            21-OCT-14
        27 K2             X6            22-OCT-14
        28 L2             X7            23-OCT-14
        29 M2             X8            24-OCT-14
        30 N2             X9            25-OCT-14
        31 O2             X10           26-OCT-14
        32 P2             X11           27-OCT-14
        33 Q2             X12           28-OCT-14

    DEPTNO DNAME          LOC           ENTDATE
---------- -------------- ------------- ---------
        34 R2             X13           29-OCT-14
        35 S2             X14           30-OCT-14
        36 T2             X15           31-OCT-14
        37 U2             X16           01-NOV-14
        38 V2             X17           02-NOV-14
        39 W2             X18           03-NOV-14
        40 X2             X19           04-NOV-14
        41 Y2             X20           05-NOV-14
        42 Z2             X21           06-NOV-14

42 rows selected.

SQL>


Note: No need to create dept.bad file it will create this automatically 

Did you like this blog please appreciate.

Thanks & Regards,

Muhammad Kamran Saeed

Popular