Tuesday, October 20, 2009

Remote Desktop Disconnected

Error: The remote session was disconnected because there are no Terminal Server Client access licence available for this computer. Please contact the server administrator.

Solutions: Create a backup of the MSLicensing registry key and its subkeys on the client, and then remove the original key and subkeys by doing the following:

On the client, navigate to the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing.
Click MSLicensing.
On the Registry menu, click Export Registry File.
In the File name box, type mslicensingbackup, and then click Save.
If you need to restore this registry key in the future, double-click mslicensingbackup.reg.
On the Edit menu, click Delete, and then click Yes to confirm the deletion of the MSLicensing registry subkey.
Close Registry Editor, and then restart the computer.
When the client is restarted, the missing registry key is rebuilt.

Caution: You must be very carefull while editing registry. Always take backup of registry before editing restry.

Sunday, October 11, 2009

Oracle10g installation on CentOS 4.8

1 Introduction

Installing Oracle 10g on Centos 4.8 contains many steps which are including editing and configuring Centos Linux system files. So be sure that the person performing the following steps must have the basic Linux administration knowledge.

2 Installing CentOS 4.8

Boot from CentOS 4.8 DVD

Select the ‘Skip’ option and press ‘Enter’.
The welcome screen of CentOS installation appears click on ‘Next’
Select the default language option. I.e. English Click on ‘Next’. Select the default Keyboard layout. I.e. U.S English. Click ‘Next’. We need to select the ‘Server’ option and Click on ‘Next’. Select the option ‘Automatically partition’. Click on ‘Next’. Click on ‘Yes’ Tab. Select the option ‘Remove all partitions on this system’. Click on ‘Next’. Click on ‘Yes’ Tab. Installer shows the overview of new partition. Click on ‘Next’.
Now the boot loader GRUB will be installed. You can leave the default settings unchanged and click on ‘Next’. Click on the Edit button at the top right.
In the window that pops up uncheck Configure using DHCP and give your network card a static IP address
Set the hostname manually, e.g. server name.example.com, and enter a gateway (e.g. 192.168.1.XX)
Select the option ‘No firewall’ and Disable SELinux. Click on ‘Proceed’ Tab. Select the default option. Click ‘Next’ to proceed.
Here we have to select the time zone which is appropriate for you. Enter the ‘Root’ password. Package Group Selection
Select only the package sets shown here and leave all others unselected.
  • Desktop
    • X Window System
    • Gnome
  • Applications
    • Graphical Internet (optional)
  • Servers
    • Do not select anything in this group.
  • Development
    • Development Tools
  • System
    • Administration Tools
    • System Tools
      • Add the package 'sysstat' by clicking on the Details link and selecting "sysstat - The sar an iostat system monitoring commands." from the Optional Packages list.
  • Miscellaneous
    • Do not select anything in this group.
Click on Next to proceed.
Click ‘Next’ to proceed.

Click on ‘Reboot’ Tab. The system will restart.

After restarting the machine, logon to server using ‘root’ user name and password. Check whether all the required rpm packages for Oracle 10g installation are installed in the system. For that issue the following commands in the terminal.
rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common \
gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio openmotif21
Some required rpms won’t be installed during the CentOS 4.8 Linux installation. To install those rpms insert the CentOS 4.8 DVD in the DVD drive.
Open Terminal window
Type ‘cd /media/cdrom/CentOS/RPMS
Type rpm –ivh “rpm name”
After installing the rpms issue the rpm check command again
3 Configuring Linux for Oracle
3.1 Verifying system requirements
To verify that your system meets the minimum requirements for an Oracle Database 10g Release 2 database, log in as root and run the commands below
To check the amount of RAM and swap space available, run this:
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
# grep MemTotal /proc/meminfo
MemTotal: 1034680 kB
# grep SwapTotal /proc/meminfo
SwapTotal: 1534196 kB
The minimum RAM required is 1024MB, and the minimum required swap space is 1GB. Swap space should be twice the amount of RAM for systems with 2GB of RAM or less and between one and two times the amount of RAM for systems with more than 2GB
You also need 2.5GB of available disk space for the Oracle Database 10g Release 2 software and another 1.2GB for the database. The /tmp directory needs at least 400MB of free space. To check the available disk space on your system, run the following command:
df -h
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 6.8G 1.3G 5.2G 20% /
/dev/sda1 99M 17M 77M 18% /boot
3.2 Create the Oracle Groups and User Account
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -m -g oinstall -G dba oracle
# id oracle
uid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)
Set the password on the oracle account:
passwd oracle
# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
3.3 Create Directories
Issue the following commands as root:
# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/app/oracle
3.4 Configuring the Linux Kernel Parameters
# cat >> /etc/sysctl.conf <
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
# /sbin/sysctl –p
3.5 Setting Shell Limits for the oracle User
# cat >> /etc/profile <
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
ulimit -u 16384 -n 65536
umask 022
# cat >> /etc/csh.login <
if ( \$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
#cat >> /home/oracle/.bash_profile <
umask 022
3.6 Configuring network and hosts files in Linux
Use the graphical login to log in as root.
Go to Applicationàsystem settingsàNetwork
Network configuration window will come. Click on ‘Edit’ option.
Ethernet Device configuration window will come
Select the ‘Statically ip address’ option.
Enter the values
Address: 192.168.1.XX
Subnet Mask:
Default gateway address: 192.168.1.XX
Click on ‘Ok’.
Click on ‘DNS’ Tab in Network configuration window.
Enter the values
Host name: Server name.example.com
Primary DNS: ip address of DNS server.
Click on ‘Activate’ option.
One question window will pop-up. Click on ‘Yes’ Tab.
One information window will pop-up. Click on ‘Ok’ Tab.
Now Go to ComputeràFile systemàetcàsysconfig
Right click on ‘network’ file and open with ‘Text Editor’.
Enter the values as such
HOSTNAME=Server name.example.com
Save the file.
Now Go to ComputeràFile systemàetc
Right click on ‘hosts’ file and open with ‘Text Editor’.
Enter the values as such
Ipaddress Server name.example.com Server name
Ex: localhost
172.20.20.XX Server name.example.com Server name
4 Installing Oracle 10g
Use the graphical login to log in as oracle.
Create a directory to contain the Oracle Database 10g Release 2 distribution:
$mkdir /home/10gR2_db
Copy or download the distribution to /home/10gR2_db folder
Unzip and extract the file:
$cd /home/10gR2_db
$unzip 10201_database_linux32.zip
4.1 Start the Oracle Universal Installer.
$cd /home/10gR2_db/database
1. Select installation method
-->Select basic installation
-->Oracle Home Location:/u01/app/oracle/product/10.2.0/db_1
-->Installation Type: Enterprise Edition (1.3GB)
-->UNIX DBA group: oinstall
-->Make sure Create starter database is unchecked.
-->Click on Next.
2. Specify Inventory Directory and Credentials
-->Inventory Directory:/u01/app/oracle/oraInventory
-->Operating System Group Name: oinstall
-->Click on Next.
3. Product specific prerequisite checks
If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding.
-->Click on Next
4. Summary
-->A summary of the products being installed is presented.
-->Click on Install.
5. Execute Configuration Scripts
-->At the end of the installation, a pop up window will appear indicating scripts that need to be run as root. Login as root and run the indicated scripts.
-->Click on OK when finished.
6. End of Installation
-->Make note of the URLs presented in the summary, and click on Exit.
7. Installation of Oracle 10g on CentOS 4.8 has been finished.
4.2 Post-Installation configuration
4.2.1 Creating a listener using Oracle Net Configuration Assistant.
Use the graphical login to login as oracle
1. Open Terminal and Go to /u01/app/oracle/product/10.2.0/db_1/bin
2. Issue the command ./netca
3. Oracle Net Configuration Assistant window will come
4. Choose the configuration you would like to do:
-->Listener configuration
-->Click on Next
5. Select what you want to do:
-->Click on Next
6. Listener Name:
-->Give that name in the text box. Here I have given ‘orcl’.
7. Select protocols
-->TCP will be selected by default.
-->Click on Next
8. Which TCP/IP port number should the listener use
-->Use the standard port number of 1521
9. Would you like to configure another listener
10. Which listener you want to start
-->Select the listener name which created.
-->Here I selected staborcl listener.
11. Click on ‘Finish’.
4.2.2 Editing tnsnames.ora file
Use the graphical login to login as oracle
1. Go to /u01/app/oracle/product/10.2.0/db_1/network/admin
2. Open the tnsnames.ora using ‘Text editor’.
3. Add the following entries in beginning of the tnsnames.ora file.
(ADDRESS = (PROTOCOL = TCP)(HOST = Server name.example.com)(PORT = 1521))
4.2.3 Creating database using Database Configuration Assistant
Use the graphical login to login as oracle
1. Open Terminal and Go to /u01/app/oracle/product/10.2.0/db_1/bin
2. Issue the command ./dbca
3. Welcome to Database Configuration Assistant for Oracle Database
-->Click on Next
4. Operations
-->Select ‘Create a database’
-->Click on Next
5. Database template
-->Select ‘General Purpose’
-->Click on Next
6. Database Identification
-->Give the ‘Global Database Name’ this name should be the same name given during the creation of ‘listener’. Here I have given ‘orcl’.
-->SID field will automatically fill with the same name given in the ‘Global Database Name’ field. So the SID field will also be ‘orcl’.
7. Management options
-->Select the default options
-->Click on Next
8. Database Credentials
-->Enter and confirm the password.
-->Here I have given ‘petaluma’. Can change the password later.
9. Storage Options
-->Select the default options
-->Click on Next
10. Database File Locations
-->Select the default options
-->Click on Next
11. Recovery Configuration
-->Select the default options
-->Click on Next
12. Database Content
-->Check the option “Sample Schemas”.
-->Click on Next
13. Initialization Parameters
-->Select ‘Typical-Allocate memory as percentage of the total physical memory’
-->Give the value 50 for the percentage.
-->Click on Next
14. Database Storage
-->Click on Next
15. Creation Options
-->Check ‘Create Database’ option.
-->Click on Finish
16. The confirmation screen will appear
-->Click OK.
17. The Database creation will start. At last ‘Database complete’ confirmation window will appear.
-->Click OK.
5 After restarting Linux server
#export ORACLE_SID=orcl
#export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
#./emctl start dbconsole
#./isqlplusctl start
#./lsnrctl start
#./sqlplus /nolog
SQL>connect as sysdba
User name: system
Password: petaluma (given during the db creation)
To check status of pmon service
Ps –aef|grep pmon
6 Conclusion
Now the database is up and running. You can begin exploring many new features in Oracle Database 10g.

Sunday, October 4, 2009

Not able to access company information after connected to VPN.

Problem: Not able to access company internal application and shared folders after connecting to particular company VPN. There wont be any problem connecting VPN. But after connecting VPN, when you try to access company internal application or shared folders, you will get error.

Cause: This problem occures becuase of DNS resolution issue.

Solution: In Windows XP Professional
-->Go to C:\Windows\System32\drivers\etc
-->open hosts file with notepad.
-->Add interal ip(ip of company servers which you want to access from home using VPN)
and Server name.
--> Save and Close the file.

In Windows Vista
--> Open a notepad as administrator.
--> Click on File menu--> Click on 'Open' option.
--> locate the 'hosts' file in C:\Windows\System32\drivers\etc
--> Select hosts file and open.
-->Add interal ip(ip of company servers which you want to access from home using VPN)
and Server name.
--> Save and Close the file.