Urgent ....Doubt on Views in ORACLE

hai,
i am learner...
can we pass parameters in Views just like Procedures and Functions.
regards
madhava

No, here you can read more:
http://www.oracle.com/pls/tahiti/tahiti.tabbed?section=73973

Similar Messages

  • Doubtful about security of oracle's Wrap code!

    Dears
    I am little bit doubtful about security of oracle's own Wrap code like package "sys.utl_smtp" .
    Someone can easily Unwrap it without source code?
    How it possible? whats your opinion about this? please can anybody clear me.
    Regards
    Abdul Halim
    Edited by: Abdul Halim on May 31, 2013 8:14 PM

    Halm, you are operating under the mistaken belief that your code deserves hiding from the customer and competitors to begin with. Why? All you are doing in the code is performing DML. It is not like your application is the only one in the world that performs its function.
    If someone really wanted to they could figure out what your code is basically doing just by looking at the table and file data before and after running the code. By careful manipulation of the data and studying the results they can figure out what is being done and then develop their own specific of the how it is done. One can also look at Oracle's internals as the code is being processed both using Oracle provided views and direct peaking at Oracle's shared memory. Then there are tools like sql trace which will captute the SQL, waits, and binds for the process.
    But all of this is kind of mute in that most shops do not have the talent to write their own unwrapper nor has the shop purchased an unwrapper so if you wrap the code it is going to be secured from most users and competitiors. I would just recommend that potential customers not purchase your product becuase the customer is going to need access to the code either for debugging (bugs will exist in the code) or tuning. Likely both.
    IMHO -- Mark D Powell --

  • How to wrap a view in oracle

    Does any one know how to wrap a view in Oracle, I know it is not possible, yet. Are there any third party software to wrap the logic in the view.
    Thanks,
    Sanjay

    Your best bet is to write a view that queries the source tables and contains any necessary business logic
    CREATE VIEW VBASE AS SELECT A.COLUMN_A FROM TABLE_1 A, TABLE_2 B, TABLE_3 C WHERE A.ID = B.ID AND B.ID = C.ID;
    create a view for exposure to the user that queries the base view.
    CREATE VIEW VSECURE AS SELECT COLUMN_B FROM VBASE;
    and grant privileges to VSECURE.
    GRANT SELECT ON VSECURE TO SECURE_USER;
    This will allow the user to see, query, and describe VSECURE without seeing the definition for VBASE.
    The advantage of the this approach is that the query engine can still push predicates down into the base view to optimize the performance or the query where as this is limited with the pipeline function and can become a tuning headache.
    eg.
    SQL> -----------------------------------------
    SQL> -- create some tables
    SQL> -----------------------------------------
    SQL> CREATE TABLE table_1(ID NUMBER, MESSAGE VARCHAR2(100))
    Table created.
    SQL> CREATE TABLE table_2(ID NUMBER, message2 VARCHAR2(100))
    Table created.
    SQL> CREATE TABLE table_3(ID NUMBER, message3 VARCHAR2(100))
    Table created.
    SQL> -----------------------------------------
    SQL> -- populate tables with some data
    SQL> -----------------------------------------
    SQL> INSERT INTO table_1
    SELECT ROWNUM,
    CASE
    WHEN MOD ( ROWNUM, 50 ) = 0 THEN 'HELLO there joe'
    ELSE 'goodbye joe'
    END
    FROM DUAL
    CONNECT BY LEVEL < 1000000
    999999 rows created.
    SQL> INSERT INTO table_2
    SELECT ROWNUM,
    CASE
    WHEN MOD ( ROWNUM, 50 ) = 0 THEN 'how are you joe'
    ELSE 'good to see you joe'
    END
    FROM DUAL
    CONNECT BY LEVEL < 1000000
    999999 rows created.
    SQL> INSERT INTO table_3
    SELECT ROWNUM,
    CASE
    WHEN MOD ( ROWNUM, 50 ) = 0 THEN 'just some data'
    ELSE 'other stuff'
    END
    FROM DUAL
    CONNECT BY LEVEL < 1000000
    999999 rows created.
    SQL> -----------------------------------------
    SQL> --create base view
    SQL> -----------------------------------------
    SQL> CREATE OR REPLACE VIEW vbase AS
    SELECT a.MESSAGE,
    c.message3
    FROM table_1 a,
    table_2 b,
    table_3 c
    WHERE a.ID = b.ID
    AND b.ID = c.ID
    View created.
    SQL> -----------------------------------------
    SQL> --create secure view using base view
    SQL> -----------------------------------------
    SQL> CREATE OR REPLACE VIEW vsecure AS
    SELECT MESSAGE,
    message3
    FROM vbase
    View created.
    SQL> -----------------------------------------
    SQL> -- create row type for pipeline function
    SQL> -----------------------------------------
    SQL> CREATE OR REPLACE TYPE vbase_row
    AS OBJECT
    message varchar2(100),
    message3 varchar2(100)
    Type created.
    SQL> -----------------------------------------
    SQL> -- create table type for pipeline function
    SQL> -----------------------------------------
    SQL> CREATE OR REPLACE TYPE vbase_table
    AS TABLE OF vbase_row;
    Type created.
    SQL> -----------------------------------------
    SQL> -- create package
    SQL> -----------------------------------------
    SQL> CREATE OR REPLACE PACKAGE pkg_getdata AS
    FUNCTION f_get_vbase
    RETURN vbase_table PIPELINED;
    END;
    Package created.
    SQL> -----------------------------------------
    SQL> -- create package body with pipeline function using same query as vbase
    SQL> -----------------------------------------
    SQL> CREATE OR REPLACE PACKAGE BODY pkg_getdata AS
    FUNCTION f_get_vbase
    RETURN vbase_table PIPELINED IS
    CURSOR cur IS
    SELECT a.MESSAGE,
    c.message3
    FROM table_1 a,
    table_2 b,
    table_3 c
    WHERE a.ID = b.ID
    AND b.ID = c.ID;
    BEGIN
    FOR rec IN cur
    LOOP
    PIPE ROW ( vbase_row ( rec.MESSAGE, rec.message3 ) );
    END LOOP;
    END;
    END pkg_getdata;
    Package body created.
    SQL> -----------------------------------------
    SQL> -- create secure view using pipeline function
    SQL> -----------------------------------------
    SQL> CREATE or replace VIEW vsecure_with_pipe AS
    SELECT *
    FROM TABLE ( pkg_getdata.f_get_vbase ( ) )
    View created.
    SQL> -----------------------------------------
    SQL> -- this would grant select on the 2 views, one with nested view, one with nested pipeline function
    SQL> -----------------------------------------
    SQL> GRANT SELECT ON vsecure TO test_user
    Grant complete.
    SQL> GRANT SELECT ON vsecure_with_pipe TO test_user
    Grant complete.
    SQL> explain plan for
    SELECT *
    FROM vsecure
    WHERE MESSAGE LIKE 'HELLO%'
    Explain complete.
    SQL> SELECT *
    FROM TABLE ( DBMS_XPLAN.display ( ) )
    PLAN_TABLE_OUTPUT
    Plan hash value: 3905984671
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 16939 | 2365K| | 3098 (3)| 00:00:54 |
    |* 1 | HASH JOIN | | 16939 | 2365K| 2120K| 3098 (3)| 00:00:54 |
    |* 2 | HASH JOIN | | 24103 | 1835K| | 993 (5)| 00:00:18 |
    |* 3 | TABLE ACCESS FULL| TABLE_1 | 24102 | 1529K| | 426 (5)| 00:00:08 |
    | 4 | TABLE ACCESS FULL| TABLE_2 | 1175K| 14M| | 559 (3)| 00:00:10 |
    | 5 | TABLE ACCESS FULL | TABLE_3 | 826K| 51M| | 415 (3)| 00:00:08 |
    Predicate Information (identified by operation id):
    1 - access("B"."ID"="C"."ID")
    2 - access("A"."ID"="B"."ID")
    3 - filter("A"."MESSAGE" LIKE 'HELLO%')
    Note
    PLAN_TABLE_OUTPUT
    - dynamic sampling used for this statement
    23 rows selected.
    SQL> -----------------------------------------
    SQL> -- note that the explain plan shows the predicate pushed down into the base view.
    SQL> -----------------------------------------
    SQL> explain plan for
    SELECT count(*)
    FROM vsecure_with_pipe
    WHERE MESSAGE LIKE 'HELLO%'
    Explain complete.
    SQL> SELECT *
    FROM TABLE ( DBMS_XPLAN.display ( ) )
    PLAN_TABLE_OUTPUT
    Plan hash value: 19045890
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 2 | 15 (0)| 00:00:01 |
    | 1 | SORT AGGREGATE | | 1 | 2 | | |
    |* 2 | COLLECTION ITERATOR PICKLER FETCH| F_GET_VBASE | | | | |
    Predicate Information (identified by operation id):
    2 - filter(VALUE(KOKBF$) LIKE 'HELLO%')
    14 rows selected.
    SQL> -----------------------------------------
    SQL> -- note that the filter is applied on the results of the pipeline function
    SQL> -----------------------------------------
    SQL> set timing on
    SQL> SELECT count(*)
    FROM vsecure
    WHERE MESSAGE LIKE 'HELLO%'
    COUNT(*)
    19999
    1 row selected.
    Elapsed: 00:00:01.42
    SQL> SELECT count(*)
    FROM vsecure_with_pipe
    WHERE MESSAGE LIKE 'HELLO%'
    COUNT(*)
    19999
    1 row selected.
    Elapsed: 00:00:04.11
    SQL> -----------------------------------------
    SQL> -- note the difference in the execution times.
    SQL> -----------------------------------------

  • How to Register a View in Oracle Applications

    Hi,
    I have created a Custom View and want it to see it in one of the BPA Pages. For this purpose I shall need to register the view in Oracle Applications.
    Can you please provide me clues to do so. I tried the Application Developer responsibility, there I can only query the view and not register them.
    Also if I try using backend I could get hold of Package AD_DD which registers a table. Any clues for registering the View would be welcome.
    Thanks

    Thanks for your response.
    Actually I need to show Sales Order Line No, Federal Id and a few other Fields on our Invoice. Now these are not available in Oracle Recievables view. So I was trying to create my own View.
    I created a View in database. Now I am trying to create a Data source and associate this (custom created) View to it. However my View is not showing in the Views List of Values.
    I am not sure whether I am doing it right. Can you please help me with this. Any pointers to a document which explains my requirement would be great.
    Thanks
    Sumit

  • Creating a Materialized View in Oracle 8i

    Hello -
    What are the steps and privileges required to create a materialized view in Oracle 8i?
    Thanks

    To create a materialized view in your own schema:
    You must have been granted the CREATE MATERIALIZED VIEW system privilege and either the CREATE TABLE or CREATE ANY TABLE system privilege.
    You must also have access to any master tables of the materialized view that you do not own, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.
    To create a materialized view in another user's schema:
    You must have the CREATE ANY MATERIALIZED VIEW system privilege.
    The owner of the materialized view must have the CREATE TABLE system privilege. The owner must also have access to any master tables of the materialized view that the schema owner does not own (for example, if the master tables are on a remote database), and to any materialized view logs defined on those master tables, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.
    Thanks
    Manish

  • Permissions required for an user to create a View in Oracle 10.2.0.1.0

    Hi,
    I am facing one serious issue with Oacle 10.2.0.1.0.
    I have an user (Atlas) created with below permissions.
    grant connect to atlas;
    grant resource to atlas;
    grant create public synonym to atlas;
    grant select any dictionary to atlas;
    grant query rewrite to atlas;
    I will create my database schema on this user Atlas. All my scripts are executing properly with Oracle 9i and 10g version 10.1.0.2.0. But when it comes to Oracle 10g version 10.2.0.1.0 the views creation is throwing an error saying that Insufficient Priviliges.
    I didn't get why this error is coming.
    What previliges does an user should require for creating a view in Oracle 10.2.0.1.0 version?
    I have installed Enterprise version of Oracle 10.2.0.1.0. Please suggest me with this.
    Thanks
    Rao

    CREATE VIEW was taken away from connect or resouce in 10.2.x. It has to be explicity granted... Not sure what this has to do with XML per-se :)

  • How to maintain Entries for VIEWS in ORacle Sql developer

    hi gurus,
    Could you please help in maintaining an entries for VIEW is Oracle SQL develope...I have created a VIEW by name SD_WH08....now i need to maintain some entries in this for my testing purpose...how do i do this?
    Your help is very much appreciated.
    Regards

    What do you mean by "maintaining an entries for VIEW" ?
    K.

  • How to Export Snapshots and Materlized View in Oracle 9i

    Hi,
    How to Export Snapshots and Materlized View in Oracle 9i .
    I require to Migrate from 9i to 10g with either Export or Script.
    Please help

    Using exp-imp for snapshots generally causes problems, at least for me. I would prefer taking their creation scripts and running them on the new database.
    By the way, what do you mean by "migrate from 9i to 10g"? Are you trying to create the same snapshots in another (10g) database or are you trying to upgrade your 9i database to 10g? If it is the latter then you can just upgrade the database automatically with the upgrade assistant or manually using upgrade scripts.

  • Oracle forms and reports with object views in oracle 9i

    Can We use oracle 9i Object Views in oracle forms and reports. If yes, then which version?

    MichaelFerrante,Thank you for your help.
    I have already used the HS services to connecto to external databases from our main Oracle database, and the solution works fine.
    But unfortunally for this particular client he cannont have installed a Oracle database due to internal policies restrictions.
    I can not migrate the full application to another technology like ADF in less than 6 or 8 months.
    Do you thifnk that there is any other solution?
    Mensagem editada por: user10660669

  • Discover Report  in Viewer through Oracle Apps

    hi,
    I want to launch the Discoverer Report in Viewer through Oracle Apps.
    Through Concurrent Program, by passing some parameters...?
    Do any one havei idea how to do it?
    Thanks in Advance
    regards
    -Seetha

    Hi,
    You can launch Disco Viewer or Plus from the Apps menu by creating an OracleOASIS Application Function.
    If you want to run Discoverer from a Concurrent Program then I assume you want the output of the Discoverer report as an HTML ( or some other format) available as output from the concurrent job. If that is the case then Discoverer Desktop Edition must be used to export the workbook into a file and this can be done from the current manager with a bit of development.
    On our system we have developed a concurrent request to schedule Discoverer workbooks. The main parameters for the concurrent request are the workbook you want to run, the parameters for the workbook, the responsibility you want to use to run the workbook in Discoverer and the type of export you want (ie. HTML, PDF, Excel etc). The concurrent request then sends the request to a Discoverer workstation. A simple VBSript on the workstation runs Discoverer from the command line and exports the workbook to a file to the request output directory back on the database server (using a SAMBA drive). The Discoverer report then can then viewed as output from the concurrent request. However, we mainly use a web page integrated to Apps to view and download output from our concurrent requests. This all works smoothly and provides a better alternative for Applications than using Discoverer scheduling.
    Hope that helps,
    Rod West

  • What is the use of materialised view in ORACLE

    Hi All,
    What is the use of Materialised view in ORACLE.Can anyone please help me out by giving a real time example in banking application (How MV is used in banking applications).
    Thanks & Regards,
    SB2013

    SB2013 wrote:
    What is the use of Materialised view in ORACLE.Can anyone please help me out by giving a real time example in banking application (How MV is used in banking applications).http://docs.oracle.com/cd/E11882_01/server.112/e25789/schemaob.htm#CNCPT411
    Just add for example in a banking application at the end of each paragraph
    E.g.
    >
    In data warehouses, you can use materialized views to compute and store data generated from aggregate functions such as sums and averages, for example in a banking application

  • New views in oracle 11.2

    Hello,
    I came across this link that lists all the new views that oracle introduced in 11.2 and indeed appear to be available, but many of the views doesn't contain/register any value. Does any one have any info on these views or how can one configure metric collection on these views?
    http://www.dba-oracle.com/t_11_2_new_v_dollar_views.htm
    v$goldengate_capture
    v$goldengate_message_tracking
    v$goldengate_transaction
    I am most interested in the v$goldengate_* views.
    Thanks,
    Arindam
    Edited by: AB007 on Feb 22, 2012 12:26 PM

    You might want to check the docs, perhaps ask Ben Prusinski directly, or check in the GG forum at GoldenGate
    The docs are at http://www.oracle.com/technetwork/middleware/goldengate/documentation/index.html
    The views are not documented in MOS either, so possibly not designated for public consumption yet, no matter what various authors have posted.

  • Developing database views between Oracle and SQL Server tables

    I am on Oracle 10.2, my organization has many SQL Server databases as well and has now made
    SQL server as company standard so many new databases will be developed in SQL Server. It is of course
    not possible to convert all Oracle databases to SQL Server, so a mix environment will exist. Two questions:
    1.     Is it possible to develop database views in Oracle (10g in my case) which join Oracle tables with tables in SQL Server 2008? If yes, how. I have seen some heterogeneous connectivity setup to connect SQL Server to Oracle, but not sure whether it is possible to develop a database view across two databases.
    2.     I know it is not a SQL Server forum, but many DBA’s know both Oracle and SQL Server. Is it possible to develop views in SQL Server (SQL Server 2008 R2 in my case) which join Oracle 10g and SQL Server 2008 tables? I know in SQL Server, there is way to set up linked servers, but do not know whether it is possible to develop views.
    Thanks a lot for your insight.

    You can create views that join local Oracle tables and remote SQL Server tables. I'm pretty sure you can do the reverse as well but I haven't personally done it.
    However, I would be very concerned about the performance you'd get if you created that sort of view. You'd very frequently end up in a situation where Oracle has to pull all the data in the remote table across the database link in order to apply predicates and join the data locally. That could be disastrous from a performance standpoint.
    Justin

  • Views in oracle

    what is composite view in oracle ?
    what is the difference between composite & materialized view ?

    Hi
    There is no composite view in the Oracle. This is 100% correct. We have composite primary key, composite index are there. Means more than one column of primary key called composite PK, same more than one column index called composite index.
    complex view
    Complex view is a database object which is created by more than one table and with group by functions.(max, min, count,avg,sum). So, we can't perform DML operations on this view. Only Instead of trigger can help you.
    Ganesh has given the Example of complex view. That is more than enough. Regarding Materialized view, given the URL is enough.Still you have any queries...!!! shoot them.
    Regards
    KPR.
    *If this response correct then mark it as correct answer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Replacement of XLA_AP_PAY_AEL_GL_V view in Oracle R12

    Dear All,
    Can anyone let me know the replacement of XLA_AP_PAY_AEL_GL_V view in Oracle R12?
    This is view is there in Oracle 11i but not in R12.
    Thanks in Advance.

    Dear all,
    We also have the same question. Could anyone pls help? When we drill down from the GL Encumbrance form, error is returned. And when we trace the sql, this view is used in the select statement.
    Please kindly advise.
    HY

Maybe you are looking for

  • How do I remove ken burns effect?!?!

    Hi, I have iLife 6.0.3 and I'm experiencing 2 problems. 1. iMove keeps on crashing on me, it seems like I have to close my eyes and pray that it doesn't crash before I get to save my project, which is most often than not. 2. Probably the most frustra

  • Shared services not responding...

    Previous shared services used to work fine.. today all of a sudden it stoped showing login page....after 30 minutes.. internet explorer cannot display this page..... tried to restart the services for ldap and shared services....its showing that the s

  • Tables and layer

    I am having an issue when I insert tables. I have a background image that is centered in the middle of the page. I want the buttons to be above the image. In the dreamweaver window it looks like that buttons are in the right stop but then when I prev

  • Messy contacts

    I'm using a Nokia N95 V21.0.016 (RM-159). When I view my contacts this is what I see: Screenshot 1. When I'm sending a sms and want to select a contact, some of my contacts show a lastname from another contact: Screenshot 2. The name after "Moeder" c

  • Photoshop Elements Organizer request for enhancements

    I have two enhancements that would really make my day in Photoshop Elements Organizer: The first would be the ability to move and copy items from one catalog to another.  This might entail being able to have more than one catalog open at a time.  I c