New CS in oracle 10.2.0.4.0

All,
I am trying to add a User defined Coordinate system. I have read article 395171.1 and 788145.1, but it doesnot work yet. Somewhere I make a mistake in one of the assumptions. I am using Oracle 10.2.0.4.0 on linux. The old coordinate system prior to this version looked like this:
SQL> select * from mdsys.cs_srs where srid=1328000;
Spain National System
1328000 1328000
Oracle
PROJCS["Spain National System",
     GEOGCS [ "Lisboa (DLx)",
     DATUM ["Lisboa (DLx)",
     SPHEROID ["International 1924", 6378388.000000, 297.000000]],
     PRIMEM [ "Greenwich", 0.000000 ],
     UNIT ["Decimal Degree", 0.01745329251994330]],
     PROJECTION ["Stereographic"],
          PARAMETER ["Scale_Factor", 0.9996],
          PARAMETER ["Central_Meridian", -3],
          PARAMETER ["Latitude_Of_Origin", 0],
          PARAMETER ["False_Easting", 500000],
          PARAMETER ["False_Northing", 0],
          UNIT ["Meter", 1.000000000000]]
With the following sql-statements I have added my coordinate system:
delete from mdsys.sdo_coord_ref_system where srid=138000;
delete from sdo_cs_srs where srid =1328000;
delete from MDSYS.SDO_COORD_OP_PARAM_VALS where coord_op_id=1328001;
delete from mdsys.sdo_coord_ops where coord_op_id=1328001;
insert into MDSYS.SDO_COORD_OPS (
COORD_OP_ID,
COORD_OP_NAME,
COORD_OP_TYPE,
SOURCE_SRID,
TARGET_SRID,
COORD_TFM_VERSION,
COORD_OP_VARIANT,
COORD_OP_METHOD_ID,
UOM_ID_SOURCE_OFFSETS,
UOM_ID_TARGET_OFFSETS,
INFORMATION_SOURCE,
DATA_SOURCE,
SHOW_OPERATION,
IS_LEGACY,
LEGACY_CODE,
REVERSE_OP,
IS_IMPLEMENTED_FORWARD,
IS_IMPLEMENTED_REVERSE)
VALUES (
1328001,
'Stereographic_lisboa',
'CONVERSION',
NULL,
NULL,
NULL,
NULL,
9809,
NULL,
NULL,
NULL,
NULL,
1,
'FALSE',
NULL,
1,
1,
1);
/*Latitude_of_origin */
insert into MDSYS.SDO_COORD_OP_PARAM_VALS (
COORD_OP_ID,
COORD_OP_METHOD_ID,
PARAMETER_ID,
PARAMETER_VALUE,
PARAM_VALUE_FILE_REF,
UOM_ID)
VALUES (
1328001,
9809,
8801,
0.0,
NULL,
9001);
/*Central_meridian */
insert into MDSYS.SDO_COORD_OP_PARAM_VALS (
COORD_OP_ID,
COORD_OP_METHOD_ID,
PARAMETER_ID,
PARAMETER_VALUE,
PARAM_VALUE_FILE_REF,
UOM_ID)
VALUES (
1328001,
9809,
8802,
-3,
NULL,
9001);
/*false_easting */
insert into MDSYS.SDO_COORD_OP_PARAM_VALS (
COORD_OP_ID,
COORD_OP_METHOD_ID,
PARAMETER_ID,
PARAMETER_VALUE,
PARAM_VALUE_FILE_REF,
UOM_ID)
VALUES (
1328001,
9809,
8806,
500000,
NULL,
9001);
/*false_northing */
insert into MDSYS.SDO_COORD_OP_PARAM_VALS (
COORD_OP_ID,
COORD_OP_METHOD_ID,
PARAMETER_ID,
PARAMETER_VALUE,
PARAM_VALUE_FILE_REF,
UOM_ID)
VALUES (
1328001,
9809,
8807,
0,
NULL,
9001);
/*PARAMETER ["Scale_Factor", 0.9996], */
insert into MDSYS.SDO_COORD_OP_PARAM_VALS (
COORD_OP_ID,
COORD_OP_METHOD_ID,
PARAMETER_ID,
PARAMETER_VALUE,
PARAM_VALUE_FILE_REF,
UOM_ID)
VALUES (
1328001,
9809,
8805,
0.9996,
NULL,
9001);
/* create the SRS */
delete from mdsys.sdo_coord_ref_system where srid=138000;
insert into MDSYS.SDO_COORD_REF_SYSTEM (
SRID,
COORD_REF_SYS_NAME,
COORD_REF_SYS_KIND,
COORD_SYS_ID,
DATUM_ID,
SOURCE_GEOG_SRID,
PROJECTION_CONV_ID,
CMPD_HORIZ_SRID,
CMPD_VERT_SRID,
INFORMATION_SOURCE,
DATA_SOURCE,
IS_LEGACY,
LEGACY_CODE,
LEGACY_WKTEXT,
LEGACY_CS_BOUNDS,
GEOG_CRS_DATUM_ID)
VALUES (
1328000,
'Stereographic_lisboa',
'PROJECTED',
4530,
NULL,
2000025,
1328001,
NULL,
NULL,
NULL,
NULL,
'FALSE',
NULL,
NULL,
NULL,
10054);
And when I do the following sql-statement, I get result, but looks like the wrong result to me:
select geoloc, geoloc2, sdo_cs.transform(geoloc, 8307), sdo_cs.transform(geoloc2, 8307)
from tabap2 where rownum=1
result:
GEOLOC(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
SDO_CS.TRANSFORM(GEOLOC,8307)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_
SDO_GEOMETRY(2001, 1328000, SDO_POINT_TYPE(923491.219, 4605886.36, NULL), NULL,
NULL)
SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(-167.50928, 39.8716781, NULL), NULL, NUL
L)
It is data from spain, but x,y of -167, 39.8 doesnot looks like it will fall into spain.
Who can shed some light on this User defined Coordinate system?
Any help is appreciated!
Kind regards,
Thomas

The main issue: you used unit of measure "meter" for lat of origin and central meridian. I also fixed a few minor details, such as a misspelled SRID and some unnecessary deletions.
delete from mdsys.sdo_coord_ref_system where srid=1328000;
delete from MDSYS.SDO_COORD_OP_PARAM_VALS where coord_op_id=1328001;
delete from mdsys.sdo_coord_ops where coord_op_id=1328001;
insert into MDSYS.SDO_COORD_OPS (
COORD_OP_ID,
COORD_OP_NAME,
COORD_OP_TYPE,
SOURCE_SRID,
TARGET_SRID,
COORD_TFM_VERSION,
COORD_OP_VARIANT,
COORD_OP_METHOD_ID,
UOM_ID_SOURCE_OFFSETS,
UOM_ID_TARGET_OFFSETS,
INFORMATION_SOURCE,
DATA_SOURCE,
SHOW_OPERATION,
IS_LEGACY,
LEGACY_CODE,
REVERSE_OP,
IS_IMPLEMENTED_FORWARD,
IS_IMPLEMENTED_REVERSE)
VALUES (
1328001,
'Stereographic_lisboa',
'CONVERSION',
NULL,
NULL,
NULL,
NULL,
9809,
NULL,
NULL,
NULL,
NULL,
1,
'FALSE',
NULL,
1,
1,
1);
/*Latitude_of_origin */
insert into MDSYS.SDO_COORD_OP_PARAM_VALS (
COORD_OP_ID,
COORD_OP_METHOD_ID,
PARAMETER_ID,
PARAMETER_VALUE,
PARAM_VALUE_FILE_REF,
UOM_ID)
VALUES (
1328001,
9809,
8801,
0.0,
NULL,
9110);
/*Central_meridian */
insert into MDSYS.SDO_COORD_OP_PARAM_VALS (
COORD_OP_ID,
COORD_OP_METHOD_ID,
PARAMETER_ID,
PARAMETER_VALUE,
PARAM_VALUE_FILE_REF,
UOM_ID)
VALUES (
1328001,
9809,
8802,
-3,
NULL,
9110);
/*false_easting */
insert into MDSYS.SDO_COORD_OP_PARAM_VALS (
COORD_OP_ID,
COORD_OP_METHOD_ID,
PARAMETER_ID,
PARAMETER_VALUE,
PARAM_VALUE_FILE_REF,
UOM_ID)
VALUES (
1328001,
9809,
8806,
500000,
NULL,
9001);
/*false_northing */
insert into MDSYS.SDO_COORD_OP_PARAM_VALS (
COORD_OP_ID,
COORD_OP_METHOD_ID,
PARAMETER_ID,
PARAMETER_VALUE,
PARAM_VALUE_FILE_REF,
UOM_ID)
VALUES (
1328001,
9809,
8807,
0,
NULL,
9001);
/*PARAMETER ["Scale_Factor", 0.9996], */
insert into MDSYS.SDO_COORD_OP_PARAM_VALS (
COORD_OP_ID,
COORD_OP_METHOD_ID,
PARAMETER_ID,
PARAMETER_VALUE,
PARAM_VALUE_FILE_REF,
UOM_ID)
VALUES (
1328001,
9809,
8805,
0.9996,
NULL,
9001);
/* create the SRS */
insert into MDSYS.SDO_COORD_REF_SYSTEM (
SRID,
COORD_REF_SYS_NAME,
COORD_REF_SYS_KIND,
COORD_SYS_ID,
DATUM_ID,
SOURCE_GEOG_SRID,
PROJECTION_CONV_ID,
CMPD_HORIZ_SRID,
CMPD_VERT_SRID,
INFORMATION_SOURCE,
DATA_SOURCE,
IS_LEGACY,
LEGACY_CODE,
LEGACY_WKTEXT,
LEGACY_CS_BOUNDS,
GEOG_CRS_DATUM_ID)
VALUES (
1328000,
'Stereographic_lisboa',
'PROJECTED',
4530,
NULL,
2000025,
1328001,
NULL,
NULL,
NULL,
NULL,
'FALSE',
NULL,
NULL,
NULL,
10054);

Similar Messages

  • I am new to using Oracle, and I am trying to create an add/insert stored pr

    I am new to using Oracle, and I am trying to create an add/insert stored procedure for a table. The PROD_CD and PLAN_CD fields in my table can have no value (empty or null) Can you please check my code and let me know what I am doing wrong?
    Table definition:
    CREATE TABLE DCWEB.USER_PLAN_PREFERENCE
    USERID VARCHAR2(40) NOT NULL,
    PROD_CD VARCHAR2(9) NULL,
    PLAN_CD VARCHAR2(9) NULL,
    STATE_LST VARCHAR2(2) NOT NULL,
    STATE_NM VARCHAR2(40) NOT NULL,
    LST_UPDATE_TS TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP NOT NULL
    ALTER TABLE DCWEB.USER_PLAN_PREFERENCE
    ADD CONSTRAINT USER_PLAN_PREFERENCE_XPK PRIMARY KEY (USERID, PROD_CD, PLAN_CD);
    -- Grant/Revoke object privileges
    grant select, insert, update, delete on DCWEB.USER_PLAN_PREFERENCE to HIGGIB1;
    Stored Procedure Definition:
    procedure setUserPlanPref (
    userid in varchar2,
    prod_cd in varchar2,
    plan_cd in varchar2,
    state_lst in varchar2,
    state_nm in varchar2
    is
    currentTimestamp timestamp := current_timestamp;
    begin
    insert into user_plan_preference (userid, prod_cd, plan_cd, state_lst, state_nm, lst_update_ts)
    values (upper(userid), upper(prod_cd), upper(plan_cd), upper(state_lst), upper(state_nm), currentTimestamp);
    commit;
    exception
    when dup_val_on_index then
    begin
    update user_plan_preference up set
    up.userid = upper(userid),
    up.prod_cd = upper(prod_cd),
    up.plan_cd = upper(plan_cd),
    up.state_lst = upper(state_lst),
    up.state_nm = upper(state_nm),
    up.lst_update_ts = currentTimestamp
    where up.userid = upper(userid)
    and up.prod_cd = upper(prod_cd)
    and up.plan_cd = upper(plan_cd);
    commit;
    exception
    when others then
    rollback;
    end;
    when others then
    rollback;
    end;
    end;
    INPUT DATA
    I am unable to insert a record calling the stored procedure with values: DCWEB4578, , 2P, CA, CALIFORNIA but when I change to the string "NULL", the insert succeeds. When I try to call the stored procedure to update the inserted record with values: DCWEB4578, "NULL", 2P, CO, COLORODO the update does not happen since I still see the original record in the table. Please advise. Thanks in advance for your help.

    938319 wrote:
    I am new to using OracleWelcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and ensure you've updated your profile with a real handle instead of "938319".
    You'll get a faster, more effective response to your questions by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s)
    With APEX we're fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    Thanks for posting the complete code, it makes it so much easier to understand the problem, but always post code wrapped in tags<tt>\...\</tt> tags to preserve formatting and special characters.
    and I am trying to create an add/insert stored procedure for a table.Does this have anything to do with APEX, for which this is the forum? General SQL &amp PL/SQL matters should be directed to the {forum:id=75} forum.
    The PROD_CD and PLAN_CD fields in my table can have no value (empty or null) Can you please check my code and let me know what I am doing wrong?This:
               commit;
    exception
    when others then
    rollback;
    end;
    when others then
    rollback;Remove it all.
    Commits should be issued by end user/client software on completion of a transaction. This means <tt>commit;</tt> should almost never appear in PL/SQL code. The main exception to this is in <tt>dbms_job/secheduler</tt> scheduled processes that have no client or UI. If this code is executed from APEX, then APEX issues more than enough commits anyway.
    exceptions are just a way of ensuring your code is buggy.<tt>when others</tt> exceptions are just a way of ensuring your code is buggy.
    INPUT DATA
    I am unable to insert a record calling the stored procedure with values: DCWEB4578, , 2P, CA, CALIFORNIA but when I change to the string "NULL", the insert succeeds. When I try to call the stored procedure to update the inserted record with values: DCWEB4578, "NULL", 2P, CO, COLORODO the update does not happen since I still see the original record in the table. Please advise. Thanks in advance for your help.With the <tt>commit</tt>s and <tt>when others...</tt> removed from the code you'll have a chance of seeing what's actually happening. Note that the entire procedure can be simplified by writing as a MERGE</tt> statement.

  • Creating a new user in oracle

    Hi,
    I am creating a new user in oracle
    CREATE USER XYZ IDENTIFIED BY XYZ
    it is working fine..
    But when i am writing the below
    CREATE USER Finedocs4.1_SP1 IDENTIFIED BY Finedocs, it is showing erro like invalid character, i think oracle does not support '_' while creating the user..
    Please suggest..
    Thanks
    Hara..

    EdStevens wrote:
    805936 wrote:
    Hi,
    I am creating a new user in oracle
    CREATE USER XYZ IDENTIFIED BY XYZ
    it is working fine..
    But when i am writing the below
    CREATE USER Finedocs4.1_SP1 IDENTIFIED BY Finedocs, it is showing erro like invalid character, i think oracle does not support '_' while creating the user..
    Please suggest..
    Thanks
    Hara..It does not support the "dot". If you want to include that you will have to enclose the entire username in double-quotes :
    CREATE USER "Finedocs4.1_SP1" IDENTIFIED BY Be aware that doing so will also make your username case sensitive, so it would always need to be enclosed. If you make sure the username is create in all caps (CREATE USER "FINEDOCS4.1_SP1" ) it will be effectively case-insensitive to the end user, but there will still be admin commands on the username that will still need to be enclosed in quotes to get around the dot.Correct. I would suggest re-thinking your naming scheme and trying to use something that does not have the . or -

  • API for creating new User in Oracle E-Business Suite through BPEL

    Hello,
    I would like to use a BPEL process to create a new User in Oracle E-Business Suite. In the Integration Repository I was able to find an API called FND_USER_PKG/LOAD_ROW that creates/updates Application's User data. Is this the API I should be using? If so, I would like to better understand how to use this API.
    I have created a simple BPEL process and added an Oracle Application Service, which uses this FND_USER_PKG/LOAD_ROW API. I set the following parameter before Invoking the Oracle Application Service: X_USER_NAME, X_ENCRYPTED_USER_PASSWORD and X_START_DATE. When I run the BPEL process I get the following error. I suspect that I am not passing all the required input parameters. Does anyone have any sample data I can use to get this API to load correctly? If I am using the wrong API, please let me know.
    Please note, I have also posted this question to the SOA Suite and BPEL discussion forums...
    Thank you kindly!
    Christine
    - <input>
    - <Invoke_OracleEBS_SecurityUser_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    - <InputParameters xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/FND_USER_PKG/LOAD_ROW/" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/FND_USER_PKG/LOAD_ROW/">
    <db:X_USER_NAME>
    CRILEY
    </db:X_USER_NAME>
    <db:X_ENCRYPTED_USER_PASSWORD>
    CRILEY
    </db:X_ENCRYPTED_USER_PASSWORD>
    <db:X_START_DATE>
    2009-01-01
    </db:X_START_DATE>
    </InputParameters>
    </part>
    </Invoke_OracleEBS_SecurityUser_InputVariable>
    </input>
    - <fault>
    - <bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    - <part name="code">
    <code>
    20001
    </code>
    </part>
    - <part name="summary">
    <summary>
    file:/E:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_OracleEBS_OnBoarding_1.0_d71e16636aa9ff51b9975926da6faeb2.tmp/OracleEBS_SecurityUser.wsdl OracleEBS_SecurityUser_ptt::OracleEBS_SecurityUser(InputParameters) - WSIF JCA Execute of operation 'OracleEBS_SecurityUser' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the APPS.FND_USER_PKG.LOAD_ROW API. Cause: java.sql.SQLException: ORA-20001: APP-FND-02600: Unable to create user CRILEY due to the following reason(s):
    Unabled to call fnd_ldap_wrapper.create_user due to the following reason:
    ORA-20001: Unabled to call fnd_ldap_wrapper.create_user due to the following reason:
    An unexpected error occurred. Please contact your System Administrator...
    ORA-06512: at "APPS.APP_EXCEPTION", line 72
    ORA-06512: at "APPS.FND_USER_PKG", line 783
    ORA-06512: at "APPS.FND_USER_PKG", line 916
    ORA-06512: at "APPS.FND_USER_PKG", line 1035
    ORA-06512: at "APPS.FND_USER_PKG", line 645
    ORA-06512: at line 1

    Hello and thank you for your response. I am new to using APIs so please excuse my inexperience... I am not sure how to run the API outside of BPEL... Is that something you could easily walk me through?
    I have made the following changes in BPEL based on your recommendation: 1) Added Oracle Application Service and used the API, LDAP_WRAPPER_CREATE_USER, found in the Oracle Application Module Browser* under: Applications Technology (ATG_PF)&gt; User Management (UMX)&gt; User (FND_USER)&gt; PLSQL&gt; User (FND_USER_PKG)&gt; LDAP_WRAPPER_CREATE_USER
    2) Set the following parameter prior to Invoking the Oracle App Service: X_USER_NAME, X_UNENCRYPTED_PASSWORD,X_START_DATE, X_END_DATE, X_DESCRIPTION, X_EMAIL_ADDRESS, X_FAX, X_EXPIRE_PWD.
    3) Deploy and run BPEL through BPEL Control.
    I get the following {color:#ff0000}error on the Invoke{color}. {color:#339966}Do you see any issues with the values I am passing in the input{color}? Any idea why I am getting this error? Is there anything that I need to have configured for the API to work correctly, other than adding an Oracle Application Service in the BPEL?
    Thank you for your time,
    Christine
    bq. Faulted while invoking operation "OracleEBS_LDAP_Create_User" on provider "OracleEBS_LDAP_Create_User". \\     - &lt;messages&gt; \\     - &lt;input&gt; \\     - &lt;Invoke_OracleEBS_LDAP_Create_User_InputVariable&gt; \\     - &lt;part xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance]" name="InputParameters"&gt; \\     - &lt;{color:#339966}InputParameters{color} xmlns:db="[http://xmlns.oracle.com/pcbpel/adapter/db/APPS/FND_USER_PKG/LDAP_WRAPPER_CREATE_USER/]" xmlns="[http://xmlns.oracle.com/pcbpel/adapter/db/APPS/FND_USER_PKG/LDAP_WRAPPER_CREATE_USER/]"&gt; \\     &lt;db:X_USER_NAME&gt; \\     CRILEY \\     &lt;/db:X_USER_NAME&gt; \\     &lt;db:X_UNENCRYPTED_PASSWORD&gt; \\     CRILEY \\     &lt;/db:X_UNENCRYPTED_PASSWORD&gt; \\     &lt;db:X_START_DATE&gt; \\     2009-01-01 \\     &lt;/db:X_START_DATE&gt; \\     &lt;db:X_END_DATE&gt; \\     2010-01-01 \\     &lt;/db:X_END_DATE&gt; \\     &lt;db:X_DESCRIPTION&gt; \\     CRILEY \\     &lt;/db:X_DESCRIPTION&gt; \\     &lt;db:X_EMAIL_ADDRESS&gt; \\[[email protected]|mailto:[email protected]] \\ &lt;/db:X_EMAIL_ADDRESS&gt; \\     &lt;db:X_FAX&gt; \\     999-888-7777 \\     &lt;/db:X_FAX&gt; \\     &lt;db:X_EXPIRE_PWD&gt; \\     0 \\     &lt;/db:X_EXPIRE_PWD&gt; \\     &lt;/InputParameters&gt; \\     &lt;/part&gt; \\     &lt;/Invoke_OracleEBS_LDAP_Create_User_InputVariable&gt; \\     &lt;/input&gt; \\     - &lt;fault&gt; \\     - &lt;bindingFault xmlns="[http://schemas.oracle.com/bpel/extension]"&gt; \\     - &lt;part name="code"&gt; \\     &lt;code&gt; \\     20001 \\     &lt;/code&gt; \\     &lt;/part&gt; \\     - &lt;part name="summary"&gt; \\     &lt;summary&gt; \\     file:/D:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_OracleEBS_OnBoarding_1.0_d71e16636aa9ff51b9975926da6faeb2.tmp/OracleEBS_LDAP_Create_User.wsdl [OracleEBS_LDAP_Create_User_ptt::OracleEBS_LDAP_Create_User(InputParameters) |http://forums.oracle.com/forums/]- WSIF JCA Execute of operation 'OracleEBS_LDAP_Create_User' failed due to: Error while trying to prepare and execute an API. \\     An error occurred while preparing and executing the APPS.FND_USER_PKG.LDAP_WRAPPER_CREATE_USER API. Cause: java.sql.SQLException: ORA-20001: Unabled to call fnd_ldap_wrapper.create_user due to the following reason: \\     ORA-20001: {color:#ff0000}Unabled to call fnd_ldap_wrapper.create_user due to the following reason: \\     An unexpected error occurred. Please contact your System Administrator.. \\     {color}ORA-06512: at "APPS.APP_EXCEPTION", line 72 \\     ORA-06512: at "APPS.FND_USER_PKG", line 3877 \\     ORA-06512: at line 1 \\\\     ;
    Edited by: Christine Riley on Jan 28, 2009 1:22 PM
    Edited by: Christine Riley on Jan 28, 2009 1:26 PM

  • HELP: Problem creating a new database in Oracle 9i

    I am having difficulty in creating a new database in Oracle 9i, on Windows 2000. I would be obliged if somebody can go through the posting below and guide me as to what mistake I am making or what is the source of the problem:
    I reproduce the steps taken by me.
    I have decide the database to be called Mydb. I have made the following directories:
    -- d:\mydb
    -- d:\mydb\data
    -- d:\mydb\control
    -- d:\mydb\log
    -- d:\mydb\bdump
    -- d:\mydb\cdump
    -- d:\mydb\udump
    -- d:\mydb\archive
    -- d:\mydb\pfile
    -- d:\mydb\scripts
    -- d:\mydb\exp
    I copied the initoracle.ora file to d:\mydb\pfile\initmydb.ora, and made the following changes to it:
    -- db_name = mydb
    -- instance_name = mydb
    -- control_files = ("d:\mydb\control\control01.ctl")
    -- background_dump_dest = d:\mydb\bdump
    -- core_dump_dest = d:\mydb\cdump
    -- user_dump_dest = d:\mydb\udump
    -- remote_login_passwordfile = exclusive
    Also, I created a text file called d:\Oracle\Ora90\DATABASE\initmydb.ora with the following contents:
    ifile=d:\mydb\pfile\initmydb.ora
    At DOS prompt, I run the following command:
    set oracle_sid=mydb
    I run the ORAPWD utility to create internal password file at the command prompt.
    d:
    cd \oracle\ora90\database
    orapwd file=pwdmydb.ora password=panther entries=25
    I create a Windows service for the database as follows:
    oradim -new -sid mydb -startmode a -pfile d:\mydb\pfile\initmydb.ora
    I get connected:
    sqlplusw /nolog
    connect sys/change_on_install as sysdba
    startup nomount # pfile=d:\mydb\pfile\initmydb.ora
    create database mydb
    MAXINSTANCES 1
    MAXLOGHISTORY 1
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXDATAFILES 100
    datafile 'd:\mydb\data\system.dbf' size 325m REUSE
    AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
    undo tablespace undotbs datafile 'd:\mydb\data\undo01.dbf' size
    200m reuse
    AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
    default temporary tablespace temptbs
    CHARACTER SET WE8MSWIN1252
    NATIONAL CHARACTER SET AL16UTF16
    logfile group 1 ('d:\mydb\log\log1.log') size 1m,
    group 2 ('d:\mydb\log\log2.log') size 1m,
    group 3 ('d:\mydb\log\log3.log') size 1m;
    Now I get the following error:
    create database mydb
    ERROR at line 1:
    ORA-01092: ORACLE instance terminated. Disconnection forced
    The data files, control file, redo log files are all created. But the above error comes, and I am unable to start the database. What is the reason?
    Thanks in anticipation.
    PS

    Hi DENIS,
    I have executed the following commands (which are in a script file),
    1. sqlplus /nolog
    2. connect sys/change_on_install as sysdba
    3. create database ...
    4. ...
    When I execute the 3rd command, I get an error message as "ORACLE TERMINATED FORCED" and it will end the session. So when the next set of commands in the script are executed, I got the error saying "DATABASE NOT OPEN".
    How to rectify this problem.
    Thanks in advance,
    Kiran

  • Problem with inserting new records in Oracle Forms

    Hi Friends,
    I am a new user to Oracle Forms and I need a help from you people. The problem is as follows:
    I have a data block in which I can display a number of records. In this data block the user will be able to edit the fields if no child records are found in another table. I have used when-new-record-instance to attain this scenario. All are text items. One item licensee_id which is made invisible by setting the property in property palette and required=no ( as this is the primary key of the table). Also the audit columns are made invisible.
    The code for it is as follows:
    DECLARE
         v_alert_button NUMBER;
         v_cnt                          NUMBER;
    BEGIN
         SELECT COUNT (*)
    INTO v_cnt
    FROM id_rev_contracts
    WHERE licensee_id = :ID_REV_LICENSEES.licensee_id;
    IF v_cnt > 0 THEN
    set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', UPDATE_ALLOWED, PROPERTY_FALSE);
    ELSE
         set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', UPDATE_ALLOWED, PROPERTY_TRUE);
         -- set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', INSERT_ALLOWED, PROPERTY_TRUE);
    END IF;
    END;
    Now in this data block I should also be able to insert new records and for the same I have used PRE-INSERT trigger and the code for it is as follows:
    DECLARE
         v_alert_button NUMBER;
    CURSOR v_licensee_id IS SELECT id_rev_licensees_s.NEXTVAL FROM dual;
    BEGIN
    OPEN v_licensee_id;
    FETCH v_licensee_id INTO :id_rev_licensees.licensee_id;
    CLOSE v_licensee_id;
    IF :id_rev_licensees.licensee_id IS NULL THEN
    Message('Error Generating Next v_licensee_id');
    RAISE Form_Trigger_Failure;
    END IF;
    :ID_REV_LICENSEES.created_by := :GLOBAL.g_login_name;
    :ID_REV_LICENSEES.last_updated_by := :GLOBAL.g_login_name;
    :ID_REV_LICENSEES.create_date := SYSDATE;
    :ID_REV_LICENSEES.last_update_date := SYSDATE;
    EXCEPTION
    WHEN form_trigger_failure
    THEN
    RAISE form_trigger_failure;
    WHEN OTHERS
    THEN
    v_alert_button :=
    msgbox ('ERROR in Pre-Insert - ' || SQLERRM, 'STOP', 'Contact IST');
    RAISE form_trigger_failure;
    END;
    Every thing is compiling fine but at the run time when I am trying to insert a new record I am receiving the following error:
    FRM-40508:ORACLE error:unable to insert record
    I also think the pre-insert record is not firing at the time of inserting a new record and saving it. So I request you to please delve into this problem and suggest me how to overcome this problem. Code snippets would do more help for me. If you need any other things from me please let me know. I will see if I could be of any help in that concern because I may not be able to send the entire form as it is.
    Thanks and regards,
    Vamsi K Gummadi.

    first of all
    pre-insert fires after the implicit/explicit commit/commit_form is issued and before the real insert is submitted to the db.
    i would suggest to remove the error handling part for the moment
    because i believe you might be getting "ora-xxxx cannot insert null"
    and also make visible the primary column to check if the pre-insert is executed.
    it would be better to make visible for a while the not null columns of the table/block
    i suppose that the block is insert allowed and you are using table as the source of the block and not any procedures or something...

  • Can we create new tablespace in Oracle Database 10g Express Edition?

    Hi,
    Can we create new tablespace in Oracle Database 10g Express Edition instead of using the default "users" tablespace provided?
    Please advise.
    Thank you.

    Correct. The sum of all user tablespaces is not allowed to exceed 4 GIG.
    You could try shrinking your tablespaces. Theres a script called maxshrink on http://asktom.oracle.com which is useful for this.
    You could compress your tables.
    If you are storing lobs, you could consider storing them as bfiles.
    Or upgrade to Oracle Standard Edition 1. Its not that expensive.

  • Why i can't not create new database in oracle 10g express

    why i can't not create new database in oracle 10g express?
    should i use oracle 11g standard edition?
    thanks

    In Oracle a schema is what a 'database' is in Sqlserver.
    And if you would have been aware about the limitations of XE, you would have known you can only create *1* (one) database using Oracle XE.
    However, probably you don't need a new database at all, and a schema will suffice.
    Sybrand Bakker
    Senior Oracle DBA

  • How do l create a new database in Oracle 10g Express

    How do l create a new database in Oracle 10g Express, other than the one that is created on installation?

    Hello,
    You cannot create a second XE database on the same server.
    But, Oracle database can support as many Schema as you want.
    "Oracle database" is like "SQL Server Instance" and "Oracle Schema" is like "SQL Server database". I means by this shortcut that for
    the end users accessing to different Schemas looks like accessing to different databases.
    You can have several applications on the same database. Each application has its own Schema and Datafile (Tablespace) structure.
    So on your XE database you can add a new Tablespace and create a new User/Schema as follows:
    sqlplus /nolog
    connect / as sysdba
    create tablespace {color:red}new_tablespace_name{color}
    extent management local autoallocate
    SEGMENT SPACE MANAGEMENT AUTO
    datafile '{color:red}complete_datafile_name{color}' size 100M autoextend on next 10M maxsize unlimited;
    create user {color:red}new_schema_name{color} identified by {color:red}password{color}
    default tablespace {color:red}new_tablespace_name{color}
    temporary tablespace TEMP
    quota unlimited on {color:red}new_tablespace_name{color}
    grant connect, resource to {color:red}new_schema_name{color};Then you can connect to this new User/Schema as you defined it and create your new structure and load datas.
    Hope it can help.
    Best regards,
    Jean-Valentin

  • SQL QUERY to create new schema in Oracle 10g Express

    Can anyone provide the SQL query to create a new schema in Oracle 10g Express edition.

    Can anyone provide a SQl query to create a
    schema/user named 'test' with username as 'system'
    and password as 'manager'system user is created during database creation, it's internal Oracle admin user that shouldn't be used as schema holder.
    In Oracle database, Oracle user is schema holder there's no seperate schema name to be defined other than username.

  • What are the new features of Oracle 10g over Oracle9i

    Hi Grus..
    i want to know what are the new features of oracle 10g over Oracle 9i as well oracle 11g over 10g.. can any one give me the detailed document.
    Because I'm struggling each and every time while the interviewer asked above question.
    It's very helpful for me if any one give me the detailed document regarding above question
    Thanks In Advance
    Arun
    Edited by: Arun on Oct 23, 2010 10:19 AM

    Hi,
    Just check below link..would be helpful..
    http://www.oracle.com/global/ap/openworld/ppt_download/database_manageability%2011g%20overview_230.pdf
    and
    Each release of Oracle has many differences, and Oracle 10g is a major re-write of the Oracle kernel from Oracle 9i. While there are several hundred new features and other differences between 9i and 10g, here are the major differences between Oracle9i and Oracle10g:
    Major changes to SQL optimizer internals
    Oracle Grid computing
    AWR and ASH tables incorporated into Oracle Performance Pack and Diagnostic Pack options
    Automated Session History (ASH) materializes the Oracle Wait Interface over time
    Data Pump replaces imp utility with impdp
    Automatic Database Diagnostic Monitor (ADDM)
    SQLTuning Advisor
    SQLAccess Advisor
    Rolling database upgrades (using Oracle10g RAC)
    dbms_scheduler package replaces dbms_job for scheduling
    and you need to refer oracle documentation for sql, plsql references where you will know particular enhancements made...
    thanks
    Prasanth
    Edited by: Onenessboy on Oct 23, 2010 10:22 AM

  • New features for oracle 10g DBA

    hi all,
    i want to download new features for oracle 10g dba in free, but i cant found it free.so if somebody know anylink which provide it free or if somebody have it.plz let me know.i need it on urgent basis.
    Ihsan DBA from Pak

    http://www.oracle.com/pls/db102/to_toc?pathname=server.102%2Fb14214%2Ftoc.htm&remark=portal+%28Getting+Started%29
    Could you not download from here?

  • 1Z0-045: Oracle Database 10g: New Features for Oracle 8i OCPs

    Hi,
    I was looking for right reference book for the 1z0-045 upgrade certification. I could not find any reference book that is related to this certification. Only one book have found out on Amazon site, which is "OCP Oracle Database 10g: New Features for Administrators Exam Guide (Oracle Press) (Paperback)" published by McGraw Hill.
    But this book does not show exem number 1z0-045 anywhere. So I am not sure, is it a right book to buy.
    Please let me know if any one has any knowledge about that.
    I appreciate for your information.
    Thanks
    Amit

    The book you mention is for those individuals who are upgrading their 9i OCP to the 10g OCP. Since you are apparently upgrading from 8i OCP, there is possibly a gap in your learning. You might want to take a look at OCP Oracle9i Database: New Features for Administrators Exam Guide (Paperback) which explains the new features for Oracle 9i to someone coming from an 8i background. No additional exam would be needed in your case but this book may help to fill out your knowledge a bit. You could also take a look at http://download.oracle.com/docs/cd/B10501_01/server.920/a96531/toc.htm if you would rather not buy an additional book.
    Tom

  • New features for Oracle Assets in Apps 12i

    What are the new features for Oracle Assets in Apps version 12i?
    where can i find User Guide for FA in Aps 12i?

    You could check Appendix A of the Oracle Applications Upgrade Guide for 11i to Release 12:
    http://download-east.oracle.com/docs/cd/B34956_01/current/acrobat/r12upg11i.zip
    Assets module is discussed on page A-2.
    Also, you can find the Fixed Assets Users Guide for R12 at the link that hsawwan provided.

  • How to see new disk in oracle linux 5

    Dear,
    i am using oracle VM and created 2 guest OS (both Olx5) i also created a shared disk and assigned to both linux servers.
    question: how can i see the disk in each server. using fdisk -l it just shown the one there before.
    in HPUX we have ioscan to detect new devices. is there away to check for new disk in oracle linux.
    Thanks in advance.
    Tom

    fdisk -l shows only existing partitions. So if your new disk has not partition created it will be not shown in the output.
    AFAIK there is not such command which will list all devices but there are several ways how to find the devices. All informations you can find in /proc directory (fdisk -l reads /proc/partitions when device is not passed as argument).
    You can find devices (local disks) for example using following commands (hope it helps):
    cat /var/log/dmesg |egrep 'sd[a-z]: s|hd[a-z]: h'
    cat /proc/diskstats |egrep -v 'ram|fd'|awk {'print $3'}

  • New Function in Oracle BI

    Hi :)
    I made a new function in PL/SQL transfering BLOB to CLOB.
    i made this function, because I know how to translate CLOB in Oracle BI.
    with this function for example:
    EVALUATE('DBMS_LOB.SUBSTR(%1,40,1)',PACKET_CONTENTS)
    but in my case, this Packet_content is BLOB, so i want to translate it to CLOB and than use the substr function to translate it (or part of it).
    so I tried doing that:
    EVALUATE('DBMS_LOB.SUBSTR(%1,40,1)',EVALUATE('BLOB_2_CLOB(%1)','111'))
    the parameter "111" is a param i give to my function (just for test). and my function should return the results from the PACKET_CONTENTS in CLOB type.
    the answer error i get is the following one:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14027] The navigator cannot handle the following request containing constants only: Evaluate( DBMS_LOB.SUBSTR(%1,40,1),Evaluate( BLOB_2_CLOB(%1),'111') ) as c1. (HY000)
    SQL Issued: SELECT EVALUATE('DBMS_LOB.SUBSTR(%1,40,1)',EVALUATE('BLOB_2_CLOB(%1)','111')) saw_0 FROM RWD ORDER BY saw_0
    Any ideas? or any other information you want to know?
    thanks :)
    P.S: im really new in the Oracle BI things, so I might be do silly things I cant do... so please fix me if you can :)
    thanks !

    Are you trying to return a text string from the BLOB/CLOB? Can you not do this in a database view over the top of your existing table, removing any potential ODBC/OCI issues?
    ie.
    CREATE VIEW test_view AS
    SELECT dbms_lob.substr( blob_column,4000,1) text_column
    FROM <table>;

Maybe you are looking for

  • Any way to Print report generated as HTML

    Hi All. We are using FM WWW_HTML_FROM_LISTOBJECT to convert a list to HTML and show it in HTML container. Now, is there a way to Print this document? If I right-click and print, it uses the IE settings - i.e. if in the IE page setup, header and foote

  • MacBook will not connect to the internet via ethernet cable anymore.

    My MacBook apparently decided the other day that it no longer desired to connect to the internet through an ethernet connection; it still works perfectly through a wireless network. I am a university student and so there is wireless almost everywhere

  • Getting ExceptionInInitializerError while calling a java class from db

    Hi, I have a class file working fine outside db. When I load that through loadjava and call it through pl/sql function, I get ExceptionInInitializerError. Do you have any idea why this happens? I am trying to login into a third party server in this c

  • CONVERT function from SQL-Server 7.0 to Oracle

    Whenever a Convert function appears in the T-SQL, WorkBench converts it to RPAD and doesn't warm about it. How can I avoid this situation??? It`s very urgent!! I`ve to migrate an entire system and I`m very short of time. Any comment would be helpfull

  • IPhone e-Mail bug: Text cut off below a picture

    Hi Guys, Just discovered a very annoying bug in iPhone's mail client: If you are creating a new e-mail and paste a picture into it, the text below the picture will be cut off completely. So if you have a mail: "text before [PICTURE] text after" then