Sunday, October 9, 2011

Truncate privilege to user b on tables of user A


Request: Need to provide truncate privilege to user B on table A.test_table.

1) Connect to user A

2) Create procedure to truncate table as below:

create or replace procedure truncate_test_table
as
l_sql varchar2(2500); 
begin
l_sql := 'TRUNCATE TABLE A.TEST_TABLE'; 
execute immediate l_sql; 
end; 

2) Grant the procedure to User B:

grant execute on A.truncate_test_table to b;

3) Try executing the procedure from User B as below:

begin
A.truncate_test_table; 
end; 

Sharing a Folder from HostOS to Vmware Guest OS


I tried to share a folder from my windows machine(HOST OS) to Linux (VMWare Guest OS).
I breaked my head for more than an hour and found an article from vmware site.

1) Share the folder in windows (Right click the folder click share button and provide access to any windows user) which you want to share with Linux.
2)In Linux machine (VMWare Guest OS) login as root and issue below command.

mkdir /mnt/docs
mount -t smbfs -o username=<Windows system user account>,password=<password> //<Win_Hostname>/docs /mnt/docs

Now you can see the shared folder under /mnt/docs.

Eventhogh this is simple i wasted 1+ hour for this,so thought of sharing........