Two objects with the same name

Hi all

In my production database, there is a materialized view and a table with the same name. The two objects have the same number and type of columns.

Record from user_object table

OBJECT_NAMESUBOBJECT_NAMEOBJECT_IDDATA_OBJECT_IDOBJECT_TYPECREATEDLAST_DDL_TIMETIMESTAMPSTATUSTEMPORARYGENERATEDSECONDARYNAMESPACEEDITION_NAME
TEST_OBJ151373151373TABLE22/06/201222/06/20122012-06 - 22:15:39:30VALIDNNN1
TEST_OBJ152287MATERIALIZED VIEW22/06/201208/03/20122012-06 - 22:16:08:46VALIDNNN19

I have another mode to normal display, TEST_NORMAL_VIEW, which selects the data of TEST_OBJ.

Then, on which table data select. Please give some input on this subject.

Kind regards

Matondo

A materialized view has 2 objects internally for her

1. the materialized view (it is more of a model)

2. the table that stores the actual data.

So when you create a materialized view, you can see 2 objects created by querying the USER_OBJECTS.

See this

SQL> create materialized view my_test_mv as select * from emp;

Materialized view created.

SQL> select object_type, object_name, data_object_id from user_objects where object_name = 'MY_TEST_MV';

OBJECT_TYPE        OBJECT_NAME          DATA_OBJECT_ID
------------------- -------------------- --------------
TABLE              MY_TEST_MV                  1638964
MATERIALIZED VIEW  MY_TEST_MV

Now, you may notice that DATA_OBJECT_ID has null for the MV. DATA_OBJECT_ID is the Segment where the data is stored. As MV object is just a model and does not have data to null.

The user has no direct access to the MY_TEST_MV table. See this

SQL> drop table my_test_mv;
drop table my_test_mv
           *
ERROR at line 1:
ORA-12083: must use DROP MATERIALIZED VIEW to drop "KARTHICK"."MY_TEST_MV"

Also, you can associate an existing table to a materialized using the clause ON TABLE PREDEFINED view.

Here is an example

SQL> drop materialized view my_test_mv;

Materialized view dropped.

SQL> create table my_test_mv_new as select * from emp;

Table created.

SQL> select object_type, object_name, data_object_id from user_objects where object_name = 'MY_TEST_MV_NEW';

OBJECT_TYPE         OBJECT_NAME          DATA_OBJECT_ID
------------------- -------------------- --------------
TABLE               MY_TEST_MV_NEW              1638967

SQL> create materialized view my_test_mv_new on prebuilt table as select * from emp;

Materialized view created.

SQL> select object_type, object_name, data_object_id from user_objects where object_name = 'MY_TEST_MV_NEW';

OBJECT_TYPE         OBJECT_NAME          DATA_OBJECT_ID
------------------- -------------------- --------------
TABLE               MY_TEST_MV_NEW              1638967
MATERIALIZED VIEW   MY_TEST_MV_NEW

SQL>

Once you associate a Table with a MV direct Table access is limited. You can directly access only the MV.

Tags: Database

Similar Questions

  • It is possible to have two tables with the same name in Oracle!

    Oracle Version: 10 gr 2

    MS Access 2007, I had to use the 'Export' by which I copy a table (and its data) to an Oracle schema via an ODBC connection. Later, I realized that, during the copy of tables with a mix of lower and upper case names, the table does not copied (exported). But MS Access will give you the message that table obtained export successfully.

    MS-Access mess around Oracle data dictionary.

    When you issue
    SQL>select * from tab;
    
    TNAME                          TABTYPE  CLUSTERID
    ------------------------------ ------- ----------
    AMStates                       TABLE
    Version                        TABLE
    You will see the names of the tables. But when you try to DESCRIBE or SELECT this table, you will
    SQL>desc Version
    ERROR:
    ORA-04043: object Version does not exist
    You can even create another table with the same name in the schema
    SQL>create table VERSION (X NUMBER);
    
    Table created.
    Why this is happening and how can I bring these items 'non-existent '?

    Hello

    Use

    SQL > desc 'Version '.

    Or

    SQL > select * from 'Version '.

    Or

    SQL > drop table 'Version '.

    To overcome the problems of mixed-case.

  • Recommendation req - how two database with the same name can exist on a single server

    Description of the problem: I have a database named 'aaa' (9i db) in production and we need a copy of it to create 'aaa' in the same server with the same name, but an 11g database.

    9i 'aaa' is an exixting database in an AIX 5.3 Server.
    You will need to create a copy of this database 11 g named 'aaa' on the same server. I use the utility exp and imp db, but not sure how far it is recommended to have the same db names in a single server. Not sure about listener etc. problems.

    Any suggestions on this would be appreciated!

    Create this database for a specific application, test and cut classes to prod.

    The goal is admirable.
    The proposed plan makes me shudder.
    V11.2 must be installed on system new/other, IMO; to reduce the risk of wrong operation on the basis of incorrect data.

  • How to create two employees with the same name as the vendor record?

    Hi all

    We must create a vendor for the employee record, so that we can issue pretty invoice for cash payment. If there are 2 employees with the same name, how can we create records of supplier for these 2 employees? The system does not have the name of the provider in duplicate.

    Please notify.

    Kind regards
    HY

    Hello

    In R12, it is possible to create 2 employee with the same name but with a different number.
    And it is also possible to create these 2 employees as suppliers in Payables.

    HTH,
    Vik

  • Faces of Lightroom: Two people with the same name

    I downloaded Lightroom CC last night and came up with the following question:

    I have an uncle and a cousin of the same name... can Lightroom create two different 'people' or do I have to call each one differently? I guess this is the last but thought I'd ask in case there is an alternative solution.

    johnrellis body:

    You might have a keyword for each family group, for example, "John Ellis Family" and "Steve Ellis Family" and then place the keywords for each under these parents.  For example, under 'John Ellis family' you should 'John Ellis","Mary Ellis', 'Jane Ellis', etc.   And under "Steve Ellis Family", you might have "Steve Ellis", 'Kathryn Ellis' and 'John Ellis' (a different John Ellis).

    It's a good idea to work with hierarchies. But for the option to work, you will have two unique names.

    I just did a quick test.

    I have a few images of twins in my catalog, Tom and Boris.

    Under them, I created a 'name' Twin. Because of the hierarchy, I can apply Boris > Twin for a single image, Tom > twin to the other and both of them to a third photo.

    Drag a box around them name and I type "twin". The drop (AutoComplete) allows me to choose between two entries of identical research called "twin". No way of knowing that you choose. And you may have noticed that auto fill drop-down list starts with the entries that you have used recently. So not good to remember that the 'Twin' Summit will always be "Boris" for example.

    The number of keywords used is only up for one of them if I happen to use the same input twice.

    To do this (that I can tell right now), the only way is to drag the appropriate 'Twin' of the keywordlist on the right side of the opinion of people (O).

    I work with hierarchies, but make sure that I have unique names.

    In addition, I use spaces in the names, but rather JohnEllis, SteveEllis, etc.. In this way, if I have a very long list with members of Ellis and also a large number of people called John or Steve, it is easier refine the search to a particular person (as in smart collections).

    Open the properties for the key word, make sure that "include export" is NOT on, so you will not see this strange name to Number123JohnEllis research in your exported image.

    I have 'export containing keywords' and 'export synonyms' (and now with LR CC course "Person") checked. As a synonym, you can put 'John Ellis, John Ellis, Steve Ellis family' and all these will export.

    Hope it makes sense.

    As John suggests, if you already create the Ellis Family > Steve Ellis Family > John Ellis > John > Numer123JohnEllis then you must enter synonyms, as long as you have 'export containing keywords' on all of them checked, and 'include export' (with the exception of the Number123JohnEllis Word key which should not have 'include export' checked).

    Using hierarchies can really help you in your Keywords. But it will take time to implement.

  • Renaming of files exe with the same name

    I have

    just installed a game on steam.  The package ended up being buggy, so it did not work.  But I found a solution on the Forum and he told me to rename these two files exe under the same name.  Its the only way to fix the game.  Others did and cela worked.  When I try to rename the file an error pops up telling me that I can't have two files with the same name.  In summary, this is what is happening.

    two files are: prince of persia.exe and princeofpersia_launcher.exe .

    Need to rename it to princeofpersia_launcher.exe to the prince of persia.exe

    An error pops up saying ERROR RENAME FILE or FOLDER: cannot rename princeofpersia_launcher: a file with the specified name already exists.  Specify a different file name.

    The problem is that these two exe files MUST have the name of prince of Persia: work.  Is it possible that I could do?

    It is not possible to have two files with the same name in the same folder.  Something is wrong with the instructions that you try to follow.  What do say exactly?  Can you give us a link for them?
    Boulder computer Maven
    Most Microsoft Valuable Professional

  • Files and folders with the same name

    I am trying to unzip some files and folders and it works fine on my computer with Windows XP. However, when you use Windows Vista I can't because there are folders and files with the same name. After an internet search, it seems that the only suggestion is to extract the files in separate folders which then would allow them to keep the same name. The problem is I want what they in the same folder and they need to have the names they have.

    NOTE: I do have two files with the same name in the same folder, I have a folder and a file with the same name. I would have thought that this would be acceptable because they are two things separate, and given that it's great under XP.

    All solutions?

    You are right, if I make a file and a text file with the same name, it works fine. However, when I try to extract the files I need it tells me that there is already a file with the same name as the folder. He goes to tell me to choose a new name but my only options are 'try again', 'jump' or 'Cancel '.

    I think I can understand what the problem is. For some reason when you download the zip file, the computer seems to have added a few files side with any format other than "file." It is those who have the same name as the folders as if they were, and they could not be uncompressed because of this. I have no idea whence they came as they appear from nowhere (compared to my XP). I'm trying now unzip the files separately and exclude the strange s 'file '.

    Thanks for your help though!

  • Ran Malwarebytes & two threats were each one with the same name: PUM. Disabled.SecurityCenter. fact that associated with MSSE PUM & the boxes unchecked in MS security Center.

    Original title: PUM. Disabled.SecurityCenter

    I recently removed "patch system" of my Dell computer XP. Malwarebyte s was the only software to do. MSSE caught, but couldn't fix it. I then updated & ran MSSE on my Toshiba - no threats not found. I then ran Malwarebytes & two threats were each one with the same name: PUM. Disabled.SecurityCenter both at the Date of the registry in HKLM\SOFTE\Microsfot\SecurityCenter\AntiVirusDisableNotify & HKLM\SOFTWARE\Microsfot\securityCenterFirewallDisableNotify.  These two have been listed bad: Good (0) (1).  In the Malwarebytes wesite, I read that this has something to do with MSSE. In a commentary, he says it occurs if, in the MS Security Center, the notification "Notify me if my computer might be at risk because of my virus protection software settings" is unchecked.  I then went ahead & check all 3, firewalls, viruses & automatic updates. My computer seems to work well, except that the fan runs all the time (there are a lot of processes running & the CPU usage is very--often 100%, but the computer works fast).

    My questions are: 1) the PUM associated MSSE & the boxes unchecked in MS security Center; (2) should I click on "ignore" in the Malwarebytes scan? 3) was right to check all the boxes in the center of security - "altert me if my computer may be at rist b/c of my xxx software settings?  Thanks in advance for your help.

    PC fan2

    Hello

    (1) is associated with MSSE PUM & the boxes unchecked in MS security Center;

    The following thread might answer this question: http://forums.malwarebytes.org/index.php?showtopic=69859

    (2) should I click on "ignore" in the Malwarebytes scan?

    Yes

    3) was right to check all the boxes in the center of security - "altert me if my computer may be at rist b/c of my xxx software settings?

    Only, run antivirus software at the same time. Firewall must be performed, evil-ware bytes can be run at your pleasure.

  • You can have two stored functions with the same name?

    Hi all

    You can have two stored functions with the same name?

    My version of DB - connected to Oracle Database 11g Enterprise Edition Release 11.2.0.1.0

    Thank you.

    You can have the same name as long as they are within a package and with different parameters

    create or replace package test_pkg

    as

    function my_func (p1 in number)

    return number;

    function my_func (at number p1, p2)

    return number;

    end test_pkg;

    /

    create or replace package body test_pkg

    as

    function my_func (p1 in number)

    Return number

    as

    Start

    return 0;

    end;

    function my_func (at number p1, p2)

    Return number

    as

    Start

    return 0;

    end;

    end test_pkg;

    /

  • CF8 cfquery multiple table join with the same names of columns - default

    This seems to be a defect in the CF8 cfquery object. I'm at a loss as to a solution or a good work around. With regard to the substance, this query is generated dynamically on the fly based on what is happening in it a user. This isn't the most elegent SQL but work and return all columns. The app itself is a data viewer to look at the logs. Here is an example of a query being generated.

    Select *.

    of web_trans, web_info_trans, web_res_trans

    where (web_info_trans.trans_dte > = '' 2008-12-1)

    and web_info_trans.trans_dte < '' 2008-12-2)

    and (web_info_trans.trans_dte = web_trans.trans_dte)

    and (web_info_trans.trans_num = 5060345)

    and (web_info_trans.trans_num = web_trans.trans_num)

    and (web_res_trans.trans_num = 5060345)

    and (web_res_trans.trans_num = web_trans.trans_num)

    and (web_trans.web_trans_cde = "NTUI")

    and (web_trans.web_status_cde = 'P')

    and (web_trans. TRANS_NUM < 5060347)

    order of web_trans. TRANS_NUM / / desc

    These three tables contain a similar column called ZIP_CDE. They contain different values, and when this query is executed in Microsoft Query Analyzer results are displayed correctly. Run this same query SQL with CFQUERY and the value of one of the other tables (web_trans) will eventually replace the value for the other columns called ZIP_CDE. The exact amount columns are retruned only values some how get corrupted.

    This is a defect of cf8 is a book autour or an update that resolves this problem that I may have missed?

    Thank you for the ideas.

    Thus it seems still as a default since CF is essentially where, except for the return value play. Other query tools return results correctly so for me, it turns out be CF bug at a certain level.

    Actually I'm swinging to agree with you here, but not for the same reason.  CF actually * is * get all the columns back (as you say), it just doesn't expose a way to tell the difference between a column called 'x' and an another column called 'x', because the way to access the data in columns is simple queryname [columnName] [rowNumber] (or a Variant fo this, but all the amount of variations to that or abbrev. it).  This code shows how he has all four columns of the original two queries (being a stand-in for tables, in this case):


    Q1 = queryNew("");
    Q2 = queryNew("");
       
    queryAddColumn (q1, 'id', [1,2,3,4]);
    queryAddColumn (q1, "data", ["one", "two", "three", "four"]);
    queryAddColumn (q2, 'id', [1,2,3,4]);
    queryAddColumn (q2, "data", ["tahi", "rua", "toru", "wha"]); It's Maori, in case you are interested


    SELECT *.
    Q1, q2
    WHERE q1.id = q2.id

    So CF knows there are four columns (a call getMetadata (q3) get also demonstrates this), but it does not expose a way to approach the second (or even greater) column of the same name.  This is the bug/shortfall.

    However, relying on an underlying coldfusion.sql.QueryTable method, you can rename the columns, so:

    Then you're OK.

    I would be normally reluctant to recommend doing this, because these methods change from version to version of CF, but it's your call whether this approach will help you.

    To be honest, I'm with Owain who, even in SQL one generally doesn't work with columns with the same name, an alias them qualified with a table name/alias. As the table columns from of is not returned by SQL with the result set, it must be evidence against this by folding the columns in the first place.

    Also, I wonder at the bottom of the extraction of data, you don't really know the structure, that is to say, do SELECT *.  How can you know not even that is ours as the first column, second column, etc.?  I don't think that SQL applies in fact a contract that, t - it?  (I don't know).

    What are you actually do here?

    --

    Adam

  • Attributes with the same name - ADF BC Validation Messages

    Hi all

    I have two entities and associated views. Each of them have attributes with the same name. In my particular case, they are two dates - StartDate and EndDate. EndDate on both entities have validations (Expression of Script). The validations to check that the end Date is later than the Date of departure - "return newValue > StartDate. Is this a valid validation groovy script for dates?

    I have a unique creation page that contains these two entities. What is happening now, is that if the validation fails even one of the entities, fields of both entities are reported. In some cases, I can even see two validation error messages is displayed.

    Needless to say, rename the attribute on one of the entity (and the corresponding view object) seems to work.

    I have a simple repro case (contains Jdev project and SQL script) here - http://dox.bijesh.info/reproValidationMsg.zip and a screenshot here - http://dox.bijesh.info/ReproADFBCValidation.jpg

    Would be very happy if someone could either point out what I'm doing wrong or confirm that it is a bug.

    About:

    JDeveloper 11.1.1.3.0 JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660
    11.1.1.56.60 ADF business components
    Oracle IDE 11.1.1.3.37.56.60

    Edited by: Bijesh Krishnadas November 25, 2010 04:21 - corrected the groovy expression

    Bijesh Krishnadas wrote:
    FWIW, I've changed the validation script for "return false" on an entity and "return true" on the other. This leads to the same question as well.

    This seems to be a bug.

    However, using a validator compares as stated earlier is the right way to accomplish what you're trying to do.

  • Return of the mistake of MUSE: why do we not have several files with the same name?

    Well - I thought I had all this worked and fixed, but I met the download error 'Why do we have several files with the same name' once again.  (I downloaded all the files several times today in order to 1) works the way it worked the last time and 2) get an OAM file that is not loading for some reason any load again and the download takes about an hour to transfer all the files manually.

    To recap:

    (1) an option "Upload only modified files" returns the 'Muse has encountered an error and closes.  Why do we have several files with the same name? "error just as before.

    (2) a full download will work but takes forever and is NOT a substitution for work changed files option.

    Please advise with possible solutions!

    -Dave

    Is it possible to have two .oam different files in different folders on your computer where the .oam files have the same name? I'm theorizing that there may be a bug in the treatment to ensure the folder created for a .oam placed on the server receives a unique name, particularly in the case of a partial update of the site on the server.

    Please send us the .muse file and all the files in .oam related to [email protected] along with a link to this topic for the context so we can attempt to reproduce this error and isolate the root cause. If files are larger than 20 MB, you'll need to use a service such as Adobe send & Track, Dropbox, creative cloud, WeTransfer, etc. file sharing. Thank you.

  • How to display all the data to a database with the same name?

    I am familiar with the creation of basic website, but I want to learn how to create more dynamic Web sites.

    I create a Web site where a user can register on the site and counts there. Once into account here, there will be different options they can do.

    The new application form is in the section account it is configured for a user to submit a multiple application and save it in the database, that works, but the problem I have is during the examination of the application, it does show that one of them, not all.

    How can view the request of a user, sign in?datab.PNG

    revreq.PNG

    I can get to the screen, but not all.

    Is it possible to do this or any suggestions on how to do?

    Here's the code for the ReviewRequest:

    <? PHP require Connections/Connections.php"?" >

    <? PHP

    session_start();

    {if (isset($_SESSION["fname"]))}

    }

    else {}

    Header('Location:NewRequest.php');

    }

    ? >

    <? PHP

    $User = $_SESSION ['Pnom"];

    $result = $con-> query ("SELECT ALL * from newrequest where Fname ="$User"" ");

    $row = $result-> fetch_array (MYSQLI_BOTH);

    $_SESSION ["FirstName"] = $row ["Fname"];

    $_SESSION ['location'] = $row ["Location"];

    $_SESSION ['description'] = $row ['Description'];

    ? >

    <! doctype html >

    < html >

    < head >

    < link href = "CSS/Master.css" rel = "stylesheet" type = "text/css" / > "

    < link href = "CSS/Menu.css" rel = "stylesheet" type = "text/css" / > "

    < meta charset = 'utf-8 '.

    ReviewRequest < title > < / title >

    < / head >

    < body >

    < div class = "Container" >

    < div class = "Header" > < / div >

    < div class = "Menu" >

    < div id = 'Menu' >

    < nav >

    < ul class = "cssmenu" >

    < li > < a href = "Account.php" > account < /a > < /li > ""

    < li > < a href = "UpdateAccount.php" > update account < /a > < /li > ""

    < li > < a href = "NewRequest.php" > new request < /a > < /li > ""

    < li > < a href = "ReviewRequest.php" > Review Request < /a > < /li > ""

    < li > < a href = "LogOut.php" > sign out < /a > < /li > ""

    < /ul >

    < / nav >

    < / div >

    < / div >

    < div class = "LeftBody" > < / div >

    < div class = "RightBody" >

    < name of the form = "form1" method = "post" action = "" >

    < div class = "FormElement" >

    < label for = "FirstName" > < / label >

    < input name = "FirstName" type = 'text' required class = "TField" id = "First name" value = "<?" PHP echo $_SESSION ['FirstName'];? ' > ' >

    < / div >

    < div class = "FormElement" >

    < label for = 'Place' > < / label >

    < input name = "Location" type = 'text' required class = "TField" id = 'Location' value = "<?" PHP echo $_SESSION ['Location'];? ' > ' >

    < / div >

    < div class = "FormElement" >

    < label for = "Description" > < / label >

    < input name = "Description" required class = "TField" id = "Description" value = "<?" PHP echo $_SESSION ['Description'];? ' > ' >

    < / div >

    < / make >

    < / div >

    < div class = "Footer" > < / div >

    < / div >

    < / body >

    < / html >

    You would browse the information stored in the $result variable.

    $result = $con-> query ("SELECT ALL * from newrequest where Fname ="$User"" ");

    As below:

    fetch_assoc()) {? >}

    (I don't see a reason to assign data to a variable of $_SESSION?)

    You also probably would be well advised to select information based on a uniquie rather than a name id - if two people have the same name youre UNLESS you want to make sure that two identical Fname can be stored in your tabe stuffed.

    $result = $con-> query ("SELECT ALL * from newrequest where userID = '$userID'");

    userID |     Fname |     Location |                      Description

    8 the end of the road muddy and foggy

    11 this something, no idea

    8               the              rstreet                           rah

    8 is not a clue

    14 Hello Goodbye

  • How can I search all subjects in my guide? and if this is not possible, how do I get books have not not subjects with the same name?

    How can I search all subjects in my guide? and if this is not possible, how do I get books have not not subjects with the same name?

    "People need be able to find these without having to look inside each book TOC.

    Sorry, but I'm not a big fan or user of this sensitive arrangement "New kid on the block. Therefore, it may be that I am simply misunderstanding because I do not regularly use it. Of what you say, it seems to me that if you (or more precisely your users) are not able to click on the right side, where he says 'Getting Started' or 'List of Email Campaign' and see these topics open and view the content with search terms highlighted?

    Regarding the "bookmarks", those that are normally visible by the user and will be not viewable unless the name of the bookmark appears also as text within the topic. Although, if the two are different, you could probably get there by adding the name of the bookmark as a keyword search in the properties of the section.

    In any case, I feel that at this point, I can just be frustrating you and you may need someone else to try to help that probably better understand the issue.

    Sorry, I was not able to help.

    See you soon... Rick

  • newBie Q: how to make a clickable form to access a slide with the same name of the form (button c_1 drag c_1 f.e.).

    I've done a few clickable placeholders on a masterslide

    Then: a new slide based on this masterslide

    and to use a script or shared action that says "(le saut de succès à une autre diapositive avec nom samen te que le bouton...)"

    Sorry for this unusual semantic language.

    But already thank you for answering!

    Lucas

    PS I use a trial version to test a branched interactive scenario. A choice of a user driven tot another slide with a followed video reaction of other choices,...)

    Not possible to use a variable in this case to link the label name for a name for the slide.  But I still don't see the purpose at all?

    Will you need to the same button with the same name on multiple slides? Will you use for the rest of the project timing in this case? Because you cannot reuse a name of a button, if you have two instances of this button on two different slides, they will need each a different name. If this is the same form button, programmed for the rest of the project, we will always use the same action, needs not even a tip action because it will «Pop X zip» But there is no way to use the name of the button in this action at all. Joint action is possible with X as the parameter, and then you can assign it to all the buttons that have need of this action. But why do you want that the link between the button name and the name of the slide?  Can you explain? My Captivate intuition tells me that there is a misunderstanding, perhaps because of your experiences of Lectora. Captivate is really different, presented on the differences in workflow with an expert Lectora. I no longer use Lectora but the structure, and certainly the way to 'script' is totally different.

Maybe you are looking for