Wednesday, 20 April 2016

Failed to connect to ASM instance. ORA-12541: TNS:no listener

Issues:

"Failed to connect to ASM instance. ORA-12541: TNS:no listener"

Check:

1. Log on to the ASM Server and set up the environment for the grid user using setenv
2. The command crs_stat -t will show the listener resource is online or offline

Possible Solutions:

Start the listener using the command -  srvctl start listener

Wednesday, 13 April 2016

Azure and the Tools

Azure Portal:
-----------------

https://manage.windowsazure.com

New Portal - https://portal.azure.com/


Download SQL Server Management Studio (SSMS)
---------------------------------------------------------------

https://msdn.microsoft.com/library/mt238290.aspx  (This version of SSMS is free and does not require a SQL Server license to install and use)

Connection Issue and the solutions:
----------------------------------------------

https://sqlbits.com/Sessions/Event11/Windows_Azure_SQL_Database_Troubleshooting


Windows Azure SQL Database (formerly known as SQL Azure) works exclusively and only on TCP port 1433. It only support SQL Server Authentication, TCP connection and TDS protocol as of today.
In order to successfully establish connection to SQL Azure one must fulfil the following requirements:
  • Create SQL Azure server & Database
  • Setup SQL Azure Server's firewall rules to accept connections from the IP address of application that will connect to that server
  • Make sure the box (be it Virtual, or home, or whatever) has no blocking outbound TCP port 1433
  • Explicitly force encryption in connection string
  • Explicitly chose to not trust server certificate in connection string
Please note that many (if not all) ISPs (Internet Service Providers) and Hosters, as well as IT staff within companies DO block outgoing TCP Port 1433 due to the SQL Slammer worm. This outgoing port blocking appears to be one of the most faced issues of newcommers to SQL Azure.
UPDATE Nov. 2015

As of August 2015, there is preview feature that enables you to use Azure AD to authenticate to Azure SQL Database. You can read more on this new preview feature here:
https://azure.microsoft.com/en-us/documentation/articles/sql-database-aad-authentication/

Reference: http://stackoverflow.com/questions/11617687/cannot-connect-to-azure-sql-database-even-with-whitelisted-ip

Monday, 4 April 2016

PostgreSQL 9.4 on CentOS 7 Installation and Database Creation

Step by Step PostgreSQL 9.4 on CentOS 7 Installation and Creation of Database
-------------------------------------------------------------------------------------------------------------



Sunday, 20 March 2016

Oracle 11g RAC - Two Node Cluster Installation

Step by Step Oracle RAC 11g Installation:

(Includes setting up of two node Linux servers using VirtualBox, Installing Grid and Database)
 ------------------------------------------------------------------------------------------------------------------




Install Oracle 11g 11.2.0.3 Grid Infrastructure and Database Installation
 ---------------------------------------------------------------------------

Step by Step installation practical approach is in the above video. However, I kept the below screenshot for the Grid and Database Installation

1. Go to the installer mount directory. Then execute

#./runInstaller

(Note: Please note that there will be an issue while starting. I kept the information to fix, in case if you face it)


Checking monitor: must be configured to display at least 256 colors

>>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set.    Failed <<<<

Solution:

[root@rac1 ~]# DISPLAY=:0.0
[root@rac1 ~]# export DISPLAY
[root@rac1 ~]# xhost +
access control disabled, clients can connect from any host
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$ DISPLAY=:0.0
[oracle@rac1 ~]$ export DISPLAY

The above solution is more than enough to sort it out.

Optional:

Install the below packages if not there:

yum install xorg-x11-apps
yum install xorg-x11-xauth
ssh -X oracle@rac1.localdomain










Click Skip software updates and press Next

Choose "Install and Configure Oracle Grid Infrastructure for a Cluster" and Press Next..




Click the below screenshot option Advanced Installation and press Next



Choose the language as English and press Next




Name like below screenshot and deselect the Confgure GNS and press Next


Add rac2 and setup SSH connectivity and press Next



Press OK as per below screenshot and press Next


Leave the default like below and press Next


Select Oracle ASM and Press Next


Choose Change Discover Path and keep this screen like below two screenshots and press Next





Choose "Use same password for the accounts" and enter oracle as a password and press Next


Click Yes for this and continue by pressing Next..


Select "Do not use Intelligent Platform Management Interface (PMI) " and Press Next...


Keep the below screenshot default and press Next


Click Yes to this and Press Next..


Keep the below default Oracle Base and Software Location and Press Next...




Keep the inventory directory as below and press Next..




Select Ignore All option for this and press Next..


Select Yes to this and continue by pressing Next..


Press Install button and proceed further.







Execute the below two scripts in rac1 and then followed by rac2

# /u01/app/oraInventory/orainstRoot.sh
# /u01/app/11.2.0/grid/root.sh




Once the above two scripts executed successfully , please press Next..





Please note that if the error is like below and should be ignored and press Next..

INFO: Checking Single Client Access Name (SCAN)...
INFO: Checking TCP connectivity to SCAN Listeners...
INFO: TCP connectivity to SCAN Listeners exists on all cluster nodes
INFO: Checking name resolution setup for "rac-scan.localdomain"...
INFO: ERROR: 
INFO: PRVG-1101 : SCAN name "rac-scan.localdomain" failed to resolve
INFO: ERROR: 
INFO: PRVF-4657 : Name resolution setup check for "rac-scan.localdomain" (IP address: 192.168.56.71) failed
INFO: ERROR: 
INFO: PRVF-4657 : Name resolution setup check for "rac-scan.localdomain" (IP address: 192.168.56.72) failed
INFO: ERROR: 
INFO: PRVF-4657 : Name resolution setup check for "rac-scan.localdomain" (IP address: 192.168.56.73) failed
INFO: ERROR: 
INFO: PRVF-4664 : Found inconsistent name resolution entries for SCAN name "rac-scan.localdomain"
INFO: Verification of SCAN VIP and Listener setup failed


Once installed, please verify as per below screenshot using crsctl command...







Oracle Database Installation:

Install the database using oracle software usually comes from the folder database. See the screen shot below.

#./runInstaller



Uncheck the below and click Next - It will prompt, select Yes to proceed..


Select Create and Configure database option and Press Next..


Select Server Class and Press Next..


Select both rac1 and rac2 and choose the Oracle Real Application Cluster database installation


Select English language and press Next ...


Select the Enterprise Edition and press Next..


Select the default path and press Next..


Select the below General Purpose / Transaction processing option and press Next..


Name as per your choice. The database name here is orcl and press Next..


Choose the memory and press Next..


Choose the below option and press Next..


Choose the Oracle Automatic Storage Management Option and press Next..


Select Do not enable automation backups and press Next..


Select the Disk Group Name and press Next..


Select the "Use the same password for all accounts", enter oracle as a password and Press Next


Choose the below Group and press Next..



Select "Ignore All" option for the below screenshot checks and press Next..





Execute the below scripts in both nodes rac1 and rac2 and press OK

# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh


Follow the below screenshot command to check the database installation status.: