May 20, 2016

Could not add user to DBS os group or TNS:no listner


Error


While starting the database getting error :

usr not in DBA os group 

TNS:no listner


Solution


Determine whether these groups and users already exist, and if necessary, to create them, follow these steps:

   1. To determine whether the oinstall group exists, enter the following command:

      # more /etc/oraInst.loc

      If the output of this command shows the oinstall group name, then the group already exists.

      If the oraInst.loc file exists, then the output from this command is similar to the following:

      inventory_loc=/u01/app/oraInventory
      inst_group=oinstall

      The inst_group parameter shows the name of the Oracle Inventory group, oinstall.

   2. To determine whether the dba group exists, enter the following command:

      # grep dba /etc/group

      If the output from this commands shows the dba group name, then the group already exists.

   3. If necessary, enter the following commands to create the oinstall and dba groups:

      # /usr/sbin/groupadd oinstall
      # /usr/sbin/groupadd dba

   4. To determine whether the oracle user exists and belongs to the correct groups, enter the following command:

      # id oracle

      If the oracle user exists, then this command displays information about the groups to which the user belongs. The output should be similar to the following, indicating that oinstall is the primary group and dba is a secondary group:

      uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper)

   5. If necessary, complete one of the following actions:

          * If the oracle user exists, but its primary group is not oinstall or it is not a member of the dba group, then enter the following command:

              # /usr/sbin/usermod -g oinstall -G dba oracle

          * If the oracle user does not exist, enter the following command to create it:

              # /usr/sbin/useradd -g oinstall -G dba oracle

            This command creates the oracle user and specifies oinstall as the primary group and dba as the secondary group.

   6. Enter the following command to set the password of the oracle user:

      # passwd oracle

No comments: