Pages

Saturday, December 3, 2011

How to grant all user object privilege


In oracle, each user/schema has some objects. They can be tables, views, procedures, functions or packages. By default a user can not access other objects owned by other user, unless after the owner gives that user some objects privileges.

Granting objects privileges to other user in oracle can by done one by one. If a user has 100 objects for example, he must run a script 100 times to give the whole object. But there are tricks he can do to overcome it.

To give permissions all objects owned by a schema, perform the following steps:
  1. login as object owner
  2. run script below
    begin
    for i in (select object_name from user_objects where object_type in ('TABLE','VIEW'))
    LOOP
    execute immediate 'grant select on '|| i.object_name||' to bb';
    end loop;
    end;
    /
    

Friday, December 2, 2011

How to troubleshoot ‘cannot restore segment prot after reloc: Permission denied’

The error above occurs because the settings of selinux. To troubleshoot that problem, do the following:
  1. Go to System -> Administration -> Security Level and Firewall -> SELinux Tab
  2. Change "Enforce" to "Disabled"
  3. Alternatively you can edit selinux setting by editing file /etc/selinux/config

Thursday, December 1, 2011

How to edit fstab when at "Repair filesystem" prompt

Have you ever got an error in linux that caused by the errors on the filesystem??. If so, you would get "Repair filesystem" prompt appeared.

This post will discuss about how to troubleshoot linux when "Repair filesystem" prompt appears on RHEL 5. Here are the steps :
  1. Boot your system with Redhat Linux Disk1
  2. Go through the Linux Rescue process and you will get a hash prompt
  3. Type the command below
    # vi /mnt/sysimage/etc/fstab
    
  4. Save using wq
Don't Forget To Join Our Community
×
Widget