Request execution order, dictionnary dynamic views, new database creation

Hi,
Could you tell me, in which order this sql request is executed:
select pro_name from product where pro_price =(select max(pro_price) from product);
Is the sub-request executed first and the principal request executed once the sub request has sent its result or
-is the principal request executed first, waiting the sub-request result when its arrived to
=(select max(pro_price) from product);
Thanks a lot for your answer
Secondly can you tell me what means the option "management local" when you create the system, sysaux and undo datafiles, for example like this
datafile 'C:\ORADATA\DBPROD\Base\DBPROD_SYSTEM_01.dbf' size 300M autoextend ON next 10M maxsize 500M extent management local
To finish, what permit to créate the et catoctk.sql script when you create the data dictionnary.
Thanks a lot for your answer.
Nathalie

1) The order in which elements of a SQL statement are processed is completely up to the optimizer. Which means that it is subject to change over time. Today, the optimizer may choose to execute a query one way, tomorrow, it may choose a different order of operations.
Now, practically, it is almost certain that Oracle would choose to evaluate the maximum price first and then scan the product table for the products with that maximum price. But that's just because there aren't any other options that would seem appealing. If you added another condition, it might make sense to evaluate that condition first and then find the maximum price.
2) Extent management local means that you are creating a locally managed tablespace. Assuming you're using a vaguely recent version of Oracle, all tablespaces are locally managed. Old versions of Oracle used dictionary managed tablespaces which basically meant that tracking information about when extents were allocated was stored in the SYSTEM tablespace. This was occasionally a performance problem which is why Oracle moved that information into the tablespace.
3) I'm not sure what you're asking when you ask about a "permit to create the catoctk.sql script"
Justin

Similar Messages

  • Request execution order, dictionnary  dynamic views, new databaqse creation

    Hi,
    Could you tell me, in which order this sql request is executed:
    select pro_name from product where pro_price =(select max(pro_price) from product);
    Is the sub-request executed first and the principal request executed once the sub request has sent its result or
    -is the principal request executed first, waiting the sub-request result when its arrived to
    =(select max(pro_price) from product);
    Thanks a lot for your answer
    Secondly can you tell me what means the option "management local" when you create the system, sysaux and undo datafiles, for example like this
    datafile 'C:\ORADATA\DBPROD\Base\DBPROD_SYSTEM_01.dbf' size 300M autoextend ON next 10M maxsize 500M extent management local
    To finish, what permit to créate the et catoctk.sql script when you create the data dictionnary.
    Thanks a lot for your answer.
    Nathalie

    Hi,
    This does not look like a Berkeley DB issue. You can try one of the other forums, maybe the Database - General forum at:
    General Database Discussions
    If there is a Berkeley DB issue here, what is the platform and version.
    Thanks,
    Sandra

  • Problem in new database creation with the help of online  backup

    Dear dba's
    i am using oracle 11gR2 database in windows server 2003. database is running in ARCHIVE LOG mode.
    i have taken an online backup of all datafile,controlfile and spfile.Then i crated folders in all the locations as required for new database.
    then i registerd the service of new database named as 'newdb' by
    oradim -NEW -SID newdb
    then i created a password file manually in 'oracle_home\database' location.
    i created a new contolfile named as controlfile_01.ctl. the content of controlfile as follows
    STARTUP NOMOUNT
    CREATE CONTROLFILE SET DATABASE "NEWDB" NORESETLOGS ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
    LOGFILE
    GROUP 1 (
    'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\ONLINELOG\O1_MF_1_7FK0XG7B_.LOG',
    'D:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\NEWDB\ONLINELOG\O1_MF_1_7FK0XHWB_.LOG'
    ) SIZE 50M,
    GROUP 2 (
    'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\ONLINELOG\O1_MF_2_7FK0XKB8_.LOG',
    'D:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\NEWDB\ONLINELOG\O1_MF_2_7FK0XM0Z_.LOG'
    ) SIZE 50M,
    GROUP 3 (
    'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\ONLINELOG\O1_MF_3_7FK0XNOZ_.LOG',
    'D:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\NEWDB\ONLINELOG\O1_MF_3_7FK0XOWB_.LOG'
    ) SIZE 50M
    DATAFILE
    'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\DATAFILE\O1_MF_SYSTEM_7FK0SKN0_.DBF',
    'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\DATAFILE\O1_MF_SYSAUX_7FK0SKPG_.DBF',
    'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\DATAFILE\O1_MF_UNDOTBS1_7FK0SKTC_.DBF',
    'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\DATAFILE\O1_MF_USERS_7FK0SKWB_.DBF',
    'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\DATAFILE\O1_MF_EXAMPLE_7FK0Z5LK_.DBF',
    'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\MARSH.DBF',
    'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\JOMARSH.DBF'
    CHARACTER SET AL32UTF8
    the control file path was registered in pfile also.
    then i brought the database to nomount stage.
    the problem is when i try to mount database it shows following error. anyone can help me to over come from this issue????????
    SQL> startup pfile='D:\app\Administrator\product\11.1.0\db_1\database\INITnewdb.ora' nomount;
    ORACLE instance started.
    Total System Global Area 535662592 bytes
    Fixed Size 1334380 bytes
    Variable Size 301990804 bytes
    Database Buffers 226492416 bytes
    Redo Buffers 5844992 bytes
    SQL> ALTER DATABASE MOUNT;
    ALTER DATABASE MOUNT
    ERROR at line 1:
    ORA-00205: error in identifying control file, check alert log for more info
    the alert massage is:
    ORA-00210: cannot open the specified control file
    ORA-00202: control file: 'D:\APP\ADMINISTRATOR\ORADATA\NEWDB\CONTROLFILE\CONTROLFILE_01.CTL'
    ORA-27048: skgfifi: file header information is invalid
    OSD-04001: invalid logical block size (OS 1413563730)
    Fri Dec 09 13:11:59 2011
    Checker run found 1 new persistent data failures
    ORA-205 signalled during: ALTER DATABASE MOUNT...
    Thanks & Regards,
    John Marshal.A

    Hi;
    Error: ORA 205
    Text: error in identifying control file <name>
    Cause: The system could not find a control file of the specified name and
    size.
    Action: Either
    Check that the proper control filename is referenced in the
    CONTROL_FILES initialization parameter in the initialization parameter
    file and try again.
    When using mirrored control files, that is, more than one control file
    is referenced in the initialization parameter file, remove the control
    filename listed in the message from the initialization parameter file
    and restart the instance.
    If the message does not recur, remove the problem control file from
    the initialization parameter file and create another copy of the
    control file with a new filename in the initialization parameter file.
    Regard
    Helios

  • New database creation problem

    While we are trying to create new database in test server it getting below error.
    Error:

    Hello,
    There may be session accessing the model database, and that prevents the creation of the new database. This is by design; an exclusive lock is required on model database by SQL Server, since it needs to create the new database from a copy of the model database.
    Run the sp_who2 to know which session has opening the model database.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • New database creation

    Does anyone know if it is possible to create a new database in a new location other than the one specified by {ORACLE_BASE} ?

    Absolutly. If you are using DBCA you can either change the definition of ORACLE_BASE, or edit the file paths in the wizard. Alternatively, you could create a script to create the database and not use DBCA at all.

  • New database creation in 10g RAC

    Hi,
    I'm trying to create a new database using DBCA in 2 node RAC cluster. When I select custom database and the password for sys and system users. In the next screen I select ASM and it is asking for password. When i give the password which i entered before for sys and system, it is not taking. Even i tried different password but getting an error password for user SYS is not valid. Any idea what the issue is?
    Thanks

    You must have created an ASM instance prior to creating the database. DBCA won't create an ASM instance alongside with a database.
    As the ASM instance apparently doesn't exist, you can't connect to it,
    Create an ASM instance first.
    Sybrand Bakker
    Senior Oracle DBA

  • New database creation crash with ora-470

    i am creating a new instance on redhat linux 4 to migrate an hp erp instance
    after creating database i am creating tablespaces.
    when creating big tablespaces instance crashes with 3113 end of communcation channel
    tried already to change lower_zone_protection=100 (kernel parameter)
    made swap size big and checked space
    nothing helped
    still getting that lgwr crashed and pmon terminated instance with ora-470
    any ideas?
    regards

    /mirsupl/comn_log_out/oradump/bdump/mirsupl_pmon_19527.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORACLE_HOME = /mirsupl/oracle/10.2
    System name:     Linux
    Node name:     mis231
    Release:     2.6.9-89.ELsmp
    Version:     #1 SMP Mon Apr 20 10:34:33 EDT 2009
    Machine:     i686
    Instance name: mirsupl
    Redo thread mounted by this instance: 1
    Oracle process number: 2
    Unix process pid: 19527, image: oracle@mis231 (PMON)
    *** 2010-01-22 14:58:52.211
    *** SERVICE NAME:(SYS$BACKGROUND) 2010-01-22 14:58:52.124
    *** SESSION ID:(555.1) 2010-01-22 14:58:52.124
    Background process LGWR found dead
    Oracle pid = 7
    OS pid (from detached process) = 19537
    OS pid (from process state) = 19537
    dtp = 0x2000bbf0, proc = 0x9f426340
    Dump of memory from 0x2000BBF0 to 0x2000BC1C
    2000BBF0 00000074 9F426340 00000000 00000000 [t...@cB.........]
    2000BC00 5257474C 00000200 00004C51 0000AF74 [LGWR....QL..t...]
    2000BC10 00000001 1998D4DE 00040001 [............]
    Dump of memory from 0x9F426340 to 0x9F4268FC
    9F426340 00000102 00000000 00000000 00000000 [................]
    9F426350 00000000 9D63F054 A290E354 9F5FF6B0 [....T.c.T....._.]
    9F426360 A290D508 00000000 A290D56C A290D56C [........l...l...]
    9F426370 A290E348 00000601 00000000 9F5D4948 [H...........HI].]
    9F426380 9F5FF6B0 00000007 00000000 00000000 [.._.............]
    9F426390 00000000 A272B148 A272B1E4 00000000 [....H.r...r.....]
    9F4263A0 00000000 00000000 00000000 00000000 [................]
    Repeat 3 times
    9F4263E0 00030000 00000000 00030000 00000000 [................]
    9F4263F0 00000000 00000000 00040000 00000000 [................]
    9F426400 00030000 00000000 00030000 00000000 [................]
    Repeat 1 times
    9F426420 00030000 00000000 00000000 00000000 [................]
    9F426430 00000000 00000000 00000000 00000000 [................]
    Repeat 3 times
    9F426470 00000000 0000012C 9F426478 9F426478 [....,...xdB.xdB.]
    9F426480 00000000 00000001 00000000 9F42648C [.............dB.]
    9F426490 9F42648C 00000000 00000000 00000000 [.dB.............]
    9F4264A0 00000000 00000000 0000006D 00000000 [........m.......]
    9F4264B0 00005645 00000018 00000004 00000075 [EV..........u...]
    9F4264C0 00000099 A2418354 A2418354 00010000 [....T.A.T.A.....]
    9F4264D0 00000000 00000000 00000000 00000000 [................]
    Repeat 1 times
    9F4264F0 00000000 00000000 00000000 00004C51 [............QL..]
    9F426500 00000000 00000000 00000000 00000000 [................]
    Repeat 2 times
    9F426530 00000000 00000000 00000000 9F426340 [............@cB.]
    9F426540 00000000 00000000 00000000 00000000 [................]
    Repeat 6 times
    9F4265B0 00000000 00000000 9F4265B8 9F4265B8 [.........eB..eB.]
    9F4265C0 00000000 00000000 00000001 00000000 [................]
    9F4265D0 00000000 00028002 0000000B 00004C51 [............QL..]
    9F4265E0 0000AF74 B745C6C0 00000000 00000000 [t.....E.........]
    9F4265F0 00000000 00000000 00000000 00000000 [................]
    9F426600 00000000 00000000 00000000 00000003 [................]
    9F426610 FFFFFFFF 00000000 00000000 00000000 [................]
    9F426620 00000000 00000000 00000000 00000000 [................]
    Repeat 6 times
    9F426690 00000000 00000000 00000000 6D61726F [............oram]
    9F4266A0 6C707572 00000000 00000000 00000000 [rupl............]
    9F4266B0 00000000 00000000 00000000 00000008 [................]
    9F4266C0 3273696D 00003133 00000000 00000000 [mis231..........]
    9F4266D0 00000000 00000000 00000000 00000000 [................]
    Repeat 2 times
    9F426700 00000006 4E4B4E55 004E574F 00000000 [....UNKNOWN.....]
    9F426710 00000000 00000000 00000000 00000000 [................]
    9F426720 00000000 00000008 33353931 00000037 [........19537...]
    9F426730 00000000 00000000 00000000 00000000 [................]
    9F426740 00000005 6361726F 6D40656C 33327369 [....oracle@mis23]
    9F426750 4C282031 29525747 00000000 00000000 [1 (LGWR)........]
    9F426760 00000000 00000000 00000000 00000000 [................]
    9F426770 00000000 00000014 00000002 00000000 [................]
    9F426780 00000000 00000000 00000000 00000000 [................]
    Repeat 9 times
    9F426820 00000200 00000000 00000000 00000000 [................]
    9F426830 00000000 A246F880 A2417718 A241715C [......F..wA.\qA.]
    9F426840 00000000 A2712934 00000000 00000000 [....4)q.........]
    9F426850 00000000 00000000 00000000 00000000 [................]
    9F426860 00000000 9F426864 9F426864 00AF0000 [....dhB.dhB.....]
    9F426870 00000000 00AE8F99 00A45705 015D8F99 [.........W....].]
    9F426880 00000000 00000000 00000000 00000000 [................]
    9F426890 00000000 00000000 00000814 00000000 [................]
    9F4268A0 00000088 00000000 00000814 00000000 [................]
    9F4268B0 00000000 00000000 00000000 00000000 [................]
    Repeat 3 times
    9F4268F0 00000000 00000000 00000006 [............]
    error 470 detected in background process
    ORA-00470: LGWR process terminated with error

  • 805 new database creation

    Hi,
    I created a new 805 database(abc) on unix.(and ran catalog,catproc also).
    SVRMGR> select status from v$instance;
    STATUS
    OPEN
    but ....
    $ sqlplus system/mgr@abc
    SQL*Plus: Release 8.0.5.0.0 - Production on Wed Sep 14 15:46:19 2005
    (c) Copyright 1998 Oracle Corporation. All rights reserved.
    ERROR:
    ORA-01033: ORACLE initialization or shutdown in progress
    Can any one give suggestion plz..
    Thank you in advance.

    Bhoopal,
    If you have an access to metalink, I advise to read metalink note 131277.1 ORA-01403 during Database Startup.
    Here, we can read : The sys.props$ table is not properly populated with NLS parameter values.
    To verify, you have to check the number of rows in sys.props$:
    SVRMGR> connect internal;
    connected.
    SVRMGR> select count(*) from sys.props$;
    The number of rows differs for different versions of the database:
    In 7.3.x there should be 14 entries in sys.props$
    In 8.0.x there should be 15 entries in sys.props$
    In 8.1.x there should be 22 entries in sys.props$
    Check the alert.log file for other possible errors. For example, possible
    sys.props$ table corruption message.
    The only available solution in this case is to recreate the database.
    Tell us if you are in this situation.
    But I think that all is not lost, you are certainly here : an other metalink note 109803.1 ORA-1403 Signaled during alter database open, is more optimist : just recreate controlfile can help (read metalink note 1012929.6 How to Recreate the Controlfile).
    To reacreate ctlfile :
    SVRMGR> connect internal
    SVRMGR> startup mount
    SVRMGR> alter database backup controlfile to trace;Modify the generated file to have a ctl.sql file like this :
    STARTUP NOMOUNT 
       CREATE CONTROLFILE REUSE DATABASE "P716" NORESETLOGS NOARCHIVELOG 
           MAXLOGFILES 32 
           MAXLOGMEMBERS 2 
           MAXDATAFILES 30 
           MAXINSTANCES 8 
           MAXLOGHISTORY 800 
       LOGFILE 
         GROUP 1 '/u01/oracle/7.1.6/dbs/log1p716.dbf'  SIZE 500K, 
         GROUP 2 '/u01/oracle/7.1.6/dbs/log2p716.dbf'  SIZE 500K, 
         GROUP 3 '/u01/oracle/7.1.6/dbs/log3p716.dbf'  SIZE 500K 
       DATAFILE 
         '/u01/oracle/7.1.6/dbs/systp716.dbf' SIZE 40M, 
         '/u01/oracle/7.1.6/dbs/tempp716.dbf' SIZE 550K, 
         '/u01/oracle/7.1.6/dbs/toolp716.dbf' SIZE 15M 
       # Recovery is required if any of the datafiles are restored backups, 
       # or if the last shutdown was not normal or immediate. 
       RECOVER DATABASE 
       # Database can now be opened normally. 
       ALTER DATABASE OPEN;  Shutdown you database :
    SVRMGR> shutdown immediate Rename your current ctlfile, don't forget init.ora (ctlfile string)
    Run the ctl.sql script
    SVRMGR> connect internal                    
    SVRMGR> @ctl.sqlAt the first opportunity, shutdown the database and take a full backup.
    Hope this help,
    Nicolas.

  • New database creation no longer generating OracleDBConsole SID service

    Environment:
    Windows 2K Server, Oracle 10.2.0
    I created two instances last week on the system, and the two DBConsole services got created fine. This week, when I create another instance, the DBConsole service never gets created.
    Running the DBCU, I get to 85% when the process just goes away. There's nothing in the emConfig.log indicating what the problem may be, it just stops.
    The instance itself was created fine, it's just the DBConsole service never gets created.
    I tried emca -deconfig dbcontrol db -repos drop suggested in another thread, but get an exception:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x7C3
    50513
    Function=wcsncpy+0x14
    Library=E:\oracle\product\10.2.0\db_2\bin\MSVCR71.dll

    Hi;
    Error: ORA 205
    Text: error in identifying control file <name>
    Cause: The system could not find a control file of the specified name and
    size.
    Action: Either
    Check that the proper control filename is referenced in the
    CONTROL_FILES initialization parameter in the initialization parameter
    file and try again.
    When using mirrored control files, that is, more than one control file
    is referenced in the initialization parameter file, remove the control
    filename listed in the message from the initialization parameter file
    and restart the instance.
    If the message does not recur, remove the problem control file from
    the initialization parameter file and create another copy of the
    control file with a new filename in the initialization parameter file.
    Regard
    Helios

  • Which rights are required for a user to create a new database instance

    Hi,
    Which user can create a database instance? Is it Admin or any user? or Is it must to have admin rights on the <oracle_home> folder in order to create a new database instance?
    Please let me know what rights the user should have for creating a new database instance.
    Regards,
    venkat

    If I login to machine as a Guest user or I am not a owner of Oracle software then in the both cases I couldn't able to create a new database instance. Am I right?
    Please suggest me.
    Regards,
    Venkat

  • Create a new database in foxpro , msaccess dynamically

    hello,
    i am writing an application in which depending on the users selection a database will be created dynamically .i.e if he selects oracle or foxpro or access it will create a new database using the dsn supplied by the user and then creates the tables in that particular database .
    i would like to know how to create a new database from within a class file for foxpro or msacces dynamically.
    thanks for the help

    hi,
    thanks for ur response.
    i have no problem in creating tables
    my application does that, but i wanna know how to create a new database so that the tables that are created for a particular clients data are stored in a database specific for that client only , i.e. when his work is over he can completely discard the database by dropping it and can create new database when he wants to start a new database related to different client.
    i would like to know how to create that database file, system or file dsn dynamically.

  • Problem in tabular form based on dynamic view and pagination

    Hi All,
    I have a manual tabular form based on a dynamic view. The view fetches the records based on search criteria given by the user in all cases. But this view fetches ALL records when user clicks on pagination, without considering the search criteria. This is the problem I am facing.
    I am doing the following:
    Since tabular form does not support pl/sql function returning query, I cannot use a table directly. I need my results based on search criteria selected by user. Hence I created a dynamic view and used a "INSTEAD OF UPDATE" trigger to update the table.
    I use a set bind variables procedure, on load before header for setting the variables.
    This view fetches the correct data based on user search always. It creates a problem only in one situation, when using pagination in the report.
    The example can be found at:
    http://apex.oracle.com/pls/otn/f?p=19399:1:
    username = [email protected]
    pwd = kishore
    Here if "manager name" is entered as test, we get 5 records in "Summary of requests" report and 5 records in "Inactive Requests" report. When user clicks on Pagination in any of the reports, ALL the 7 records get fetched in "Summary of Requests" and 6 records in "Inactive Requests". How can I overcome this problem?? The report must consider the search variables even when pagination occurs.
    Is this because, the inbuilt "html_PPR_Report_Page" executes the region query once again by considering all search variables as NULL?
    Backend Code is at:
    http://apex.oracle.com/pls/otn/
    workspace: sekhar.nooney
    Username :[email protected]
    pwd: kishore
    application id = 19399
    My region code is something like:
    select *
    from regadm_request_v
    where access_type = :F110_REGADM
    and status <> 'INACTIVE'
    order by request_id
    My view code is:
    CREATE OR REPLACE VIEW REGADM_REQUEST_V
    AS
    SELECT *
    FROM REGREGOWNER.REGADM_REQUEST
    WHERE upper(employee_name) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_EMPLOYEE_NAME),'%')||'%'
    AND upper(manager_name) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_MANAGER_NAME),'%')||'%'
    AND upper(employee_sunetid) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_EMPLOYEE_SUNET_ID),'%')||'%'
    AND upper(manager_sunetid) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_MANAGER_SUNET_ID),'%')||'%'
    AND upper(request_date) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_REQUEST_DATE),'%')||'%'
    AND upper(USAGE_AGREEMENT_RECVD) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_USAGE_AGREMNT_RECVD,'~!@',NULL,REGADM_REQUEST_PKG.GET_USAGE_AGREMNT_RECVD)),'%')||'%'
    AND upper(STATUS) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_STATUS,'~!@',NULL,REGADM_REQUEST_PKG.GET_STATUS)),'%')||'%'
    AND upper(REQUEST_APPROVED) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_REQUEST_APPROVED,'~!@',NULL,REGADM_REQUEST_PKG.GET_REQUEST_APPROVED)),'%')||'%'
    AND upper(nvl(APPROVAL_DATE,sysdate)) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_APPROVED_DATE),'%')||'%'
    AND upper(APRVL_REQUEST_SENT) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_EMAIL_APPROVERS,'~!@',NULL,REGADM_REQUEST_PKG.GET_EMAIL_APPROVERS)),'%')||'%'
    AND upper(NOTIFY_APPROVED) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_APPROVAL_NOTIFICATION,'~!@',NULL,REGADM_REQUEST_PKG.GET_APPROVAL_NOTIFICATION)),'%')||'%'
    I would be glad for any suggestions.
    Andy/Varad any ideas? You both helped me a lot on my problems for the same application that I had faced before in More Problems in Tabular form - Please give me suggestions.
    Thanks,
    Sumana

    Hi Andy,
    The view and the package for setting bind variables work properly in my entire application other than the pagination. A pity that I came across this only now :(
    I have used this same method for holding variables in another application before, where I needed to print to PDF. I used this approach in the other application because my queries were not within the APEX character limit specified for the "SQL Query of Report Query shared component".
    In this application, I initially had to fetch values from 2 tables and update the 2 tables. Updateable form works only with one table right? Hence I had created a view. Later the design got changed to include search and instead of changing the application design I just changed the view then. Still later, my clients merged the 2 tables. Once again I had just changed my view.
    Now, I wanted to know if any method was available for the pagination issue (using the view itself). Hence I posted this.
    But as you suggested, I think it is better to change the page design quickly (as it would be much easier).
    If I change the region query to use the table and the APEX bind parameters in the where clause as:
    SELECT *
    FROM REGADM_REQUEST
    WHERE upper(employee_name) LIKE '%'||nvl(upper(:P1_EMPLOYEE_NAME),'%')||'%' .....
    I also changed the ApplyMRU to refer to the table.
    Here the pagination issue is resolved. But here the "last Update By" and "Last Update Date" columns do not get updated with "SYSDATE" and "v(APP_USER)" values, when update takes place. Even if I make the columns as readonly text field, I am not sure how I can ensure that SYSDATE and v('APP_uSER') can be passed to the columns. Any way I can ensure this? Please have a look at the issue here: http://apex.oracle.com/pls/otn/f?p=19399:1:
    I have currently resolved the "last update" column issue by modifying my view as:
    CREATE OR REPLACE VIEW REGADM_REQUEST_V
    AS
    SELECT *
    FROM REGADM_REQUEST
    I modified my region query to use APEX bind parameters itself as:
    SELECT *
    FROM REGADM_REQUEST_V
    WHERE upper(employee_name) LIKE '%'||nvl(upper(:P1_EMPLOYEE_NAME),'%')||'%' .....
    And I use the "INSTEAD OF UPDATE" trigger that I had initially written for update. The code is:
    CREATE OR REPLACE TRIGGER REGADM_REQUEST_UPD_TRG
    INSTEAD OF UPDATE
    ON REGADM_REQUEST_V
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    UPDATE REGREGOWNER.REGADM_REQUEST
    SET MANAGER_EMAIL = :NEW.MANAGER_EMAIL
    , EMPLOYEE_EMAIL = :NEW.EMPLOYEE_EMAIL
    , STATUS_UPDATE_DATETIME = SYSDATE
    , USER_UPDATE_ID = (SELECT v('APP_USER') FROM DUAL)
    WHERE REQUEST_ID = :OLD.REQUEST_ID;
    END;
    Please let me know how I can resolve the "last update" column issue using the table itself. (Just for my learning)
    Thanks,
    Sumana

  • Execution order - group by and order by

    is there any execution order when we use group by and order by together in single query ?

    BOL: "Logical Processing Order of the SELECT statement
    The following steps show the logical processing order, or binding order, for a SELECT statement. This order determines when the objects defined in one step are made available to the clauses in subsequent steps. For example, if the query processor can bind to
    (access) the tables or views defined in the FROM clause, these objects and their columns are made available to all subsequent steps. Conversely, because the SELECT clause is step 8, any column aliases or derived columns defined in that clause cannot be referenced
    by preceding clauses. However, they can be referenced by subsequent clauses such as the ORDER BY clause. Note that the actual physical execution of the statement is determined by the query processor and the order may vary from this list.
    1. FROM
    2. ON
    3. JOIN
    4. WHERE
    5. GROUP BY
    6. WITH CUBE or WITH ROLLUP
    7. HAVING
    8. SELECT
    9. DISTINCT
    10. ORDER BY
    11. TOP"
    http://msdn.microsoft.com/en-us/library/ms189499.aspx
    Kalman Toth Database & OLAP Architect
    IPAD SELECT Query Video Tutorial 3.5 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Do we need run catbundle.sql file for new databases.

    dear all,
    i have doubt over execution of catbundle.sql or not?
    scenario:
    i have insatlled 10gr2 on rhel5 and applied patchset 4 (10.2.0.5) and applied Oracle® Database Patch 10248542 - 10.2.0.5.2 Patch Set Update
    after this i have create fresh database.
    now,
    in Oracle® Database Patch 10248542 - 10.2.0.5.2 Patch Set Update document it has specified in belwo section
    3.4 Post Installation Instructions for Databases Created or Upgraded after Installation of PSU 10.2.0.5.2 in the Oracle Home
    These instructions are for a database that is created or upgraded after the installation of PSU 10.2.0.5.2.
    You must execute the steps in Section 3.3.2, "Loading Modified SQL Files into the Database" for any new database only if it was created by any of the following methods:
    Using DBCA (Database Configuration Assistant) to select a sample database (General, Data Warehouse, Transaction Processing)
    Using a script that was created by DBCA that creates a database from a sample database
    Cloning a database that was created by either of the two preceding methods, and if the steps in Section 3.3.2, "Loading Modified SQL Files into the Database" were not executed after PSU 10.2.0.5.2 was applied
    Upgraded databases do not require any post-installation steps.
    so do we need to run catbundle here or not.
    since i have created fresh database after applying 10.2.0.5 PSU2 why does it required.
    opatch output:
    [oracle@RG615 ~]$ opatch lsinventory
    Invoking OPatch 10.2.0.5.1
    Oracle Interim Patch Installer version 10.2.0.5.1
    Copyright (c) 2010, Oracle Corporation. All rights reserved.
    Oracle Home : /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1
    Central Inventory : /prd/crm/swbcrmdb/usr/oracle/oraInventory
    from : /etc/oraInst.loc
    OPatch version : 10.2.0.5.1
    OUI version : 10.2.0.5.0
    OUI location : /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1/oui
    Log file location : /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2011-05-03_11-41-34AM.log
    Patch history file: /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
    Lsinventory Output file location : /prd/crm/swbcrmdb/usr/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-05-03_11-41-34AM.txt
    Installed Top-level Products (2):
    Oracle Database 10g 10.2.0.1.0
    Oracle Database 10g Release 2 Patch Set 4 10.2.0.5.0
    There are 2 products installed in this Oracle Home.
    Interim patches (1) :
    Patch 10248542 : applied on Tue May 03 07:32:29 BST 2011
    Unique Patch ID: 13292123
    Created on 25 Dec 2010, 23:11:24 hrs PST8PDT
    Bugs fixed:
    6402302, 9713537, 8350262, 9949948, 8394351, 10327179, 8546356, 9711859
    9714832, 9952230, 10248542, 8544696, 9963497, 9772888, 8664189, 10249537
    7519406, 9952270, 8277300, 9726739
    OPatch succeeded.

    Pl post the output of view DBA_REGISTRY_HISTORY - see MOS Doc 605795.1 (Introduction To Oracle Database catbundle.sql)
    Was the database created using DBCA or manually using scripts ?
    Srini

  • "Search_Condition" datacolumn of USER_CONTRAINTS dynamic view...

    Hi ,
    I need to compare the search_condition (LONG datatype) data column of the USER_CONTRAINTS dynamic view to another variable.
    The problem is that i cannot use the substr function and even the '=' does not work.(I have defined this variable to be of type LONG datatype too).
    Is there any way to convert this datatype (which datatype..????) in my PL/SQL block to another datatype so as to use '=' or substr function , in my comparison....?????
    Or , for example , in the 'Search_condition' of the User_constraints dynamic view there are records such as:
    "empno is not null"
    In order to make the above example equivalent to the contents of my variable , in my PL/SQL code, i have constructed the following:
    empno||' is not null'.
    But this type of comparison is not ever equal....!!!!
    How should i construct the contents of the above variable to be the same as the contents of the "search_condition" datacolumn...????
    NOTE: I have installed Oracle 10g v.2 database.
    Thanks , a lot
    Simon

    check http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:896796299899
    Gints Plivna
    http://www.gplivna.eu

Maybe you are looking for