8 Aralık 2014 Pazartesi

FRM-10043: Cannot open file / FRM-10044: Cannot create file.

I received this error due to not having executive privilige on that file directory.


We have to have rx privilege on that directory

So it is easy to change privilege by writing

chmod -R 777 [file_directory] by logging in with root username

Then we will have priviliges write/read/execute on every sub-file of directory specified in [file_directory].

But be cautious about granting these priviliges. You might have to ask firstly your DBA.

Simply check the privileges on the directories you try issue on.

FRM-47023: No such parameter named G_QUERY_FIND exists in form [file_name.fmb]

The cause

Customer can check the version of form [file_name.fmb] from $AU_TOP and [file_name.fmx] from $JA_TOP.If there is mismatch then compile the form [file_name.fmb] using the following
code;

1-)Login server with applmngr username

2-)Change the directory to $AU_TOP/forms/US

3-)Execute following statement


f60gen module=<file_name.fmb> userid=apps/[apps_pwd] output_file=$JA_TOP/forms/US/[file_name.fmx]


HOW TO COMPILE FORMS IN 11i

1-)Login to server with applmngr username
2-)set path $AU_TOP/forms/US
3-)Copy .fmb file to $AU_TOP/forms/US
4-)Execute command below

f60gen module=<file_name>.fmb userid=apps/[apps_pwd] output_file=$CUSTOM_TOP/forms/US/<file_name>.fmx


*   $CUSTOM_TOP is a destination which created .fmx file will be stored.

It is either possible to write a custom destination such as;

$CUSTOM_TOP= /apptest/TEST/testappl/xxxt/11.5.0/forms/US



21 Ekim 2014 Salı

CREATE DATABASE LINK



There are two main ways which are easy to create database links between databases instances.

Format;

create database link [link_name] connect to [user_name] identified by [password]
using [database_connection_string / allias];


1-) If there is an description about database connection inside tnsnames.ora file about the database which will be connected, it is easy by just writing allias names of it in code.
For instance,

create database link test_hamdi to connect hamdi identified by "hamditest18"  using 'TESTDB';

In tnsnames.ora,connection string will be defined as written here;

TESTDB=
   (DESCRIPTION=
    (ADDRESS=
      (PROTOCOL=TCP)
      (HOST=10.1.1.111)
      (PORT=1532)
    )
    (CONNECT_DATA=
      (SID=TEST)
    )



2-)If there is not any description about database connection string inside tns.names.ora file,it is also possible to write directly appropriate string inside linking sql code just like below;

create database link test_hamdi to connect hamdi identified by "hamditest18" using '(DESCRIPTION=
    (ADDRESS=
      (PROTOCOL=TCP)
      (HOST=10.1.1.111)
      (PORT=1532)
    )
    (CONNECT_DATA=
      (SID=TEST)
    )
  )'


It is assumed that strings above are connection information for TESTDB database.


WARNING: Be sure that you can ping to each databases from tellnet which database link will be created

20 Ekim 2014 Pazartesi

ROLLBACK TO SAVEPOINT Sample With Oracle9i,Oracle11g Databases Cases

Let's see the reaction of ROLLBACK TO SAVEPOINT a with a scenerio of two different databases below. It is explained in here with sql coding.

Sql Code:
>create table product
(pcode number(2),
pname varchar2(10));

>insert into product values(1,'pencil');

>insert into product values(2,'pencil');

>savepoint a;

>update product set pcode=10 where pcode=1;

>savepoint b;

>delete from product where pcode=2;

>commit;

>delete from product where pcode=10;


>rollback to savepoint a;


>select * from product;

Oracle 9i result;
This is different.
Oracle 11g result;
 No sql statement rollbacked.
 The rollback generates an error.

19 Ekim 2014 Pazar

GRANT FUNCTION/PROCEDURE TO USER / PUBLIC

If you want to grant a user on a function/procedure, it can be used just like here;

grant execute on  [ function name ] / [ procedure name ] to [ user_name] ;

It is also possible to grant all users to execute function/procedure by this code below;

grant execute on [ function name ] / [ procedure name ] to public;