Saturday, February 22, 2014

Oracle rebuild index

Hi,

Here some reference command that you can re-index you index.

select ' ALTER INDEX ' || INDEX_NAME || ' REBUILD ; COMMIT;' from user_indexes;

run this command, and copy all the output. Paste into SQL script or editor, and run as script.

Wednesday, August 14, 2013

JACC Policy Provider:Failed Permission Check: context (" ..... ") , permission (" (java.lang.RuntimePermission reflectionFactoryAccess) ") |#]

Same thing with previous post.. I got this error after i try to invoke my application in glassfish server.

"JACC Policy Provider:Failed Permission Check: context (" ..... ") , permission (" (java.lang.RuntimePermission reflectionFactoryAccess) ") |#]"

Just grant this reflectionFactoryAccess inside server.policy

please find grant { }

and insert below permission into that grant content.

    permission java.lang.RuntimePermission "reflectionFactoryAccess";


save it and please restart.

JACC Policy Provider:Failed Permission Check: context (" .....") , permission (" (org.osgi.framework.AdminPermission (id=92) resolve,resource) ") |#]

Im facing below error when i try to run my application in glassfish server.

"JACC Policy Provider:Failed Permission Check: context (" .....") , permission (" (org.osgi.framework.AdminPermission (id=92) resolve,resource) ") |#]"

so the solution is just need to put some grant in server.policy. please find grant { }

and insert below statement.

permission org.osgi.framework.AdminPermission "(id=92)", "resolve,resource";

save it.. and please restart your glassfish server.

Wednesday, September 5, 2012

Oracle : Database link

For example


(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))
(CONNECT_DATA=(SID=mydb)))


1. Connect your oracle.
     > sqlplus /nolog
     > conn user/pass@mydb


2. Create db link :
     > Create database link monitordblink
connect to monitor identified by monitor123
using 'mydb';

the syntax is :

CREATE {PUBLIC} DATABASE LINK <database link name>
{CONNECT TO <oracle user id>
IDENTIFIED BY <remote oracle user's password> }
USING ' <dbstring> ';

3.  > Commit;

4. Check your db link :
    > SELECT * FROM all_db_links;


5. You can check table by using below command :
select <column list> from <table>@<dblink name>;
> select * from usertbl@monitordblink;


Source

Tuesday, September 4, 2012

Unix : Delete file or Folder


rm foo
delete the file named "foo"

rm a*
delete all files with names beginning with "a"

rm *.jpg
delete all files with names ending in ".jpg"

rm -R temp
delete the directory named "temp", and all of its contents

ClearCase

just for my reference only

> ct lsview
- see all ct view

> ct lsview *myname*
- search view contain "myname" string

> ct setview myname_view
- set view

> ct mkview yourname_view
- to create new view

Tuesday, July 24, 2012

Find File in unix

find /home/myname/ -name *myfile*

for current directory
find ./ -name *myfile*

grep "myname" listname.log