top of page

Results found for ""

  • DBCA Silent Mode Oracle

    DBCA Silent Mode Oracle When you work in real-time on a remote server, you might not have access to graphical user interface. In such situations, you would need to run DBCA in silent mode to create a database. DBCA Silent Mode 19c DBCA Silent Mode 12c DBCA Silent Mode 11g DBCA Silent Mode Delete Database DBCA Silent Mode 19c Fire DBCA to create 19c database dbca - silent - createDatabase \ - templateName General_Purpose . dbc \ - gdbname $ { ORACLE_SID } - sid $ { ORACLE_SID } \ - characterSet AL32UTF8 \ - sysPassword enterDB# 123 \ - systemPassword enterDB# 123 \ - createAsContainerDatabase false \ - totalMemory 2000 \ - storageType FS \ - datafileDestination / u01 / db_files \ - emConfiguration NONE \ - ignorePreReqs - sampleSchema true DBCA Silent Mode 12c As Oracle 12c has PDB and CDB concepts, the DBCA silent mode has some more parameters compared to Oracle 11g. The below command creates Oracle 12c database by running DBCA in silent mode. This commands works for both Oracle 12cR1 and Oracle 12cR2 dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName testdb -sid testdb -createAsContainerDatabase false -emConfiguration NONE -datafileDestination /u01/db_files -storageType FS -characterSet AL32UTF8 -totalMemory 2048 -recoveryAreaDestination /u01/FRA -sampleSchema true Notice new parameters -createAsContainerDatabase specifies if you want to create a container database -datafileDestination specifies the location of your data files -recoveryAreaDestination specifies the fast recovery area location DBCA Silent Mode 11g To run DBCA in silent mode, you just need to add -silent while running the DBCA utility. The below command will create testdb database in silent mode (oracle 11g version) dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname testdb -sid testdb -characterSet AL32UTF8 -memoryPercentage 20 -emConfiguration NONE Notice the parameters -silent will run dbca in silent mode -createDatabase specifies the option you want to perform -templateName specifies the database template you using -gdbname is your global database name -sid is your database identifier DBCA Silent Mode Delete Database You can use DBCA to delete database from a Linux server. Use below command to run DBCA in silent mode and delete a database dbca -silent -deleteDatabase -sourceDB testdb -sysDBAUserName sys Further Read DBCA command reference for silent mode Related Posts Heading 2 Add paragraph text. Click “Edit Text” to customize this theme across your site. You can update and reuse text themes.

  • Data File

    Data File

  • Oracle Database Health Check

    Oracle Database Health Check Daily DB Health Checks Below are daily checks which are to be performed by a DBA: Check all instance, listener are up and running SELECT NAME, OPEN_MODE FROM V$DATABASE; LSNRCTL STATUS; 2. Check ALERT log errors SHOW PARAMETER BACKGROUND_DUMP_DEST 3. Capacity planning – Tablespace space checking&Archive log space checking SELECT TABLESPACE_NAME, SUM(BYTES/1024/1024) FROM DBA_FREE_SPACE GROUP BY TABLESPACE_NAME 4. Verify success of backup & archiving 5. AWR report twice a day and compare the stats 6. Troubleshoot any issue reported 7. Database refreshes if made on daily basis Weekly DB Health Checks Statistics gathering Index rebuild if needed (ALTER INDEX emp_nameREBUILD 😉 Database health check Any other scheduled tasks Related Posts Heading 2 Add paragraph text. Click “Edit Text” to customize this theme across your site. You can update and reuse text themes.

  • Projects | DBA Genesis Support

    Projects SQL Project - Supermarket Billing The goal of the project is to create a database for a supermarket to efficiently manage inventory, sales, and customer information. SQL Project - Library Management The goal of the project is to create a database for a library management system that allows users to efficiently manage customer information, book inventory & book borrowings Linux Project - Monitor Server Disk Space In this Linux project we will write a shell script that will monitor the disk space and put the info in a file every 20 mints. Setting up...

  • Difference between 12cR1 and 12cR2 Multitenant database

    Difference between 12cR1 and 12cR2 Multitenant database There are lot of new features introduced by Oracle in 12c Release 2 version when compared to 12c Release 1. Here are some of the differences that you must know Local Undo Cloning of PDB’s Refreshable PDB Automatic Refresh PDB Relocate Cloning of PDB’s Enhancements to Unplug/Plug Flashback PDB 4k PDBs per CDB on Oracle Cloud and Oracle Exadata Memory Management Enhancement at PDB level Per-PDB Character Sets Automatic Workload Repository (AWR) Data at PDB Level System Access File Access Lockdown Profiles Data Guard Enhancements Software as a Service (SaaS) Local Undo In 12cR1, there is a global or shared undo for the entire CDB. With shared undo, before performing operations such as clone or unplug, it is necessary to check for any uncommitted transactions in the source PDB. This is to avoid problems with transactional consistency in the PDB after the clone or plug-in operation. (If any uncommitted transactions exist, the following error is issued: ORA-65126 – Pluggable database was not closed cleanly and there are active transactions that need to be recovered. In such cases, it is necessary to open the PDB read-write, and wait until the SMON process can clean them up.) In 12cR2 we introduce per-PDB or local undo. Local undo avoids these difficulties and thereby significantly improves important operations. Additionally, it enables many of the major new capabilities of Multitenant in 12cR2, including: Hot Clone Refreshable PDB PDB Relocate Flashback PDB Note : shared undo mode is still supported in 12cR2 Cloning of PDB’s In 12cR1 cloning of PDB was “cold cloning” because at the time of cloning there should not be any transaction running till cloning is in progress, so from 12cR2 oracle introduce “hot cloning” of PDB, it means while you clone your PDB, it could be available for read-write operations. No need to take the application down which running on PDB which is involved in cloning activity. condition apply —>Archive logging must also be enabled to perform hot clones. No change in the existing statement of cloning PDB: create pluggable database target from source; Refreshable PDB Let say for Example We have Development Environment for which we use a copy of Production PDB. Here in Production PDB all data keep changing and database size keep increasing all the time, so if we want to refresh Development Data, it becomes a lengthy process to drop PDB and create new PDB from production PDB all the time so Developer can get the Latest data. Refreshable PDB gives here a big advantage to all DBA working with Multitenant Architecture. We can create on taking a full clone of source PDB (Production PDB) consider it as “Golden Master Copy”. Now From That Golden Master PDB all, we can take clone in future which can be created in seconds or minutes even for very large databases. Here the condition is Refreshable PDB should be open in read-only mode and that PDB must be closed during the refresh operation. Now we need to refresh that Refreshable PDB from the source all the time to keep it aligns with the Production version. Refresh Options: Manual (we can refresh it manually when we want) ALTER SESSION SET CONTAINER=refreshable_pdb; ALTER PLUGGABLE DATABASE CLOSE IMMEDIATE; ALTER PLUGGABLE DATABASE REFRESH; ALTER PLUGGABLE DATABASE OPEN READ ONLY; Automatic Refresh create pluggable database refreshable_pdb from source_PDB@DBLink refresh mode every 60;(interval in minutes) Can be altered in future: ALTER PLUGGABLE DATABASE refreshable_pdb REFRESH MODE EVERY 120 MINUTES; Note : once the PDB is made non-refreshable, it can’t be made refreshable again. PDB Relocate Moving PDBs between CDBs using plug/unplug method required downtime during plug/unplug operations. For large databases, it takes considerable time. PDB Relocate is a new method of moving a PDB between CDBs. This is introduced in 12cR2. The goal is to eliminate downtime completely. Technically, PDB Relocate is built on top of Refreshable PDB, which is built on top of a hot clone. PDB Relocate could be achieved in two steps, as follows Relocate PDB to the new server It involves cloning the PDB from its original location to its desired new location. In other words, After Completion of this step there will be two transactionally consistent copies of this PDB, one in the source server and one in the target server. For the duration of the operation, all transactions continue on the database in its original location (source server). Users of an application or applications connected to the database will be unaware that relocation is going on. Technically, this is the same as the creation of a Refreshable PDB, as described above. All existing application connections, and new connections made during this step, continue to be to the PDB in its original location. Open PDB in its new location This step completes the relocation. That is transparent to the application user, although at the end of the operation, connections to the PDB will have been switched from its original location to the new location. An important component of this step is to ensure that all transactions committed in the PDB in its source location are preserved in the target location. PDB Relocate Enhancements to Unplug/Plug Flashback PDB 4k PDBs per CDB on Oracle Cloud and Oracle Exadata Memory Management Enhancement at PDB level Per-PDB Character Sets Automatic Workload Repository (AWR) Data at PDB Level System Access File Access Lockdown Profiles Data Guard Enhancements Software as a Service (SaaS) Difference between 12cR1 and 12cR2 Multitenant database local Undo In 12cR1, there is a global or shared undo for the entire CDB. With shared undo, before performing operations such as clone or unplug, it is necessary to check for any uncommitted transactions in the source PDB. This is to avoid problems with transactional consistency in the PDB after the clone or plug-in operation. (If any uncommitted transactions exist, the following error is issued: ORA-65126 – Pluggable database was not closed cleanly and there are active transactions that need to be recovered. In such cases, it is necessary to open the PDB read-write, and wait until the SMON process can clean them up.) In 12cR2 we introduce per-PDB or local undo. Local undo avoids these difficulties and thereby significantly improves important operations. Additionally, it enables many of the major new capabilities of Multitenant in 12cR2, including Hot Clone Refreshable PDB PDB Relocate Flashback PDB Note : shared undo mode is still supported in 12cR2 Cloning of PDB’s In 12cR1 cloning of PDB was cold cloning because at the time of cloning there should not be any transaction running till cloning is in progress, so from 12cR2 oracle introduce hot cloning of PDB, it means while you clone your PDB, it could be available for read-write operations. No need to take the application down which running on PDB which is involved in cloning activity. condition apply —>Archive logging must also be enabled to perform hot clones. No change in the existing statement of cloning PDB: create pluggable database target from the source; Refreshable PDB Let say for Example We have a Development Environment for which we use a copy of Production PDB. Here in Production PDB all data keep changing and database size keep increasing all the time, so if we want to refresh Development Data, it becomes a lengthy process to drop PDB and create new PDB from production PDB all the time so Developer can get the latest data. Refreshable PDB gives here a big advantage to all DBA working with Multitenant Architecture. We can create on taking a full clone of source PDB (Production PDB) consider it as Golden Master Copy . Now From That Golden Master PDB all, we can take clone in future which can be created in seconds or minutes even for very large databases. Here the condition is Refreshable PDB should be open in read-only mode and that PDB must be closed during the refresh operation. Now we need to refresh that Refreshable PDB from the source all the time to keep it aligns with the Production version. Refresh Options Manual (we can refresh it manually when we want) ALTER SESSION SET CONTAINER=refreshable_pdb; ALTER PLUGGABLE DATABASE CLOSE IMMEDIATE; ALTER PLUGGABLE DATABASE REFRESH; ALTER PLUGGABLE DATABASE OPEN READ ONLY; Automatic Refresh create pluggable database refreshable_pdb from source_PDB@DBLink refresh mode every 60;(interval in minutes) Can be altered in future: ALTER PLUGGABLE DATABASE refreshable_pdb REFRESH MODE EVERY 120 MINUTES; Note : once the PDB is made non-refreshable, it can’t be made refreshable again. PDB Relocate Moving PDBs between CDBs using plug/unplug method required downtime during plug/unplug operations. For large databases, it takes considerable time. PDB Relocate is a new method of moving a PDB between CDBs. This is introduced in 12cR2. The goal is to eliminate downtime completely. Technically, PDB Relocate is built on top of Refreshable PDB, which is built on top of a hot clone. PDB Relocate could be achieved in two steps, as follows Relocate PDB to the new server It involves cloning the PDB from its original location to its desired new location. In other words, After Completion of this step there will be two transactionally consistent copies of this PDB, one in the source server and one in the target server. For the duration of the operation, all transactions continue on the database in its original location (source server). Users of an application or applications connected to the database will be unaware that relocation is going on. Technically, this is the same as the creation of a Refreshable PDB, as described above. All existing application connections, and new connections made during this step, continue to be to the PDB in its original location. Open PDB in its new location This step completes the relocation. That is transparent to the application user, although, at the end of the operation, connections to the PDB will have been switched from its original location to the new location. An important component of this step is to ensure that all transactions committed in the PDB in its source location are preserved in the target location. Enhancements to Unplug/Plug In 12.1, export and import of keys were achieved separately from the PDB unplug/plug operation. In 12.2 the migration of encryption keys is simplified through integration with the unplug/plug operation itself. Technically the encryption keys are transported via the XML manifest file, where they are encrypted by a shared secret. This is achieved with some additional clauses in the unplug and plug statements as follows Unplug : Executed as SysDBA in Root container of source CDB: alter pluggable database PDB unplug into PDB_manifest.xml encrypt using ; Plug : Executed as SysDBA in Root container of destination CDB: create pluggable database PDB using PDB_manifest.xml decrypt using ; Flashback PDB In Oracle 12cR1 there is no PDB-level flashback database. So We need to flashback the entire CDB with it’s all associated PDBs which means loss of data for all PDBs during Flashback Database operation. Flashback PDB is now fully supported with Oracle 12R2 for that oracle introduced local undo feature in 12cR2. 4k PDBs per CDB on Oracle Cloud and Oracle Exadata Oracle 12cR1 we can have 252 PDBs under one CDB and In Oracle 12cR2 we can have 4096 PDBs under one CDB (on Oracle Cloud and Oracle Exadata only). In other platforms, the limit remains 252 PDBs per CDB. Memory Management Enhancement at PDB level Now with Oracle 12cR2, it is possible to set the following parameters at PDB level (which were previously modifiable only at CDB level in 12cR1): SGA_TARGET SGA_MIN_SIZE (new in 12cR2) DB_CACHE_SIZE DB_SHARED_POOL_SIZE PGA_AGGREGATE_LIMIT PGA_AGGREGATE_TARGET Per-PDB Character Sets From 12cR2 Oracle now it is possible to set character set for each PDB under one CDB. It is not mandatory to have same character set for CDB and all associated PDB which was mandatory in Oracle 12cR1. Automatic Workload Repository (AWR) Data at PDB Level In Oracle 12cR1 AWR report were stored at CDB root container which means if you unplug PDB from one CDB to another then you will loss AWR data for that PDB. From Oracle 12cR2 AWR report available at PDB level. System Access While using HOST commands from SQL Plus to interact with Operating System from within Oracle Database all operations are performed under Oracle OS user credentials. In 12cR2 Oracle introduce a new PDB level parameter – PDB OS Credential. Where appropriate, this can be used to identify an OS user (presumably one far less privileged than the Oracle user) which will be used when the OS is accessed. File Access In 12cR2 Oracle introduce two new clauses to the create pluggable database statement – Path_Prefix and Create_File_Dest. These control the placement of and access to the PDB’s files by specifying mount points within the file system so that each PDB’s datafiles and directory objects are isolated in a sub-branch of the file system. Lockdown Profiles From 12cR2 Oracle introduced a lockdown profile mechanism to restrict certain operations or functionalities in a PDB. This new Multitenant feature is managed by a CDB administrator and can be used to restrict user access in a particular PDB. A lockdown profile can prevent PDB users from: Executing certain SQL statements, such as ALTER SYSTEM and ALTER SESSION, Running procedures that access the network (e.g. UTL_SMTP, UTL_HTTP) Accessing a common user’s objects Interacting with the OS (In addition to the capabilities covered by PDB_OS_CREDENTIAL) Making unrestricted cross-PDB connections in a CDB Taking AWR snapshots Using JAVA partially or as a whole Using certain database options such as Advanced Queueing and Partitioning. A single lockdown profile can have several rules defined in it. In other words, you don’t have to create a lockdown profile for every restriction you want to implement it.A PDB can have only one lockdown profile active at a time. The restrictions enforced by a lockdown profile are PDB-wide, they affect every single user including the SYS and SYSTEM Example Commands: SQL> create lockdown profile pdb_profile; Lockdown Profile created. SQL> alter lockdown profile pdb_profile disable statement=('alter system') clause=('set') option all; SQL> alter lockdown profile pdb_profile disable statement =(‘ALTER SYSTEM’)clause = (‘SET’)option = ALL EXCEPT(‘plsql_code_type’,’plsql_debug’,’plsql_warnings’); SQL> alter lockdown profile pdb_profile disable feature=('NETWORK_ACCESS'); DBA_LOCKDOWN_PROFILES to see the details of our lockdown profile SQL> select profile_name, rule_type, rule, clause, clause_option, status, users from DBA_LOCKDOWN_PROFILES; Data Guard Enhancements In 12cR1, ENABLED_PDBS_ON_STANDBY initialization parameter only supported two values: all PDBs or none The ENABLED_PDBS_ON_STANDBY parameter is only applicable to the physical standby database can accept a list of PDB names or a glob pattern such as “MYPDB?” or “MYPDB*a”, “MYPDB2” Glob pattern rules are similar to regular expression rules in common UNIX shells asterisk (*) and question mark (?) wildcard characters are supported. The question mark (?) represents a single unknown character; the asterisk (*) represents matches to any number of unknown characters. ENABLED_PDBS_ON_STANDBY=“*” means that all PDBs will be created on physical standby in Oracle 12cR1 and Oracle 12cR2 ENABLED_PDBS_ON_STANDBY=“MYPDB1*” means that MYPDB1A, MYPDB1B, and MYPDB1C will be created on the physical standby in Oracle 12cR2 ENABLED_PDBS_ON_STANDBY=“MYPDB*A” means that MYPDB1A, MYPDB2A, and MYPDB3A will be created on physical standby in Oracle 12cR2 Software as a Service (SaaS) Oracle Multitenant for Software as a Service Multitenancy implemented by the Database, not the Application in Oracle 12cR2. In 12cR2, to address these important SaaS requirements, oracle introduce a new concept Application Container. The user now can create a pluggable database as Application Container from 12cR2. Related Posts Heading 2 Add paragraph text. Click “Edit Text” to customize this theme across your site. You can update and reuse text themes.

  • Connect Linux Instance with SSH Keys

    Connect Linux Instance with SSH Keys Using passwords for remote Linux access is outdated and risky, leaving systems vulnerable to hacking. The SSH Key based login is the most secure and safest way to connect a remote Linux server. If you have the key, you are in! Connect to Linux Server from Mac Invoke Linux GUI on Mac Connect From Windows Using OpenSSH Connect From Windows Using PuTTY Invoke Linux GUI on Windows Transfer Files Using WinSCP Share SSH Key with other user Connect to Linux Server from Mac You must have SSH Key with .pem extension to connect from Mac Download the .pem key file, open Terminal app and navigate to Downloads folder cd ~/Downloads Set the permissions of your PEM file chmod 600 .pem Connect to the remote server using the SSH command ssh -i .pem cloud-user@ Type yes and enter the passphrase (if asked) for the SSH key. Enjoy! Invoke Linux GUI on Mac Download and install XQuartz package which will invoke Linux GUI on Mac. Start XQuartz, open terminal and connect to your Linux instance using SSH with -Y parameter ssh -i .pem -Y cloud-user@ Connect From Windows Using OpenSSH You must have SSH Key with .pem extension to connect from Windows using OpenSSH. You must be running at least Windows Server 2019 or Windows 10 (build 1809) and PowerShell 5.1 or later Install OpenSSH on Windows machine to SSH into any remote Linux server: Open Settings , select System , then select Optional Features Check if OpenSSH is already installed, else click Add a feature Find OpenSSH Client and Install Open cmd and navigate to the folder which contains .pem key cd downloads Connect to the remote server using the SSH command ssh -i .pem username@ Type yes and enter the passphrase (if asked) for the SSH key. Enjoy! Connect From Windows Using PuTTY You cannot use .pem file with PuTTY to connect remote Linux server. You will have to first convert the .pem file into .ppk (Putty Private Key) format and this is done through PuTTYgen software. Convert .pem to .ppk Install PuTTYgen from the SSH website and Start PuTTYgen. Under Actions section, click Load By default, PuTTYgen displays only files with .ppk extension. To locate your .pem file, choose the option to display files of all types PuTTYgen displays a notice that the .pem file was successfully imported. Choose OK. To save the key in .ppk format, choose Save private key. PuTTYgen displays a warning about saving the key without a passphrase. Choose Yes Connect via PuTTY Open PuTTY and enter the IP address or hostname On Left hand menu, navigate to Connection > SSH > Auth > Select Credentials . Under Private key file for authentication, click Browse and select the .ppk file Select Session in the left hand menu, under Saved Session give a meaningful name and click on Save You can now double click the Saved Session and connect to remote Linux server! Invoke Linux GUI on Windows Download and Install Xming which will allow you to invoke Linux GUI on Windows. Start the installer and Choose Multiple Windows , enter Display number 0 , and click Next Just click Next, Next and Finish the installation. Open PuTTY and enter the IP address If you have an SSH key, On Left hand menu, navigate to Connection > SSH > Auth > Select Credentials . Under Private key file for authentication, click Browse and select the .ppk file To enable X11 forwarding, navigate to SSH >> X11 >> Check Enable X11 forwarding Select Session in the left hand menu, under Saved Session give a meaningful name and click on Save Double-click the saved session , connect to Linux server and initiate any GUI application like firefox (if installed) or Oracle runInstaller Transfer Files Using WinSCP WinSCP allows you to transfer files from your windows system to remote Linux server. Install WinSCP and the default installation option are OK. Start WinSCP, give Host name (or IP Address) and User name of your remote Linux instance If you are using DBA Genesis cloud, the default username is root or cloud-user Click Advance button, under SSH and choose Authentication. Specify the path for your .ppk key file, or choose the ... button to browse to the key pair file and Choose OK Choose Login . To add the host fingerprint to the host cache, choose Yes . After the connection is established, in the connection window your Linux instance is on the right and your local machine is on the left. You can drag and drop files between the remote file system and your local machine. Share SSH Key with other user The cloud servers are generally configured to allow a specific super user like root or cloud-user to connect using SSH key. If you would like to connect to a different user example oracle to invoke GUI, then you will have to share the SSH key with oracle user. If you are connecting to cloud server with a super user apart from root , like cloud-user then you can simply switch to root user with sudo su - Connect to the cloud server with super user root or cloud-user and open authorized_keys file cat .ssh/authorized_keys Copy the keys that you would like to share with oracle user Switch to oracle user su - oracle Open the authorized_keys file and paste the keys vi ~/.ssh/authorized_keys If the authorized_keys file or .ssh folder does not exists then mkdir -m 700 -p ~/.ssh vi ~/.ssh/authorized_keys Paste the keys, save and give 600 permissions chmod 600 ~/.ssh/authorized_keys Now you can login to the server with Oracle user and same SSH Key . Related Posts Heading 2 Add paragraph text. Click “Edit Text” to customize this theme across your site. You can update and reuse text themes.

  • Oracle 11gR2 RAC Installation on Oracle Linux 6.5

    Oracle 11gR2 RAC Installation on Oracle Linux 6.5 In this article we will be installing 2 node 11gR2 RAC on Oracle Linux 6.5. We will be looking at below steps Configure Virtual machine for Node 1 Configure Virtual machine for Node 2 OS prerequisites on all nodes Setup public & private network Configure shared storage Oracle Grid Installation Oracle RAC software installation Create RAC Database Configure VM for Node 1 Open virtual box and create a new VM for node 1. We will be installing OEL 6.5 on both RAC nodes. Create New VM Open virtual box and click on New. Create first virtual machine with oraracn1 as the name Min RAM allocation should be 4 GB per RAC node Create a virtual disk now Select VDI and click next Select Dynamically allocated option and click next Allocate Min 80 GB HDD to your virtual machine. You can allocate even more if you have good hard disk space. Click on Create Now your virtual machine should be created. This is how your virtual box will look like Right click on virtual machine and select settings. Under System settings, make sure to set below bootorder Under storage > Optical Drive > choose OEL 6.5 iso file from your system. Under Network, make sure attached to is set to Bridged Adapter and Enable the Network Adapter In RAC, we need to have two network adapters. So, enable the second adapter same like the first one. Click on OK to complete the RAC node 1 setup. Install OEL 6.5 on Node 1 Now that our virtual machine is ready, go ahead, start the virtual machine and install OEL 6.5 Skip media test Click next to continue Go with default language > click next Go with default keyboard type and click on next Select Basic Storage Devices > Click Next Select Yes, Discard and data Give a hostname to your machine oraracn1.oraclgenesis.com Click on configure network and assign a static IP Assign public IP to your machine. In my case, I have assigned 192.168.0.101 as the machine IP Select second network card and click on edit Assign private IP to your node 1 on a different subnet mask. Leave Gateway blank Click next and select your timezone Give a root password Select create custom layout and click next Select Free disk space and click on create Choose standard partition and click Create Create boot partition with 512 MB size Once again choose free disk space and click on create Select file system type as Swap and give 15 GB size (Approx 15000 MB) Again select free space and click on create Give mount point as root (/) and chose option Fill to maximum allowable size Click next and choose Format option Select Write changes to disk No changes on below screen, just click next Choose customize now and just click next From the list, select packages as below: Base System Base Client management tools Compatibility libraries Hardware monitoring utilities Large Systems Performance Network file system client Performance Tools Perl Support Servers Server Platform System administration tools Desktops Desktop Desktop Platform Fonts General Purpose Desktop Graphical Administration Tools Input Methods X Window System Development Additional Development Development Tools Applications Internet Browser Click next and OEL installation will begin Once done, click on Reboot After reboot, there are few post installation steps. Click on Forward Accept the license and click on Forward Choose No and click on Forward Select No thanks and proceed Click forward Do not create any user at this stage, click forward Choose Yes Check the Date and Time settings and click on forward Nothing to choose under Kdump, click forward OEL 6.5 installation is completed. Configure VM for Node 2 You need to create Node 2 like how you have created Node 1 in virtual box. This will be a separate new virtual machine. I have used below configuration for node 2: Install OEL 6.5 on Node 2 Now that our virtual machine is ready, go ahead and start the virtual machine. Start virtual machine and install OEL 6.5 Skip media test Click next to continue Go with default language > click next Go with default keyboard type and click on next Select Basic Storage Devices > Click Next Select Yes, Discard and data Give a hostname to your machine oraracn2.oraclgenesis.com Click on configure network and assign a static IP Assign public IP to your machine. In my case, I have assigned 192.168.0.102 as the machine IP. Select second network card and click on edit Assign private IP to your node 2 on a different subnet mask. Leave Gateway blank Click next and select your timezone Give a root password Select create custom layout and click next Select Free disk space and click on create Choose standard partition and click Create Create boot partition with 512 MB size Once again choose free disk space and click on create Select file system type as Swap and give 15 GB size (Approx 15000 MB) Again select free space and click on create Give mount point as root (/) and chose option Fill to maximum allowable size Click next and chose Format option Select Write changes to disk No changes on below screen, just click next Choose customize now and just click next From the list, select packages as below Base System Servers:Desktops Desktops Applications Development Click next and OEL installation will begin Once done, click on Reboot After reboot, there are few post installation steps. Click on Forward Accept the license and click on Forward Choose No and click on Forward Select No thanks and proceed Click forward Do not create any user at this stage, click forward Choose Yes Check the Date and Time settings and click on forward Nothing to choose under Kdump, click forward OEL 6.5 installation on Node 2 is completed. OS Prerequisites – All Nodes Connect to both RAC nodes via putty and execute all the below commands on both nodes. Check if your machine is able to speak to internet. You can ping yahoo.com. Then install below package to perform all oracle installation pre-requisites yum -y install oracle-rdbms* Install ASM packages yum -y install oracleasm* yum -y install kmod-oracleasm Change password for oracle user passwd oracle Disable firewall /etc/rc.d/init.d/iptables status /etc/rc.d/init.d/iptables stop service iptables stop chkconfig iptables off echo 0 > /selinux/enforce Create directories to install grid and oracle software mkdir -p /u01/app/11.2.0/grid mkdir -p /u01/app/oracle/product/11.2.0/db_1 chown -R oracle:oinstall /u01 chmod -R 775 /u01/ mkdir -p /u02 chown -R oracle:oinstall /u02 Download Oracle 11.2.0.4 gird and database binaries. Copy it to /u02 location (Only on Node 1) Setup Public & Private Network We have below public and private network configuration for our RAC setup Also, below are the Virtual IP and Scan IP details: Depending upon your environment, change IP addresses and put below under /etc/hosts file on both oraracn1 and oraracn2 nodes On both nodes: ============== 127.0.0.1 localhost.localdomain localhost # Public Network - (eth0) 192.168.0.101 oraracn1.oraclegenesis.com oraracn1 192.168.0.102 oraracn2.oraclegenesis.com oraracn2 # Private Interconnect - (eth1) 10.10.10.101 oraracn1-priv.oraclegenesis.com oraracn1-priv 10.10.10.102 oraracn2-priv.oraclegenesis.com oraracn2-priv # Public Virtual IP (VIP) addresses - (eth0:1) 192.168.0.105 oraracn1-vip.oraclegenesis.com oraracn1-vip 192.168.0.106 oraracn2-vip.oraclegenesis.com oraracn2-vip # Single Client Access Name (SCAN) 192.168.0.110 orarac-scan.oraclegenesis.com orarac-scan Test the network configuration On oraracn1: ============ # ping oraracn1 --> use Ctrl+C to exit from ping # ping oraracn2 # ping oraracn1-priv # ping oraracn2-priv On oraracn2: ============ # ping oraracn1 --> use Ctrl+C to exit from ping # ping oraracn2 # ping oraracn1-priv # ping oraracn2-priv Note: You cannot ping VIP and SCAN IP. Those IPs can only be used by an application and are not ping-able! Configure Shared Storage At this stage, shutdown both the virtual machines. We will allocate shared disks to RAC nodes. Open oraracn1 virtual machine settings and select storage . Click on Adds Hard Disk button under SATA controller Choose Create new disk Choose VDI and click Next Select Fixed size and click Next Allocate 100 GB of shared storage to your RAC setup This will take some time to add shared disk to Node 1 Once disk is added, you can see the disk under Node 1 settings > storage Now our goal is to make newly added disk on node 1 shared with node 2. For this, go to File > Virtual Media Manager Select your shared disk > right click > choose Modify Change the property from Normal to Shareable and click on OK Now we are ready to share the disk with Node 2. Open oraracn2 settings > Storage > Adds hard disk icon Do not create a new disk, Choose existing disk Locate your shared disk at OS level. It must mostly be stored under your Node 1 location The disk must now be shared with node 2 as well. You will see the RAC Shared Storage below Create Shared Partitions Now that we have 100 GB of shared storage, we need to create three partitions for the main three ASM disk groups Create three partitions under the newly added 100 GB shared disk via node 1 On Node 1: ========== fdisk /dev/sdb n p 1 +10G ============ Frist partition is created, create second one ============ n p 1 +45G ============ Second partition is created, create third one ============= n p 1 +45G ======= All partitions are created, now save the partition table ========== w  this command will save the partition table Configure ASM & ASM Disks As we have created 3 partitions, we must allocate each partition to single ASM disks, which will then be allocated to ASM Disk groups Configure ASM on both nodes On Node 1 as root user: ======================= /usr/sbin/oracleasm configure -i Default user to own the driver interface []: oracle Default group to own the driver interface []: dba Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: y On Node 2 as root user: ======================= /usr/sbin/oracleasm configure -i Default user to own the driver interface []: oracle Default group to own the driver interface []: dba Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: y Load oracle-asm kernel module on both nodes. This command Creates the /etc/sysconfig/oracleasm configuration file, creates the /dev/oracleasm mount point and mounts the ASMLib driver file system On Node 1 as root user: ======================= /usr/sbin/oracleasm init On Node 2 as root user: ======================= /usr/sbin/oracleasm init Create ASM disks – Any one Node On Node 1 as root user: ======================= oracleasm createdisk CRS1 /dev/sdb5 oracleasm createdisk DATA1 /dev/sdb6 oracleasm createdisk FRA1 /dev/sdb7 Run below commands on both nodes to scan and list ASM disks oracleasm scandisks oracleasm listdisks Oracle Grid Installation Oracle grid software is the one which binds multiple independent servers into a cluster. You can configure ASM only when Oracle grid is installed because ASM is bundled with Oracle Grid Software. Configure NTP – All Nodes On Node 1 and Node 2: ===================== # yum install ntp # service ntpd start # chkconfig ntpd on # vi /etc/sysconfig/ntpd -> Open file delete all and put below line OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid -g" # service ntpd stop # ntpdate 1.tw.pool.ntp.org # service ntpd start Now its good time to clean-up the YUM repository to release some space from the disk On both nodes as root user: =========================== # yum clean all Set Bash Profile Setup oracle user bash profile on node 1 # su - oracle # vi .bash_profile # Oracle Settings TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_HOSTNAME=oraracn1; export ORACLE_HOSTNAME ORACLE_UNQNAME=RAC; export ORACLE_UNQNAME ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE GRID_HOME=/u01/app/11.2.0/grid; export GRID_HOME DB_HOME=$ORACLE_BASE/product/11.2.0/db_1; export DB_HOME ORACLE_HOME=$DB_HOME; export ORACLE_HOME ORACLE_SID=RAC1; export ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM BASE_PATH=/usr/sbin:$PATH; export BASE_PATH PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPAT H alias grid_env='. /home/oracle/grid_env' alias db_env='. /home/oracle/db_env' Create a file to set grid variables on node 1 . This file will set grid environmental variables making it easy to switch between DB home and grid home. # vi /home/oracle/grid_env ORACLE_SID=+ASM1; export ORACLE_SID ORACLE_HOME=$GRID_HOME; export ORACLE_HOME PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPAT H Create below file to set database environmental variables on Node 1 # vi /home/oracle/db_env ORACLE_SID=RAC1; export ORACLE_SID ORACLE_HOME=$DB_HOME; export ORACLE_HOME PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPAT H Setup oracle user bash profile on node 2 # su - oracle # vi .bash_profile # Oracle Settings TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_HOSTNAME=oraracn2; export ORACLE_HOSTNAME ORACLE_UNQNAME=RAC; export ORACLE_UNQNAME ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE GRID_HOME=/u01/app/11.2.0/grid; export GRID_HOME DB_HOME=$ORACLE_BASE/product/11.2.0/db_1; export DB_HOME ORACLE_HOME=$DB_HOME; export ORACLE_HOME ORACLE_SID=RAC2; export ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM BASE_PATH=/usr/sbin:$PATH; export BASE_PATH PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPAT H alias grid_env='. /home/oracle/grid_env' alias db_env='. /home/oracle/db_env' Create a file to set grid variables on node 2 . This file will set grid environmental variables making it easy to switch between DB home and grid home. # vi /home/oracle/grid_env ORACLE_SID=+ASM2; export ORACLE_SID ORACLE_HOME=$GRID_HOME; export ORACLE_HOME PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPAT H Create below file to set database environmental variables on Node 2 # vi /home/oracle/db_env ORACLE_SID=RAC2; export ORACLE_SID ORACLE_HOME=$DB_HOME; export ORACLE_HOME PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPAT H At this stage, exit as oracle user and the open another terminal with new session OR switch to root user and then back to oracle user. This will make the new environmental variables in effect. Now it’s time to test our environment variables and check if they are working fine or not. As oracle user, execute below commands on both nodes to check if environmental variables are set properly Node 1: ------- su – oracle # . grid_env --To set grid env variables # env |grep ORA ORACLE_UNQNAME=RAC ORACLE_SID=+ASM1 ORACLE_BASE=/u01/app/oracle ORACLE_HOSTNAME=oraracn1 ORACLE_TERM=xterm ORACLE_HOME=/u01/app/11.2.0/grid # . db_env --To set DB env variables # env |grep ORA ORACLE_UNQNAME=RAC ORACLE_SID=RAC1 ORACLE_BASE=/u01/app/oracle ORACLE_HOSTNAME=oraracn1 ORACLE_TERM=xterm ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 Node 2: ------- su – oracle # . grid_env --To set grid env variables # env |grep ORA ORACLE_UNQNAME=RAC ORACLE_SID=+ASM2 ORACLE_BASE=/u01/app/oracle ORACLE_HOSTNAME=oraracn2 ORACLE_TERM=xterm ORACLE_HOME=/u01/app/11.2.0/grid # . db_env --To set DB env variables # env |grep ORA ORACLE_UNQNAME=RAC ORACLE_SID=RAC2 ORACLE_BASE=/u01/app/oracle ORACLE_HOSTNAME=oraracn2 ORACLE_TERM=xterm ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 Configure SSH Between Nodes Configure SSH connectivity between the nodes as oracle user. There are two methods to setup SSH connectivity between the nodes is: Manual method and automatic method. The manual method is very long and you might encounter errors while doing it. The easy way is the automatic method via script provided by oracle. As you have already copied the grid and database software files under /u02, unzip the grid software file. This will create a new folder name grid under /u02. Oracle provides automatic ssh setup script On node 1 as oracle user: ========================= cd /u02 unzip cd grid/sshsetup ./sshUserSetup.sh -user oracle -hosts "oraracn1 oraracn2" -noPromptPassphrase -confir m -advanced Run cluvfy utility Oracle provide a pre-installation utility which is called as Cluster Verification Utility (CLUVFY). This utility performs cluster verification before, during and after install of grid software. Let us run CLUVFY utility to check cluster before installation of grid # /u01/softwares/grid # ./runcluvfy.sh stage -pre crsinst -n oraracn1,oraracn2 -fixup -verbose Below is the sample output [oracle@oraracn1 grid]$ ./runcluvfy.sh stage -pre crsinst -n oraracn1,oraracn2 -fixup -verbose Performing pre-checks for cluster services setup Checking node reachability... Check: Node reachability from node "oraracn1" Destination Node Reachable? ------------------------------------ ------------------------ oraracn2 yes oraracn1 yes Result: Node reachability check passed from node "oraracn1" Checking user equivalence... Check: User equivalence for user "oracle" Node Name Comment ------------------------------------ ------------------------ oraracn1 passed oraracn2 passed Result: User equivalence check passed for user "oracle" Checking node connectivity... Checking hosts config file... Node Name Status Comment ------------ ------------------------ ------------------------ oraracn1 passed oraracn2 passed Verification of the hosts config file successful Interface information for node "oraracn1" Name IP Address Subnet Gateway Def. Gateway HW Address MTU ------ --------------- --------------- --------------- --------------- ---------------- ------ eth0 192.168.0.151 192.168.0.0 0.0.0.0 192.168.0.1 00:0C:29:B6:0 F:87 1500 eth1 10.10.10.151 10.10.10.0 0.0.0.0 192.168.0.1 00:0C:29:B6:0 F:91 1500 Interface information for node "oraracn2" Name IP Address Subnet Gateway Def. Gateway HW Address MTU ------ --------------- --------------- --------------- --------------- ---------------- ------ eth0 192.168.0.152 192.168.0.0 0.0.0.0 192.168.0.1 00:0C:29:81:9 1:FA 1500 eth1 10.10.10.152 10.10.10.0 0.0.0.0 192.168.0.1 00:0C:29:81:9 1:04 1500 Check: Node connectivity of subnet "192.168.0.0" Source Destination Connected? ------------------------------ ------------------------------ --------- oraracn1:eth0 oraracn2:eth0 yes Result: Node connectivity passed for subnet "192.168.0.0" with node(s) oraracn1,orara cn2 Check: TCP connectivity of subnet "192.168.0.0" Source Destination Connected? -------------------- ------------------------ -------- oraracn1:192.168.0.151 oraracn2:192.168.0.152 passed Result: TCP connectivity check passed for subnet "192.168.0.0" Check: Node connectivity of subnet "10.10.10.0" Source Destination Connected? ------------------------------ ------------------- ----------- oraracn1:eth1 oraracn2:eth1 yes Result: Node connectivity passed for subnet "10.10.10.0" with node(s) oraracn1,orarac n2 Check: TCP connectivity of subnet "10.10.10.0" Source Destination Connected? ------------------------------ ------------- ---------- oraracn1:10.10.10.151 oraracn2:10.10.10.152 passed Result: TCP connectivity check passed for subnet "10.10.10.0" Interfaces found on subnet "192.168.0.0" that are likely candidates for VIP are: oraracn1 eth0:192.168.0.151 oraracn2 eth0:192.168.0.152 Interfaces found on subnet "10.10.10.0" that are likely candidates for a private inte rconnect are: oraracn1 eth1:10.10.10.151 oraracn2 eth1:10.10.10.152 Result: Node connectivity check passed Check: Total memory Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 2.44GB (2559180.0KB) 1.5GB (1572864.0KB) passed oraracn2 2.44GB (2559180.0KB) 1.5GB (1572864.0KB) passed Result: Total memory check passed Check: Available memory Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 2.11GB (2211952.0KB) 50MB (51200.0KB) passed oraracn2 2.19GB (2294412.0KB) 50MB (51200.0KB) passed Result: Available memory check passed Check: Swap space Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 4.88GB (5116692.0KB) 2.44GB (2559180.0KB) passed oraracn2 4.88GB (5116692.0KB) 2.44GB (2559180.0KB) passed Result: Swap space check passed Check: Free disk space for "oraracn1:/tmp" Path Node Name Mount point Available Required Comment ---------------- ------------ ------------ ------------ ------------ -------- /tmp oraracn1 / 4.94GB 1GB passed Result: Free disk space check passed for "oraracn1:/tmp" Check: Free disk space for "oraracn2:/tmp" Path Node Name Mount point Available Required Comment ---------------- ------------ ------------ ------------ ------------ --------- /tmp oraracn2 / 4.71GB 1GB passed Result: Free disk space check passed for "oraracn2:/tmp" Check: User existence for "oracle" Node Name Status Comment ------------ ------------------------ ------------------------ oraracn1 exists passed oraracn2 exists passed Result: User existence check passed for "oracle" Check: Group existence for "oinstall" Node Name Status Comment ------------ ------------------------ ------------------------ oraracn1 exists passed oraracn2 exists passed Result: Group existence check passed for "oinstall" Check: Group existence for "dba" Node Name Status Comment ------------ ------------------------ ------------------------ oraracn1 exists passed oraracn2 exists passed Result: Group existence check passed for "dba" Check: Membership of user "oracle" in group "oinstall" [as Primary] Node Name User Exists Group Exists User in Group Primary Comment ----------- --------- --------- ------------ ------------ ------- oraracn1 yes yes yes yes passed oraracn2 yes yes yes yes passed Result: Membership check for user "oracle" in group "oinstall" [as Primary] passed Check: Membership of user "oracle" in group "dba" Node Name User Exists Group Exists User in Group Comment ---------------- ------------ ------------ ------------ ---------------- oraracn1 yes yes yes passed oraracn2 yes yes yes passed Result: Membership check for user "oracle" in group "dba" passed Check: Run level Node Name run level Required Comment ------------ ----------- ----------- ----------- oraracn1 5 3,5 passed oraracn2 5 3,5 passed Result: Run level check passed Check: Hard limits for "maximum open file descriptors" Node Name Type Available Required Comment ---------------- ------------ ------------ ------------ ---------------- oraracn1 hard 131072 65536 passed oraracn2 hard 131072 65536 passed Result: Hard limits check passed for "maximum open file descriptors" Check: Soft limits for "maximum open file descriptors" Node Name Type Available Required Comment ---------------- ------------ ------------ ------------ ---------------- oraracn1 soft 131072 1024 passed oraracn2 soft 131072 1024 passed Result: Soft limits check passed for "maximum open file descriptors" Check: Hard limits for "maximum user processes" Node Name Type Available Required Comment ---------------- ------------ ------------ ------------ ---------------- oraracn1 hard 131072 16384 passed oraracn2 hard 131072 16384 passed Result: Hard limits check passed for "maximum user processes" Check: Soft limits for "maximum user processes" Node Name Type Available Required Comment ---------------- ------------ ------------ ------------ ---------------- oraracn1 soft 131072 2047 passed oraracn2 soft 131072 2047 passed Result: Soft limits check passed for "maximum user processes" Check: System architecture Node Name Available Required Comment ----------- ------------------------ ------------------------ ---------- oraracn1 x86_64 x86_64 passed oraracn2 x86_64 x86_64 passed Result: System architecture check passed Check: Kernel version Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 2.6.18-164.el5 2.6.18 passed oraracn2 2.6.18-164.el5 2.6.18 passed Result: Kernel version check passed Check: Kernel parameter for "semmsl" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 250 250 passed oraracn2 250 250 passed Result: Kernel parameter check passed for "semmsl" Check: Kernel parameter for "semmns" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 32000 32000 passed oraracn2 32000 32000 passed Result: Kernel parameter check passed for "semmns" Check: Kernel parameter for "semopm" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 100 100 passed oraracn2 100 100 passed Result: Kernel parameter check passed for "semopm" Check: Kernel parameter for "semmni" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 142 128 passed oraracn2 142 128 passed Result: Kernel parameter check passed for "semmni" Check: Kernel parameter for "shmmax" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 4398046511104 536870912 passed oraracn2 4398046511104 536870912 passed Result: Kernel parameter check passed for "shmmax" Check: Kernel parameter for "shmmni" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 4096 4096 passed oraracn2 4096 4096 passed Result: Kernel parameter check passed for "shmmni" Check: Kernel parameter for "shmall" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 4294967296 2097152 passed oraracn2 4294967296 2097152 passed Result: Kernel parameter check passed for "shmall" Check: Kernel parameter for "file-max" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 6815744 6815744 passed oraracn2 6815744 6815744 passed Result: Kernel parameter check passed for "file-max" Check: Kernel parameter for "ip_local_port_range" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 between 9000 & 65500 between 9000 & 65500 passed oraracn2 between 9000 & 65500 between 9000 & 65500 passed Result: Kernel parameter check passed for "ip_local_port_range" Check: Kernel parameter for "rmem_default" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 262144 262144 passed oraracn2 262144 262144 passed Result: Kernel parameter check passed for "rmem_default" Check: Kernel parameter for "rmem_max" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 4194304 4194304 passed oraracn2 4194304 4194304 passed Result: Kernel parameter check passed for "rmem_max" Check: Kernel parameter for "wmem_default" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 262144 262144 passed oraracn2 262144 262144 passed Result: Kernel parameter check passed for "wmem_default" Check: Kernel parameter for "wmem_max" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 1048576 1048576 passed oraracn2 1048576 1048576 passed Result: Kernel parameter check passed for "wmem_max" Check: Kernel parameter for "aio-max-nr" Node Name Configured Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 3145728 1048576 passed oraracn2 3145728 1048576 passed Result: Kernel parameter check passed for "aio-max-nr" Check: Package existence for "make-3.81" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 make-3.81-3.el5 make-3.81 passed oraracn2 make-3.81-3.el5 make-3.81 passed Result: Package existence check passed for "make-3.81" Check: Package existence for "binutils-2.17.50.0.6" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 binutils-2.17.50.0.6-12.el5 binutils-2.17.50.0.6 passed oraracn2 binutils-2.17.50.0.6-12.el5 binutils-2.17.50.0.6 passed Result: Package existence check passed for "binutils-2.17.50.0.6" Check: Package existence for "gcc-4.1.2" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 gcc-4.1.2-46.el5 gcc-4.1.2 passed oraracn2 gcc-4.1.2-46.el5 gcc-4.1.2 passed Result: Package existence check passed for "gcc-4.1.2" Check: Package existence for "libaio-0.3.106 (i386)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 libaio-0.3.106-5 (i386) libaio-0.3.106 (i386) passed oraracn2 libaio-0.3.106-5 (i386) libaio-0.3.106 (i386) passed Result: Package existence check passed for "libaio-0.3.106 (i386)" Check: Package existence for "libaio-0.3.106 (x86_64)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 libaio-0.3.106-5 (x86_64) libaio-0.3.106 (x86_64) passed oraracn2 libaio-0.3.106-5 (x86_64) libaio-0.3.106 (x86_64) passed Result: Package existence check passed for "libaio-0.3.106 (x86_64)" Check: Package existence for "glibc-2.5-24 (i686)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 glibc-2.5-42 (i686) glibc-2.5-24 (i686) passed oraracn2 glibc-2.5-42 (i686) glibc-2.5-24 (i686) passed Result: Package existence check passed for "glibc-2.5-24 (i686)" Check: Package existence for "glibc-2.5-24 (x86_64)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 glibc-2.5-42 (x86_64) glibc-2.5-24 (x86_64) passed oraracn2 glibc-2.5-42 (x86_64) glibc-2.5-24 (x86_64) passed Result: Package existence check passed for "glibc-2.5-24 (x86_64)" Check: Package existence for "compat-libstdc++-33-3.2.3 (i386)" Node Name Available Required Comment ------------ ------------------------ ----------------------- ------- oraracn1 compat-libstdc++-33-3.2.3-61 (i386) compat-libstdc++-33-3.2.3 (i386) passed oraracn2 compat-libstdc++-33-3.2.3-61 (i386) compat-libstdc++-33-3.2.3 (i386) passed Result: Package existence check passed for "compat-libstdc++-33-3.2.3 (i386)" Check: Package existence for "compat-libstdc++-33-3.2.3 (x86_64)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 compat-libstdc++-33-3.2.3-61 (x86_64) compat-libstdc++-33-3.2.3 (x86 _64) passed oraracn2 compat-libstdc++-33-3.2.3-61 (x86_64) compat-libstdc++-33-3.2.3 (x86 _64) passed Result: Package existence check passed for "compat-libstdc++-33-3.2.3 (x86_64)" Check: Package existence for "elfutils-libelf-0.125 (x86_64)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 elfutils-libelf-0.137-3.el5 (x86_64) elfutils-libelf-0.125 (x86_64) passed oraracn2 elfutils-libelf-0.137-3.el5 (x86_64) elfutils-libelf-0.125 (x86_64) passed Result: Package existence check passed for "elfutils-libelf-0.125 (x86_64)" Check: Package existence for "elfutils-libelf-devel-0.125" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 elfutils-libelf-devel-0.137-3.el5 elfutils-libelf-devel-0.125 passed oraracn2 elfutils-libelf-devel-0.137-3.el5 elfutils-libelf-devel-0.125 passed Result: Package existence check passed for "elfutils-libelf-devel-0.125" Check: Package existence for "glibc-common-2.5" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 glibc-common-2.5-42 glibc-common-2.5 passed oraracn2 glibc-common-2.5-42 glibc-common-2.5 passed Result: Package existence check passed for "glibc-common-2.5" Check: Package existence for "glibc-devel-2.5 (i386)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 glibc-devel-2.5-42 (i386) glibc-devel-2.5 (i386) passed oraracn2 glibc-devel-2.5-42 (i386) glibc-devel-2.5 (i386) passed Result: Package existence check passed for "glibc-devel-2.5 (i386)" Check: Package existence for "glibc-devel-2.5 (x86_64)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 glibc-devel-2.5-42 (x86_64) glibc-devel-2.5 (x86_64) passed oraracn2 glibc-devel-2.5-42 (x86_64) glibc-devel-2.5 (x86_64) passed Result: Package existence check passed for "glibc-devel-2.5 (x86_64)" Check: Package existence for "glibc-headers-2.5" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 glibc-headers-2.5-42 glibc-headers-2.5 passed oraracn2 glibc-headers-2.5-42 glibc-headers-2.5 passed Result: Package existence check passed for "glibc-headers-2.5" Check: Package existence for "gcc-c++-4.1.2" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 gcc-c++-4.1.2-46.el5 gcc-c++-4.1.2 passed oraracn2 gcc-c++-4.1.2-46.el5 gcc-c++-4.1.2 passed Result: Package existence check passed for "gcc-c++-4.1.2" Check: Package existence for "libaio-devel-0.3.106 (i386)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 libaio-devel-0.3.106-5 (i386) libaio-devel-0.3.106 (i386) passed oraracn2 libaio-devel-0.3.106-5 (i386) libaio-devel-0.3.106 (i386) passed Result: Package existence check passed for "libaio-devel-0.3.106 (i386)" Check: Package existence for "libaio-devel-0.3.106 (x86_64)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 libaio-devel-0.3.106-5 (x86_64) libaio-devel-0.3.106 (x86_64) passed oraracn2 libaio-devel-0.3.106-5 (x86_64) libaio-devel-0.3.106 (x86_64) passed Result: Package existence check passed for "libaio-devel-0.3.106 (x86_64)" Check: Package existence for "libgcc-4.1.2 (i386)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 libgcc-4.1.2-46.el5 (i386) libgcc-4.1.2 (i386) passed oraracn2 libgcc-4.1.2-46.el5 (i386) libgcc-4.1.2 (i386) passed Result: Package existence check passed for "libgcc-4.1.2 (i386)" Check: Package existence for "libgcc-4.1.2 (x86_64)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 libgcc-4.1.2-46.el5 (x86_64) libgcc-4.1.2 (x86_64) passed oraracn2 libgcc-4.1.2-46.el5 (x86_64) libgcc-4.1.2 (x86_64) passed Result: Package existence check passed for "libgcc-4.1.2 (x86_64)" Check: Package existence for "libstdc++-4.1.2 (i386)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 libstdc++-4.1.2-46.el5 (i386) libstdc++-4.1.2 (i386) passed oraracn2 libstdc++-4.1.2-46.el5 (i386) libstdc++-4.1.2 (i386) passed Result: Package existence check passed for "libstdc++-4.1.2 (i386)" Check: Package existence for "libstdc++-4.1.2 (x86_64)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 libstdc++-4.1.2-46.el5 (x86_64) libstdc++-4.1.2 (x86_64) passed oraracn2 libstdc++-4.1.2-46.el5 (x86_64) libstdc++-4.1.2 (x86_64) passed Result: Package existence check passed for "libstdc++-4.1.2 (x86_64)" Check: Package existence for "libstdc++-devel-4.1.2 (x86_64)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 libstdc++-devel-4.1.2-46.el5 (x86_64) libstdc++-devel-4.1.2 (x86_64) passed oraracn2 libstdc++-devel-4.1.2-46.el5 (x86_64) libstdc++-devel-4.1.2 (x86_64) passed Result: Package existence check passed for "libstdc++-devel-4.1.2 (x86_64)" Check: Package existence for "sysstat-7.0.2" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 sysstat-7.0.2-13.0.1.el5 sysstat-7.0.2 passed oraracn2 sysstat-7.0.2-13.0.1.el5 sysstat-7.0.2 passed Result: Package existence check passed for "sysstat-7.0.2" Check: Package existence for "unixODBC-2.2.11 (i386)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 unixODBC-2.2.11-10.el5 (i386) unixODBC-2.2.11 (i386) passed oraracn2 unixODBC-2.2.11-10.el5 (i386) unixODBC-2.2.11 (i386) passed Result: Package existence check passed for "unixODBC-2.2.11 (i386)" Check: Package existence for "unixODBC-2.2.11 (x86_64)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 unixODBC-2.2.11-10.el5 (x86_64) unixODBC-2.2.11 (x86_64) passed oraracn2 unixODBC-2.2.11-10.el5 (x86_64) unixODBC-2.2.11 (x86_64) passed Result: Package existence check passed for "unixODBC-2.2.11 (x86_64)" Check: Package existence for "unixODBC-devel-2.2.11 (i386)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 unixODBC-devel-2.2.11-10.el5 (i386) unixODBC-devel-2.2.11 (i386) passed oraracn2 unixODBC-devel-2.2.11-10.el5 (i386) unixODBC-devel-2.2.11 (i386) passed Result: Package existence check passed for "unixODBC-devel-2.2.11 (i386)" Check: Package existence for "unixODBC-devel-2.2.11 (x86_64)" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 unixODBC-devel-2.2.11-10.el5 (x86_64) unixODBC-devel-2.2.11 (x86_64) passed oraracn2 unixODBC-devel-2.2.11-10.el5 (x86_64) unixODBC-devel-2.2.11 (x86_64) passed Result: Package existence check passed for "unixODBC-devel-2.2.11 (x86_64)" Check: Package existence for "ksh-20060214" Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 ksh-20080202-14.el5 ksh-20060214 passed oraracn2 ksh-20080202-14.el5 ksh-20060214 passed Result: Package existence check passed for "ksh-20060214" Checking for multiple users with UID value 0 Result: Check for multiple users with UID value 0 passed Check: Current group ID Result: Current group ID check passed Checking Core file name pattern consistency... Core file name pattern consistency check passed. Checking to make sure user "oracle" is not in "root" group Node Name Status Comment ------------ ------------------------ ------------------------ oraracn1 does not exist passed oraracn2 does not exist passed Result: User "oracle" is not part of "root" group. Check passed Check default user file creation mask Node Name Available Required Comment ------------ ------------------------ ------------------------ ---------- oraracn1 0022 0022 passed oraracn2 0022 0022 passed Result: Default user file creation mask check passed Starting Clock synchronization checks using Network Time Protocol(NTP)... NTP Configuration file check started... Network Time Protocol(NTP) configuration file not found on any of the nodes. Oracle C luster Time Synchronization Service(CTSS) can be used instead of NTP for time synchro nization on the cluster nodes Result: Clock synchronization check using Network Time Protocol(NTP) passed Pre-check for cluster services setup was successful. Note: You must see Pre-check for cluster services setup was successful at the end of the cluvfy output. Install Grid Software The following steps will guide you to install Oracle Grid software with Oracle ASM binaries. As oracle user, start the grid runInstaller On Node 1: ========== su – oracle # cd /u02/grid/ # ./runInstaller Note: sometimes there might be display variable error. issues below command as root user to enable GUI # xhost + Under Select Installation Option, choose Install and Configure Grid Infrastructure for a Cluster and Click Next Select Advanced Installation and click Next Select Advanced Installation and click Next Input below details and click Next Below screen will list out the nodes which you want to install and configure as part of Grid Click on Add and enter details of Node 2. Click on OK In case you have more than two nodes, Add each node by clicking on Add . Click Next to proceed Specify network interface by selecting public and private interfaces. Click Next Select storage option as Automatic Storage Management (ASM ). Click Next You need to assign a disk where the grid installer will keep OCR and Voting disks. Click on Change Discovery Path, type /dev/oracleasm/disks/* and click OK. Under Add Disks, you must see the three disks which we have created as part of Shard Storage. Before you proceed, sometimes you might not see the lists of disks. In such cases, follow below: 1. Check if /dev/sdb1, /dev/sdc1, /dev/sdd1 had ownership as oracle user. If not then issue below commands as root user on both nodes # chown oracle:oinstall /dev/sdb1 # chown oracle:oinstall /dev/sdc1 # chown oracle:oinstall /dev/sdd1 2. Also give full permissions on above disks # chmod 777 /dev/sdb1 # chmod 777 /dev/sdc1 # chmod 777 /dev/sdd1 Again go to Change Discovery Path, type /dev/oracleasm/disks/* and click OK. Now all the disks will be listed. Type Disk Group Name as CRS, Redundancy as External and under Disk Path /dev/oracleasm/disks/CRSVOL1 Now provide password for sys user and click Next It will prompt you for password standard, just click on Yes Select Do Not Use IPMI and click Next Go with default operating system groups and click Next . If prompted with notification, just click on Yes Provide Oracle Base and Software Installation Location. Click on Next Go with default inventory location. Click Next The run Installer will perform pre-requsites test again. If any step is failed, you must fix it before proceeding ahead The final screen displays installation summary. Important things to note here: Oracle Base Location Oracle Home – This should actually be grid home Click on Finish to start the installation Now the setup will start installing Grid Software on both nodes Now the installer will prompt you for two root.sh scripts to be run on each node. Execute them as root user on both nodes one by one . Your grid installation will finish and Cluster Verification Utility Filed error will be displayed. Just ignore the error. Oracle RAC Installation During the installation of Oracle grid infrastructure, we configured one ASM disk group named +CRS which was used to store the Oracle clusterware files (OCR and voting disk). Now we will configure ASM disk groups for DATA and FRA Create DATA & FRA Diskgroups Launch asmca form the command prompt as oracle user On node 1: ========== su – oracle asmca ASM Configuration Assistant window will launch. From the Disk Groups tab, click on Create . The Create Disk Group window will open and it should show two of the ASMLib volumes we created earlier Click on Create. Give a name to your DATA disk group. This disk group will hold database files. Then click on OK Install Oracle RAC Software – Node 1 only Unzip the database software files under /u02. There will be two files downloaded. Unzip them as oracle user one by one # su - oracle # cd /u02 # unzip linux.x64_11gR2_database_1of2.zip # unzip linux.x64_11gR2_database_2of2.zip Unzipping files will create a new folder as database under same location # ls -lrt drwxr-xr-x 8 oracle oinstall 4096 Aug 21 2009 database -rwxr-xr-x 1 oracle oinstall 1052897657 Nov 2 09:41 linux.x64_11gR2_grid.zip -rwxr-xr-x 1 oracle oinstall 1239269270 Dec 1 01:00 linux.x64_11gR2_database_1of2.zip -rwxr-xr-x 1 oracle oinstall 1111416131 Dec 1 01:01 linux.x64_11gR2_database_2of2.zip Go to database folder and start the runInstaller # cd database # ./runInstaller Create RAC Database From node 1, start dbca as oracle user On node 1: ========== su - oracle dbca Done! Your 2 node RAC database is ready to use! Related Posts Heading 2 Add paragraph text. Click “Edit Text” to customize this theme across your site. You can update and reuse text themes.

  • Install MySQL 8 on Oracle Linux

    Install MySQL 8 on Oracle Linux Installing MySQL on Oracle Linux is simple and straightforward. Download the latest version of MySQL based on your OS version. Server Configuration Install MySQL 8 Secure MySQL 8 Installation Server Configuration Disable SE Linux on the server as root user setenforce Permissive vi /etc/selinux/config --> change SELINUX to permissive Install wget utility (if not installed) to download MySQL RPM directly inside Linux server yum -y install wget Install MySQL 8 At the time of writing this article, below was the latest MySQL rpm. You must download the latest rpm for RedHat, copy download link and use wget to download MySQL directly on your Linux server wget https://repo.mysql.com//mysql80-community-release-el7-6.noarch.rpm Install the downloaded RPM yum -y install mysql80-community-release-el7-6.noarch.rpm Check if repo is enabled to download MySQL yum repolist enabled | grep mysql Run below to install MySQL 8. The first command is required for updated GPG key rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 yum -y install mysql-community-server Create directories to hold database files mkdir -p /u01/data mkdir -p /u01/log_bin mkdir -p /u01/tmpdir chown -R mysql:mysql /u01 chmod -R 755 /u01 Edit /etc/my.cnf file and add below parameters user=mysql log_bin=/u01/log_bin/myDB datadir=/u01/data tmpdir=/u01/tmpdir Enable MySQL services to autostart on reboot systemctl enable mysqld systemctl start mysqld systemctl status mysqld Secure MySQL 8 Installation Check the temporary password for MySQL grep 'temporary password' /var/log/mysqld.log Secure MySQL /usr/bin/mysql_secure_installation Securing the MySQL server deployment. Enter password for user root: The existing password for the user account root has expired. Please set a new password. New password: Re-enter new password: The 'validate_password' component is installed on the server. The subsequent steps will run with the existing configuration of the component. Using existing password for root. Estimated strength of the password: 100 Change the password for root ? ((Press y|Y for Yes, any other key for No) : ... skipping. By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? (Press y|Y for Yes, any other key for No) : ... skipping. Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? (Press y|Y for Yes, any other key for No) : ... skipping. By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? (Press y|Y for Yes, any other key for No) : ... skipping. Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? (Press y|Y for Yes, any other key for No) : ... skipping. All done! Connect to MySQL and check the databases mysql --user=root --password mysql> show databases; Enjoy! Related Posts Heading 2 Add paragraph text. Click “Edit Text” to customize this theme across your site. You can update and reuse text themes.

  • Database Administration | DBA Genesis Support

    Database Administration Oracle 21c Installation on Linux Oracle 21c is an innovation release that provides early insights to latest developments and features. Install Oracle 19c with ASM In this article we would be looking at installing Oracle 19c with ASM on Linux. This will allow us to create 19c databases on ASM disks.... Oracle Flashback Oracle flashback allows you to move database back in time. You can use flashback technology to move entire database or a particular table... Oracle 12c Installation on Oracle Linux 7 In this article, we will be looking at Oracle 12cR2 installation on Oracle Linux 7.7 version. The steps are exactly same for OEL 6 and... Oracle 12c Installation on Linux with ASM In this article we will be looking at Oracle 12c release 2 installation on Oracle Linux 7.6 with ASM. If you already know, Oracle ASM... Tablespace Administration Administering Tablespace is one of the most important jobs of an Oracle DBA. It makes sure that database has enough space to accommodate... Physical Oracle Database Limits When you try to add data files or resize existing data files, you cannot go with any number in your mind. Oracle database has limitations... Removing Deadlocks in Oracle You locked row A, another session locked row B. Now, you want to lock row B but you are blocked by the other session. The other session... Oracle 12c Multi-tenant Interview Questions Interview questions specific to Oracle 12c Multi-tenant architecture. Enjoy! Q. What are the major changes in architecture for 12c? From... Oracle 11g to 12c Rolling Upgrade A rolling upgrade allows you to perform database upgrade without having any noticeable downtime to the end users. There are multiple ways... Downloading Oracle 12c Using Linux wget When you are working on a Linux server, you do not need to use tools like WINSCP or other file sharing software. You can simply use wget... Oracle 11g Silent Install In this article we will be looking at Oracle 11g silent mode installation (without using the GUI method). Create Response File...

  • Oracle Database Migration from Windows to Linux Using RMAN

    Oracle Database Migration from Windows to Linux Using RMAN We all know that RMAN is a powerful tool for database backup, recovery, cloning and migration. In this article, we will be perform database migration from Windows to Linux using RMAN with two scenarios. RMAN Windows to Linux Migration (same version) RMAN Windows to Linux Migration (higher version) RMAN Windows to Linux Migration (same version) In this scenario, we will be migrating Oracle database from Windows to Linux where both source and target database version are 12c. Both source & target database version is same - 12c In order to convert the database from one platform to another, the endian format of both databases should be the same. Let's check the v$transportable_platform view for both platforms col platform_name for a35 set pagesize 1000 select * from v$transportable_platform order by 2; We can see from the output that both Windows and Linux are in the little-endian format. Open the source database is read-only mode shutdown immediate; startup mount; alter database open read only; Use dbms_tdb.check_db function to check whether the database can be transported to a target platform set serveroutput on declare v_return boolean; begin v_return:=dbms_tdb.check_db('Linux x86 64-bit'); end; / If nothing is returned, then it means that the database is ready to be transported to the destination platform. Execute below function to check for the existence of external objects, directories, and BFILEs declare v_return boolean; begin v_return:=dbms_tdb.check_external; end; / Create pfile from spfile create pfile from spfile; Start RMAN conversion in SOURCE database rman target / convert database new database 'orcl' transport script 'c:\Clone\transport.sql' db_file_name_convert 'C:\app\piyus\oradata\orcl' 'c:\Clone' to platform 'Linux x86 64-bit'; Now copy the parameter file, transport.sql script, which is located at the $ORACLE_HOME/database directory, that is used to create the database and all datafiles to the destination host Create dump directories on target host cd $ORACLE_BASE mkdir -p admin/orcl/adump admin/orcl/bdump mkdir -p admin/orcl/cdump admin/orcl/udump mkdir -p oradata/orcl/ mkdir -p fast_recovery_area/orcl Copy below files carefully from source to target host: We have to copy all the datafile in oradata folder Pfile to $ORACLE_HOME/dbs and TRANSPORT.SQL to the /tmp Edit the Pfile on target host and change the path of the below: adump location control_files locations Edit the transportscript.sql file and change the locations of pdfile, redolog files and data files Now set the ORACLE_SID to orcl , connect to sqlplus and run the transport script SQL> @/tmp/TRANSPORT.SQL RMAN Windows to Linux Migration (higher version) In this scenario, we will be migrating Oracle database from Windows to Linux where both source database is 12c version and target database is 19c version. Source database is 12c and target database is 19c version In order to Clone the database from Windows 12c to Linux 19c we have to do the same as steps as we did above, we just need to edit the TRANSPORT.SQL and remove all the lines after STARTUP UPGRADE parameter Set the ORACLE_SID to orcl and run the script inside sqlplus SQL> @/tmp/TRANSPORT.SQL Our next steps is to upgrade the database to 19c cd $ORACLE_HOME/rdbms/admin $ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sql This will take around takes about 40-50mins to upgrade 12c to 19c Login to the sqlplus again and bounce the database and create spfile create SPFILE from PFILE; Run utlrp.sql script to re-compile invalid objects - if any SQL> @?/rdbms/admin/utlrp.sql Wait for the script to complete and your database migration from Windows to Linux onto a higher version is done! Further Read How to move database between platforms Related Posts Heading 2 Add paragraph text. Click “Edit Text” to customize this theme across your site. You can update and reuse text themes.

  • PostgreSQL 15 on Oracle Linux 7.9

    PostgreSQL 15 on Oracle Linux 7.9 PostgreSQL is a powerful, open-source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance and is supported by a number of different programming languages. It is often used as a backend for web applications and has a strong reputation for reliability, data integrity, and correctness. To install Postgresql, visit the official PostgreSQL website . Select your operating system Select your Linux distribution as REDHAT Select the latest version as 15, and Select platform as OEL 7 You will the steps to Install the Postgresql # Install the repository RPM: sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm # Install PostgreSQL: sudo yum install -y postgresql15-server # Optionally initialize the database and enable automatic start: sudo /usr/pgsql-15/bin/postgresql-15-setup initdb sudo systemctl enable postgresql-15 sudo systemctl start postgresql-15 Copy the first to install the repository RPM and run it in the terminal yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm Now Copy the second step to Install PostgreSQL yum install -y postgresql15-server Now, install using YUM yum install -y https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libzstd-1.5.2-1.el7.x86_64.rpm Now, run the second step yum install -y postgresql15-server Now, after installation, we will initialize the database and enable automatic start: /usr/pgsql-15/bin/postgresql-15-setup initdb systemctl enable postgresql-15 systemctl start postgresql-15 and after that, we'll check for the process using ps -ef | grep postgres As we can see that our Postgres service is running using Postgres user. Let's login to the Postgres user and login to the psql su - postgres psql let's check for the database \l We can see that 2 templates and 1 sample Postgres database in the list. Thank you ..! Related Posts Heading 2 Add paragraph text. Click “Edit Text” to customize this theme across your site. You can update and reuse text themes.

  • Schedule RMAN Backup on Windows

    Schedule RMAN Backup on Windows Scheduling RMAN backups on a windows machine is little different than Linux machine. Windows uses bash shell and windows scheduler to automate RMAN backups. Create RMAN Backup Script File Create Bash Shell Add Schedule to Windows Scheduler Create RMAN Backup Script File We will create a backup.cmd file with our RMAN run block for database backup run{ crosscheck backup; backup database plus archivelog; }; Create Bash Shell Create a proddb_rman_backup.bat (.bat is a windows bash shell) file which will call above file set oracle_sid=proddb rman target sys/sys@ecccatalog rman_rc/rman_rc@rcat cmdfile='F:\backup.cmd' log='F:\rman_backup_full\backup.log' Add Schedule to Windows Scheduler Schedule the above .bat script in windows scheduler Launch the Task Scheduler from start menu On the right-hand panel, click on Create Task Give a name to your task Click on Triggers tab >> New and define the schedule Make sure you set proper frequency like daily or weekly and set proper start date and time. Click on Actions tab >> New and provide the location of .bat file you created Click on OK and task will be created. You can even run the task for testing by right clicking on the task name and select Run Related Posts Heading 2 Add paragraph text. Click “Edit Text” to customize this theme across your site. You can update and reuse text themes.

Search Results

bottom of page