Wednesday 18 December 2019

live cricket score

How to create a tar file in linux

create a tar file in linux systems

create a tar for all available file in directories
tar -cvf out_test.tar.z *

create a tar for specific file extension
tar -cvf out1_test.tar.z *.log

create a tar for multiple directory
tar -cvf out1_tar.z /home/oradev/out1 /home/oradev/out2

create compress tar file .gz(it will compress the file size)

tar -cvzf compress.tar.gz *.log

[oradev@erp2 out1]$ ls -lt
-rw-rw-r-- 1 oradev oradev   145 Dec  6 16:12 compress.tar.gz
-rw-rw-r-- 1 oradev oradev 10240 Dec  6 16:00 out1_test.tar.z
-rw-rw-r-- 1 oradev oradev 10240 Dec  6 15:58 out_test.tar.z

Another compress options available it slow  compare previous one

tar cvfj compress3.tar.bz2 *.log

Untar commands:

Untar the files to current directory

tar -xvf out1_tar.z

tar -xvf compress.tar.gz

tar -xvf compress2.tar.bz2

Untar the files to remote directory

tar -xvf out_test.tar.z -C /home/oradev/out2/

tar -xvf compress.tar.gz -C /home/oradev/out2/

tar -xvf compress2.tar.bz2 -C /home/oradev/out2/

Untar specific file from tar file:

tar -xvf out1_tar.z test1.log

tar -zxvf compress.tar.gz test1.log

tar -jxvf compress2.tar.bz2  /home/oradev/test1.log

Untar multiple files from tar file.

tar -xvf out2.tar.z best1.log best2.log

tar -zxvf out2.tar.z best1.log best2.log

tar -jxvf out2.tar.z best1.log best2.log

Untar group of files :

tar -xvf out2.tar.z --wildcards  '*.log'

tar -zxvf out2.tar.z --wildcards  '*.log'

tar -jxvf out2.tar.z --wildcards  '*.log'

Include the file or directories into the tar file:

tar -rvf out_tar.z out2

tar -rvf out_tar.z best1.log

Note : Its not possible for compress tar gz and bz2

To count the tar file size:

tar -czf - out23_tar.z |wc -l

tar -czf - out23_tar.gz |wc -l

tar -czf - out23_tar.bz2 |wc -l

Exclude the file from directory while create tar file.

tar -cvzf out23_tar.gz /home/oradev/test --exclude=/home/oradev/old --exclude=/home/oradev/best

tar -cvf out23_tar.z /home/oradev/test --exclude=/home/oradev/old --exclude=/home/oradev/best

tar -cvfj out23_tar.gz /home/oradev/test --exclude=/home/oradev/old --exclude=/home/oradev/best


List of available files in created tar file:

tar -tvf out1_tar.z

tar -tvf  compress.tar.gz

tar -tvf compress.tar.gz

Friday 6 December 2019

create a tar file

create a tar file in linux systems

create a tar for all available file in directories
tar -cvf out_test.tar.z *

create a tar for specific file extension
tar -cvf out1_test.tar.z *.log

create a tar for multiple directory
tar -cvf out1_tar.z /home/oradev/out1 /home/oradev/out2

create compress tar file .gz(it will compress the file size)

tar -cvzf compress.tar.gz *.log

[oradev@erp2 out1]$ ls -lt
-rw-rw-r-- 1 oradev oradev   145 Dec  6 16:12 compress.tar.gz
-rw-rw-r-- 1 oradev oradev 10240 Dec  6 16:00 out1_test.tar.z
-rw-rw-r-- 1 oradev oradev 10240 Dec  6 15:58 out_test.tar.z

Another compress options available it slow  compare previous one

tar cvfj compress3.tar.bz2 *.log

Untar commands:

Untar the files to current directory

tar -xvf out1_tar.z

tar -xvf compress.tar.gz

tar -xvf compress2.tar.bz2

Untar the files to remote directory

tar -xvf out_test.tar.z -C /home/oradev/out2/

tar -xvf compress.tar.gz -C /home/oradev/out2/

tar -xvf compress2.tar.bz2 -C /home/oradev/out2/

Untar specific file from tar file:

tar -xvf out1_tar.z test1.log

tar -zxvf compress.tar.gz test1.log

tar -jxvf compress2.tar.bz2  /home/oradev/test1.log

Untar multiple files from tar file.

tar -xvf out2.tar.z best1.log best2.log

tar -zxvf out2.tar.z best1.log best2.log

tar -jxvf out2.tar.z best1.log best2.log

Untar group of files :

tar -xvf out2.tar.z --wildcards  '*.log'

tar -zxvf out2.tar.z --wildcards  '*.log'

tar -jxvf out2.tar.z --wildcards  '*.log'

Include the file or directories into the tar file:

tar -rvf out_tar.z out2

tar -rvf out_tar.z best1.log

Note : Its not possible for compress tar gz and bz2

To count the tar file size:

tar -czf - out23_tar.z |wc -l

tar -czf - out23_tar.gz |wc -l

tar -czf - out23_tar.bz2 |wc -l

Exclude the file from directory while create tar file.

tar -cvzf out23_tar.gz /home/oradev/test --exclude=/home/oradev/old --exclude=/home/oradev/best

tar -cvf out23_tar.z /home/oradev/test --exclude=/home/oradev/old --exclude=/home/oradev/best

tar -cvfj out23_tar.gz /home/oradev/test --exclude=/home/oradev/old --exclude=/home/oradev/best


List of available files in created tar file:

tar -tvf out1_tar.z

tar -tvf  compress.tar.gz

tar -tvf compress.tar.gz










Friday 29 November 2019

Oracle database upgrade version 10.2.0.1.0 to 10.2.0.4.0



Step 1:download the appropriate patch from my oracle support and save it.

Step 1:  Stop all running services and shutdown database.

Startàrunàtype services.mscàstop all oracle services by using this widow.

Step 2: Take the cold backup of all files...like copy /paste from base directory(oracle)

Step 3: install the download patch in the same oracle home.

Step 4:start all services like the same above,

Step 5: startup database using “startup upgrade” command

Step 6: After database open

Give this command

SQL>spool patch.log(log will store in from which user u run the script that place)

SQL>@ORACLE_HOME/rdbms/admin/catupgrd.sql(this command for upgrade the database)

SQL>spool off

(shutdown the database from restricted mode and open in normal mode)

SQL>shutdown immediate

SQL>startup

(Below script recompile the invalid objects )

SQL>@ORACLE_HOME/rdbms/admin/utlrp.sql

SQL>select * from v$version

(it display upgraded version.)

OBIEE 10g installation on linux


The installation of an OBIEE 10g stack can be summarized in the following steps:

1) Configuration of JDK for Oracle Business Intelligence 
2) Set up of the Oracle Business Intelligence Server
3) Set up of the Oracle Business Intelligence Presentation Services
4) Set up of the Oracle Business Intelligence Client Tool set
PART 1 which is really a prerequisite to the installation of Oracle Business Intelligence Server
STEP :1 Confirm JDK 1.5.0 or higher installed
Redhat RHEL 5.4 comes installed with JRE 1.6 which is not the same as JDK 1.5 . JRE contains the run time binaries needed to run java applets , JDK contains the APIs needed to execute java functions in your application.

We need JDK because in an OBIEE 10g basic installation, J2EE is the Application Server.

To start, open your terminal:

in terminal, run :

java -version

it will generate
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)

in terminal, run:

echo $JAVA_HOME

it will generate no result. $JAVA_HOME is an environmental variable that you configure during your JDK installation. Since neither java -version or echo $JAVA_HOME mention JDK,  we can confirm that you do not have JDK installed
Step 2: Download Java Development Kit 5.xx or higher
Download the binary file :
http://www.oracle.com/technetwork/java/javase/downloads/jdk6u35-downloads-1836443.html

You need to make this file executable. This can be done by changing the permissions.

In terminal, run:
chmod a+x jdk-1_5_0_22-linux-i586-rpm.bin
 Step 3:  Create appropriate folders
We need to move the file to the folder that OBIEE utilizes during install - /usr/local/java. This folder doesn't exist by default so you will have to create it.

In terminal, run:
mkdir /usr/local/java/
cd /usr/local/java/
Note that your account may not have privileges to create a new folder in a system-wide directory, so you may need your sys admin to do this for you.

Now you need to move the  jdk-1_5_0_22-linux-i586-rpm.bin file you downloaded into the /usr/local/java folder.

In terminal, run:
mv /desktop/jdk-1_5_0_22-linux-i586-rpm.bin ./

The above statement assumes you downloaded the file to your /usr/home/username/Desktop folder.

Step 4: Install JDK 5.xx

Now that you've moved the file to the /usr/local/java/ folder, we can begin the install:

In terminal, run:
./jdk-1_5_0_22-linux-i586-rpm.bin


If successful, you will see the following:

Do you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
0
0
Extracting...
  inflating: jdk-1_5_0_22-linux-i586.rpm
Preparing...                ########################################### [100%]
   1:jdk                    ########################################### [100%]

Done.


Step 5: Create an account with read/write privilege to /usr/local/java

If you've been paying attention, you'll notice that all of the above commands had to be executed by either 'root' or a super user. You cannot install OBI as root, nor should you attempt to run a server as root due to security concerns.

The appropriate solution is to create a new user with access to the folders needed for installation.

We are now going to create a new user which we will use for the rest of the installation.

Have your admin/root account run the following commands in terminal:

groupadd obi  #create a group called oinstall
 
/usr/sbin/useradd obi -g obi  #create a user called obi, with membership to group obi
 
passwd obi #create a new password for user obi


Now give user obi read/write access to the /usr/local/java folder. This is necessary because during the start of BI presentation services, log files will be created and .jar files will be executed.

In terminal, run the following command:

chown -R obi:obi /usr/local/java

chmod -R 777 /usr/local/java

cd /usr/local

ls –l

Command ls -l should generate:

drwxrwxr-x  3 obi  oinstall 4096 May 23 13:42 java

User obi now has read/write access to /usr/local/java

Step 6: Update the bash profile for user obi

 Remember in step run, when we ran echo $JAVA_HOME , no results were returned? This is not ok because $JAVA_HOME is an environmental variable that OBIEE server uses during its install. We need to create this variable prior to installing OBIEE Server.
As I stated earlier, OBIEE Server cannot be installed on root. We created a user obi which we will utilize during installation. So we need to modify the bash profile for user obi.

Log out of your current user, and into user obi.

In your bash shell terminal, run the following command:

vi ~/.bash_profile

and modify it to include:

# Java Home
JAVA_HOME=/usr/java/jdk1.5.0_22
export JAVA_HOME
After you save your changes, restart your machine , log back into obi and in terminal , run:

Or sourch the bash file like   terminal(. .bash_profile)
echo $JAVA_HOME
you should get the following output:

/usr/local/java/jdk1.5.0_22

You now have:
1) JDK installed
2) a user called obi
3) user obi has access to /usr/local/java folder
4) user obi has an environmental variable called JAVA_HOME

Notice how we haven't even downloaded or installed OBIEE yet. This is fundamental pre-work that must be done. Take the time to understand this and do not proceed until echo $JAVA_HOME is populated and obi user has read/write access to /usr/local/java.

PART 2:
Step 1 : Modification of bash shell script to include Oracle Environmental Variables


The OBIEE 10g installation is going to look for the following variables in your bash profile:

1) $JAVA_HOME
2) $PATH  - modified to include your OBI Set up folder

We created the $JAVA_HOME variable in step 1, so let's go ahead and modify our bash shell script to include the OBI Set up folder for the $PATH variable

For user account OBI, run the following command in terminal:
vi ~/.bash_profile

modify the bash shell start up script to include 

# OBI Setup Script

PATH=$PATH:/usr/local/OracleBI/setup

export PATH

Also, set the file descriptor limit to 10240 

# File Descriptor Limit

ulimit -n 10240 


step 2: Create installation folders & grant required access

Oracle Analytics Server uses /u05/local/OracleBI/setup and /u05/local/OracleBIData/setup for installation and execution. We need to create those folders and grant our user obi read write access:

Log into your root/super user account or have the sys admin execute the following commands:
 
mkdir -p /u05/local/OracleBI

chown -R obi:obi /u05/local/OracleBI

chmod -R 775 /usr/local/OracleBI

mkdir -p /u05/local/OracleBIData

chown -R obi:obi /u05/local/OracleBIData

chmod -R 775 /usr/local/OracleBIData

mkdir -p /u05/local/OracleBI/setup
mkdir -p /u05/local/OracleBIdata/setup
Step 3: Confirm /dev/random and /dev/urandom are available

Oracle BI  Presentation Services requires pseudo random number generation devices. Confirm your system has urandom and random installed:
In terminal, run the following command:

[root@oel11g ~]# cd /dev
[root@oel11g dev]# ls *random
random  urandom

You should see the following output:

random  urandom

Step 4: Download Oracle BI Suite EE 10.1.3
and download x86 (Red Hat Linux / Oracle Enterprise Linux)

Then extract the file to your /tmp folder. You should have 2 folders:

drwxrwxr-x  3    59934 obi       4096 May 24 10:40 Server
drwxrwxr-x  5    59934 obi       4096 May 24 10:41 Server_Ancillary

Using your root/super user account, execute (or have the sys admin) the following commands:

chown -R obi:obi /tmp/Server
chmod -R 775 /tmp/Server
chown -R obi:obi /tmp/Server_Ancillary
chmod -R 775 /tmp/Server_Ancillary

Step 5: Run final compatibility check with UnixChk.sh


Oracle created a script which will determine if you've successfully completed all of the pre-work needed for installation.
In terminal, run the following command:
./UnixChk.sh -b /u05/local/OracleBI 

You should get the following output: 

SUCCESS!! - This machine is configured for Oracle BI EE 10.1.3.3.2

Step 6: Proceed with installation


Congratulations, you've completed all of the required pre-work needed to install OBIEE! Let's get started! Navigate to your /u05/local/OracleBI/setup folder and run the following command as a obi user

if any error through like permission problem follow below steps.
As the Java Development Kit 1.5.0 or greater installation location and all its files and subdirectories must have the writable user or user group permissions for the user installing Oracle Business Intelligence, run the following as root:
chmod -R 777 /usr/java/jdk1.5.0_22

./setup.sh

You will be asked to identify your java directory, installation type and installation folder.
Here are the details:
  • Installation Location: /u05/local/OracleBI
  • Data Location: /u05/local/OracleBIData
  • Installation Type: Basic
  • JDK Location: /usr/java/jdk1.5.0_22 or higher
select next options in the installer.

Just Click on Next to continue the installation process.
Next Screen will appear like following. Here you have to give the folder name where you want to install the OBIEE 10g. It will ask to folder Names. 
     
/u05/local/oracleBI/ for Admin Tool Process related with OracleBIServer Service
/u05/local/OracleBIData for Webcatalog related with oracleBIPresentationService

FYI: Basic vs Advanced Installation Primer:

Basic installation uses the J2EE Application Server rather than the Oracle Application Server. If you want to utilize single sign on, select Advanced.

select basic installation options select next.

with the above option, Select Basic Option and Click Next

4. Next Screen will give the choice that what are the component we want with the installation. Select "Complete" and Click Next

choose the complete setup options then select next.


5. This screen will give what are the components of OBIEE 10g going to install. By default all the components are selected. If you don't want any of the components, you have the choice to unselect it.

select to next.

6. In the following screen, we have to specify the installed JDK Location and Enter OC4JAdmin Password. Keep that in Mind. This password is getting used to Login with Enterprise Manager and to UnInstall the OBIEE.


choose the jdk location and select the administrator password then continue 


8. After the changes, Click Next button and select which language you want to see the Error Message Language Selection

select language.

9.  So, The installation will start with the following Screen and It will take some moment to install all the components of OBIEE 10g

preview select continue.

10. We will get Installing OBIEE Components 100% Screen and following that the other screen also will come.

 installation continue

select next 

then select restart finish.                                   

Restore the JDK directory permission as root:
chmod -R 755 /usr/java/jdk1.5.0_22

Step 7: Start Services

Now that you've installed OBIEE Server & Presentation services, you need to activate it by running the following scripts from your /usr/local/OracleBI/setup folder:
./oc4j -start # starts Oracle Application Server
./run-sa.sh start # starts BI server
./run-saw.sh start # starts presentation server
./run-ccs.sh start  # Oracle BI Cluster Controller


To shutdown the server, you need to run the commands in the opposite order:

./run-ccs.sh stop
./run-saw.sh stop
./run-sa.sh stop
./oc4j -shutdown -port ---- -password oc4jadmin 

Installation complete and check the BI server username/password is Administrator/ Administrator is located on http://hostname.domainname.net:portnumber/analytics.