Schema VS Database

hi
thank you for the support you have given me .I have been working in SQL Server and .NET.But i have to shift to oracle and .NET. But i am not clear about the basic concepts in Oracle .In Sql Server we have one server and there are many Databases and tables inside that . But in Oracle schema and other terms are used . Can anybody help me to understand that concept .or send me web links that explains these concepts in simple manner
thanks & regards

Dear new user,
Welcome to Oracle. As Rob states, the Concepts manual has all the information needed to clarify your doubt and more. But in a few words:
SQL Server's concept of database is different as in Oracle: while in SQLServer you can create several databases in the same machine accessed by sets of user accounts, in Oracle, each database has its own set of users and accounts. You still can have several Oracle databases in the same machine, but they're considered external to each other.
In Oracle, the schema and users accounts concepts are interchangeable since they're managed by the same CREATE USER or ALTER USER sentences. In Oracle, you create schemas using the CREATE USER sentence in order to (optionally) organize database objects related to the same business logic (for example, if you want to organize your application modules' objects in different containers) but everything belongs to the same database so you need to create only one. In SQLServer you would have to create a different database to accomplish that. The Oracle schema is a user that contains objects (tables, indexes, stored procedures, etc.).
Then you create user's accounts using the same CREATE USER sentences and provide access to different schemas objects through the GRANT sentences and through SYNONYMS. All users need a set of object access privileges and sentence execution privileges in order to access other users' (or schemas') objects and to run anything in the database. The Oracle user account is a user that has been granted privileges.
Keep in mind that you always need to create only one Oracle database to accomplish the same in SQLServer.
Hope this introduction helps in some way,
Best regards,
Luis Morales

Similar Messages

  • Transfer whole schema between databases

    Hi,
    I have a question on how to move an entire schema between two databases which are of the same version and patchset.
    I identified the possible methods as follows:
    1) Using exp/imp or expdp/impdp, but that's quite slow on larger schemas and the transported data might not be physically the same as on the source database (indexes are rebuilt, tables get loaded with data again....).
    2) Using transportable tablespaces. This is fast, the physical data layout is the same as on the source database, but unfortunately only the objects in the transported tablespace get transferred. Schema objects like PL/SQL packages, private synonyms, functions.... and grants aren't transferred since they are stored in the SYSTEM tablespace.
    Is there any other way to move a schema between databases? Maybe some combination of expdp/impdp (transfer of user object definitions stored in the SYSTEM tablespace like PL/SQL code, view definitions, etc.) and transportable tablespaces (transfer data segments like tables, indexes....)
    From what I know RMAN can't do that since the smallest "logical object" it can restore/recover is the whole tablespace with tablespace point in time recovery.
    Thanks in advance for any answer.
    Regards,
    Jure

    user633661 wrote:
    Hi,
    I have a question on how to move an entire schema between two databases which are of the same version and patchset.
    I identified the possible methods as follows:
    1) Using exp/imp or expdp/impdp, but that's quite slow on larger schemas and the transported data might not be physically the same as on the source database (indexes are rebuilt, tables get loaded with data again....).
    2) Using transportable tablespaces. This is fast, the physical data layout is the same as on the source database, but unfortunately only the objects in the transported tablespace get transferred. Schema objects like PL/SQL packages, private synonyms, functions.... and grants aren't transferred since they are stored in the SYSTEM tablespace.
    Is there any other way to move a schema between databases? Maybe some combination of expdp/impdp (transfer of user object definitions stored in the SYSTEM tablespace like PL/SQL code, view definitions, etc.) and transportable tablespaces (transfer data segments like tables, indexes....)
    From what I know RMAN can't do that since the smallest "logical object" it can restore/recover is the whole tablespace with tablespace point in time recovery.
    Thanks in advance for any answer.
    Regards,
    JureIf you have only one business schema, then you may go with duplication of database.
    Otherwise, you can go with Schema Based Replication with Streams or as you said combination of expdp/impdp and transport.

  • Using TOAD and SQL Developer to compare db objects in schemas in databases

    Hi All,
    My primary objective was to compare objects in schemas in two different databases and find out the differences,
    Execute DDL's in the database where objects are missing and syn schemas in two different databases.
    So I need to compare schemas in databases. Which tool would be helpful and will be user friendly to make a comparison of database objects existing in schemas in two different databases.
    I'd like to see if I can get a list of pro and cons between Toad and SQL Developer for comparing schemas pros and cons.
    Could you please also help me on navigation in SQL Developer to compare schemas.
    Connect to Source
    Connect to Target
    Compare schemas with different object types
    Find out differences
    Generate DDL's for the missing objects or for the objects in difference report
    Run them in missing instace(Source/Target)
    Make sure both are in sync.
    Thanks All

    Hi,
    Most dba type tools have this kind of functionality - personally i use plsqldeveloper but this is very similar to most other tools on the market. SQL Developer seems to rely on you needing the change management pack licence which you likely dont have and would be quite a large cost to roll out.
    I'd compare plsqldeveloper/toad/sqlnavigator etc and maybe the tools from redgate which look pretty good though i haven't used them.
    Regards,
    Harry

  • Using exp dump file, how to know schema/tablespace/database/table....

    Hi
    I have export dump file. I don't have any information other then that about the dumpfile.
    1. How do I know what version of exp was used(or database version)?
    2. what does the exp contain, whether it is table/schema/tablespace/database level export?
    3. Is it possible that I can used impdp command to export a file which was exported using "exp" command?

    1. Sorry for my ignorance but in first case how do I know if i have to use "imp or impdp".
    As discussed in the above mentioned thread strings might reveal something but not sure. Otherwise you can always confirm by trying to run it.
    And assuming that if I imported the dump(using trial and error rule), how do I know what level of export was the dump file created... ie
    how do I know the present object(object imported in target) was belonging to which tablespace and schema in source database(question 2 of "Sidhu")?
    When you will import it back in a new database, everything will be same as the original database. All objects will belong to their respective tablespaces,schemas blah blah...(where they were in the original database).
    Sidhu

  • Can we access the e-business apps schema with database adapter

    Hi..
    can we access the tables/views/api's in apps schema using database adapter. Generally we access it using oracle apps adapter.
    Thank you,
    Dan.

    Hi Dan,
    As mentioned by the other user, you can very well use the db adapter as APPS Schema user to connect to any APPS instance.
    This is the reason why you have the connection navigator in JDev not differentiating much for APPS adapter connection and db connection listed.
    However, having said that I would still prefer using APPS JCA Adapter for APPS instance and DB adapter for databases.
    Regards
    A

  • Difference Between Database Schema and Database User Account ??

    First i would like to know what an Oracle Database schema exactly is ?
    And what is it for and also What is it's use ?
    Later the exact "Difference Between Database Schema and Database User Account".
    I googled about it but i'm unable to find out it's The difference,
    Please try to explain in a simple manner........
    Thank you very Much in Advance..........

    user13655582 wrote:
    Greate example. but i would like add one more point..
    a user is a schema and schema is a user. but when this applies to the user that he become a schema, only if he has got some objects. so we can say while creating the user which dosent contain any objects called simple user account but afterwords when he has got an objects then we can say its a schema as the above user has shown you through the exampleIt is just word-play. There is nothing in like a 'status' indicator to say "USER_A is just a user but USER_B has become a schema". Many people use the terms "user" and "schema" interchangeably, and some very good DBAs will insist this is correct. I don't disagree with them even though I usually try to make the distinction.
    In a typical application, all of the objects (tables, procedures, etc) that implement the app will be owned by a "application schema owner" - a user which exists for the sole purpose of owning the schema. Said user will have no privileges at all .. especially not CREATE SESSION. Except for possible maintenance activity no one ever actually connects as this user. User accounts are then given to actual humans who connect with their own accounts. The accounts have the necessary system and object privileges granted to them - via a role. One could also create a special account (let's call it APP_ADMIN) that is used for maintenance and batch operations within the application.

  • Database Schema from database

    I need a little help. I am trying to import a mySQL database to a schema in JDeveloper 10.1.3. I keep getting an error about varchar cannot have parameters. Can somebody shed some light on this issue?
    Thanks,
    Alley Davis
    Dragon Creative Works

    Sorry Lisa,
    I posted the SQL Scripts Generated by JDeveloper 10.1.2.
    Here are the ones from mySQL
    Thanks,
    Alley
    CREATE TABLE CIP (
    CIP VARCHAR(50) NOT NULL,
    Description VARCHAR(50) NOT NULL,
    ECN VARCHAR(50) NOT NULL,
    REV VARCHAR(50) NOT NULL,
    GOV BIT NOT NULL,
    GOVAuth VARCHAR(50) NOT NULL,
    LSAComplete DATETIME NOT NULL,
    PUBSComplete DATETIME NOT NULL,
    Validated BIT NOT NULL,
    Canceled BIT NOT NULL,
    Overview TEXT NOT NULL,
    LSAWriter VARCHAR(50) NOT NULL,
    PUBSWriter VARCHAR(50) NOT NULL,
    Priority SMALLINT(5) NOT NULL,
    KitAvail DATETIME NOT NULL,
    KitOrdered DATETIME NOT NULL,
    FileName VARCHAR(50) NOT NULL,
    AuthFileName VARCHAR(50) NOT NULL,
    Hold BIT NOT NULL,
    [Delete] BIT NULL,
    Released BIT NULL,
    PRIMARY KEY(CIP)
    CREATE TABLE CIP2Serial (
    CIP VARCHAR(50) NOT NULL,
    End_SN VARCHAR(50) NOT NULL,
    End_PN VARCHAR(50) NOT NULL,
    SN VARCHAR(50) NOT NULL,
    PN VARCHAR(50) NOT NULL,
    End_UID VARCHAR(5) NOT NULL,
    NHA_SN VARCHAR(50) NOT NULL,
    NHA_PN VARCHAR(50) NOT NULL,
    NHA_UID VARCHAR(5) NOT NULL,
    UID VARCHAR(5) NOT NULL,
    Complete BIT NOT NULL,
    DRF VARCHAR(50) NOT NULL,
    Status VARCHAR(15) NOT NULL,
    Date_In DATETIME NOT NULL,
    Date_Completed DATETIME NOT NULL,
    [Delete] BIT NULL,
    Released BIT NULL,
    PRIMARY KEY(CIP, End_SN, End_PN, SN, PN)
    CREATE TABLE CIPDetails (
    CIP VARCHAR(50) NOT NULL,
    PN VARCHAR(50) NOT NULL,
    UID VARCHAR(5) NOT NULL,
    UIDEndItem VARCHAR(5) NOT NULL,
    [Delete] BIT NULL,
    Released BIT NULL,
    PRIMARY KEY(CIP, PN)
    CREATE TABLE CIPReason (
    ID INTEGER NOT NULL,
    ClosingReason VARCHAR(50) NOT NULL,
    [Delete] BIT NULL,
    Released BIT NULL,
    PRIMARY KEY(ID)
    CREATE TABLE Priority (
    Priority SMALLINT(5) NOT NULL,
    PriorityText CHAR(15) NOT NULL,
    [Delete] BIT NULL,
    Released BIT NULL,
    PRIMARY KEY(Priority)

  • ORA -18808;Cannot find OUTLN schema using Database Link

    Hi,
    I have to access a database using a database link. When I try to do so I get the message:
    ORA -18808:cannot find OUTLN schema
    The OUTLN schema really does'nt exist at the target database, but I don't get the message when connecting with the same user outside the database link.
    I am trying to avoid to ask them to recreate the schema, since I am the only one that needs the database link working.
    Is there any way I can access the database with the database link without messing with the target database?
    Thanks in advance for any help.

    The error number returned by that error does not seem to be correct. Below is the correct error number:
    ORA-18008 cannot find OUTLN schema
    Cause: The database creation script that creates this schema must not have been executed.
    Action: Review the log files to see what happened when the database was created.
    How is the DB link defined to connect as?

  • Import of BaseView to a different schema in database

    Hi All,
    We have developed some bam reports. Now the base view, meta view are referring to a schema name (say SchemaName1) in database.
    In the plans we are using "SQL query" to get data from database. So we have queries like "Select SchemaName1.table1.column1 ... from ......".
    Now we have taken a export of the base view, meta view ,plans and all other components of BAM.
    All is fine till now... But now i need to import all these stuff in a different database. My problem is that in the new database instance i cannot use the same schema name (i.e. SchemaName1 ). I have a different schema name(say SchemaName2) there and i need to use that......There is no way i can use SchemaName1.
    Will the import of Base view/Meta view/plans work or we need to do some configuration changes during import??
    Do we have to create Base view for the new schema names from scratch or the imported code can be used??
    The plans have sql queries referring to SchemaName1 but we need it to refer to the Other schema(SchemaName2 )...What is the possible way of referring to the new schema without developing the plan again??
    Waiting for your valuable feedback...

    ***Backup your repository database***
    ***Please review all steps before attempting***
    Sarputil Export
    1.     Start | Run, type “sarputil”
    2.     Do a partial export. (Note down directory that will contain files to be exported.).
    3.     Select your Baseview, Metaview, Security:Login Profile, and Plan. (Note, the check boxes are in front of each object name and might appear very light on some clients.)
    4.     On the XML dialog and with the question on what you would like to do – select Execute Now.
    5.     Finish the wizard and from the directory noted above, verify .csv files were created. (Typically C:\OracleBAM\EnterpriseLink\Data\rp\export).
    6.     Copy all .csv files and paste to different temporary folder on 2nd server.
    Sarputil Import
    1.     Start | Run, type “sarputil” on the 2nd server where you’ll import into.
    2.     Partial import
    3.     Under Repository Information dialog, set the Data Source information on the right and remember to change the directory now containing your .csv files.
    4.     Like before, select “Execute now” and Finish the wizard.
    Oracle BAM Admin
    Modify connect string (host string or tns name) if you need to:
    1.     Connect in Oracle BAM Admin
    2.     Expand Baseviews and select the imported Baseview
    3.     Check under “Server” on the left if the connect string is correct.
    4.     If not, click Modify button and change.
    Modify Baseview Login if you need to:
    1.     With your Baseview still selected on the left side, click on “Baseview Logins” tab
    2.     Logins on the left correspond to actual database user id’s and password. Add a new Login with a database User ID and Password to access the new schema.
    3.     Associate or Set the new Login (right) to the BAM User on the left.
    Sarpbv Modification
    Use sarpbv utility to change references of the old schema name to a new schema name.
    General syntax for Oracle:
    sarpbv /R"username:pwd:Oracle:TNS Name::DB UserID:DBUser pwd” /B"BaseView name" /O"NewSchema"
    **Use Capital letters for New Schema name!
    **Notice 2 colons (::) after TNS Name (because you do not have a database name in Oracle).
    1.     Open DOS
    2.     Type your sarpbv command. Below is an example where I changed a Baseview called “scott” to use a new schema name called Jack.
    sarpbv /R"sa::ORACLE:baminst::sagent:sagent" /B"scott" /O"JACK"
    3.     Open Design Studio, locate the plan and check the SQL Query now reflects the new schema.
    4.     Test the plan to ensure it’s pulling data correctly from the new schema.

  • Migrating and Backing up Schemas (complex database structures)

    Hey guys, I need to figure out a way to back up and also migrate our Oracle database from our production schema to the dev schema and the other way around.
    We have bunch of config tables that drive how systems on our platform run, and when setting up new systems or doing maintenance, we need to update our config tables. We want to be able to work on the dev schemas and after setting up a system/feature, we want to be able to migrate all those configs to the dev schemas.
    I thought of running a procedure where we give the ID of the system (from the main table) and i would go through all the tables and select nvl(..) and if it doesn't exist, i would insert into, and if it does exist then i just run an update on that row.
    This code will get very messy and complicated especially since the whole config schema is very complex and it might be hard to handle all the keys properly.
    Another option i was looking at was triggers, so when setting up a new system, there would be a log of all the statements we ran while setting up/editing a system, then we would run it on our production schema.
    I'm on a coop term, and have only been working with databases for 6 months, so i don't know that much and any information/advice would be greatly appericiated.

    Yes i guess it might not be migration, it's just what the project is called around here :)
    Regardless, yes the intiial idea was replication, should create all the keys from stratch when creating the entries in the production schema but we abondened the idea and we'll be using the production sequences for creating the primary keys in the development, and just make an exact copy back and forth...
    Do you think i can just start from the top of the hierarchy (even though not clearly defined, so hierarchy might not be very straight forward) and loop through that table, insert or update, then move one level down, copy and update and so on?
    Also is there any sources where i can get more information regarding triggers
    Edited by: tolgaek on Oct 27, 2010 10:04 AM

  • Storing XML schema in database

    Hi everybody..I have question here related to the storing of the XML schema in the database. When an XML Schema is created like this.
    dbms_xdb.createResource('home/DEV/xml_schema_test.xsd'),
    then is the XSD created and stored in one of the database tables or is it stored physcially as an xsd file in the database repository or both?
    If it is stored in one of database tables, then which table is it?
    If it is stored as an XSD file in the database repository, then how can I access the xsd file if I created it like in the example above.
    To access the xsd file over http, do I need to start the xsdhttp server or is it already started if I loaded XDK in my database.
    Would the url for accessing the same over http be
    http://db_machine:8080/home/DEV/xml_schema_test.xsd.
    I think I have got information in bits and pieces but not able to put everything together.
    Thanks in advance for the replies.

    The questionssss you are asking are dealt with in the FAQ link at the top of the first page on this forum, the rest is described in detail in the XML DB Developers Guide. A little bit of reading wouldn't harm, would it.
    Message was edited by:
    mgralike

  • JDev 11g Pr3 Not able to switch schema on database navigator

    I have a schema called FACETSEDI that is used to access a schema named FACETS.
    When I connect to the DB using the FACETSEDI login, I can run queries against the FACETS tables, but I can't browse them, since the navigator is pointing at the FACETSEDI schema.
    Is there some custom JDBC URL I can use to cause the connection to force a switch on the session (simulate a ALTER SESSION SET current_schema = facets) ?

    Absolutely:
    1. Start JDeveloper
    2. Go to the database navigator
    3. Create a connection to the database
    username: facetsedi
    password: mypassword
    driver: thin
    hostname: facets
    SID: facets1
    4. Connect to the database
    5. Expand the Tables node - and all I see are tables in the FACETSEDI schema
    What I need is to be able to see the tables in the FACETS schema.
    Can't find a way to specify this with a custom JDBC setting (like with SQL server I could specify a parameter in the URL to connect to the correct database schema).
    There used to be a "show all schemas" setting on the IDE that let you pick which schema you wanted to see.

  • Compare model with diferent schemas to database with diferent schemas

    Hi All,
    I have some tables in diferent schemas that are equal(i.e: country table, i need this table in all the schemas) name and structure are the same but with diferences in some properties like mandatory columns,
    the problem is when I try to compare with the database,
    Import from datadictionary swap target model,
    i select the model and select the diferent schemas in the database,
    in the result, the table with the same name is compared for all the schemas in my model with the table in only one schema of the database
    and at the end appears a table to be droped for the tables in the other schemas of my model,
    the table comparison is giving me differences in the schema but is not comparing with the correct schema table,
    I'm not sure if I'm doing something incorrectly or is just a limitation of the tool,
    Thanks in advance

    Hi Philip,
    You are righ, if a select this option in the compare tab options
    I could filter which elements of the model I will compare with the datadictionary,
    But is not too much friendly to change this property every time I want to compare the model,
    I mean, I have generated with DDL editor a file for some objects but the flag 'generated in DDL' is not changing so I need to do it manually,
    I don't know if I'm not doing correctly the generation or if I have some problem with the configuration,
    Could you confirm me that if I execute the generation of DDL with only one object this object will be the only one will have the flag checked??
    In my opinion if could be posible to include a step in the compare way to select the objects will be more friendly for the user but is still a solution to my problem, Thanks a lot

  • How to install orabpel schema in database 10.2

    Hi,
    When I am installing BPEL SOA suite 10.1.3 against Oracle database 10.2, I got error msg saying that BPEL Schema is not installed. Where can I find the scripts to install BPEL schemas?
    Thanks,
    QIan

    after downloading and extracting the SOA suite ou should find a bundle called mrca.zip (or irca ..) extract it on the db box and folow the instructions - this is how it used to be ..
    hth clemens

  • Data distribution scheme and database fragmentation

    Hi all,
    I'm working on a scenario (University) involving the fragmentation of a central database. A company has regional offices i.e. (England, Wales, Scotland) and each regional office has differing combinations of business areas. They currently have one central database in their head office and my task is to "design a data distribution scheme". By scheme does this mean something like horizontal / vertical fragmentation? Also can somebody point me to an Oracle specific example of creating a fragmented table? I've tried to search online and have found the "partition by" keyword but not much else except for database linking - but I'm thinking this is more concerned with querying than actually creating the fragments.
    Many thanks for your time

    >
    Partitioning is what the tutor meant by "fragmentation". So if there is a current central database and I have created new databases for each regional office I could run something like the below statement on the regional databases to create a bespoke version of the employee table filtered by data relevant to them? This is all theoretical and we don't have to develop the database, I just want to get the syntax correct - Thanks!
    >
    There you go talking about 'new databases' again. You said your original task was this
    >
    my task is to "design a data distribution scheme".
    >
    Is the task to give the regions access to their own data in the ONE central DB? Or to actually create a new DB for each region that contains ONLY that regions data?
    So are we talking ACCESS to a central DB by region? Or are we talking replication of the entire central DB to multiple regions?
    Your example table is partitioned by region. But if each region has their own DB why would you put data for other regions in it?
    If you are wanting each region to have access to their own data in the central DB then you could partition the central DB tables like your example:
    CREATE TABLE employees (
    id INT NOT NULL,
    fname VARCHAR(30),
    lname VARCHAR(30),
    hired DATE NOT NULL DEFAULT '1970-01-01',
    separated DATE NOT NULL DEFAULT '9999-12-31',
    job_code INT,
    store_id INT
    PARTITION BY LIST(region_id) (
    PARTITION Wales VALUES IN (2)
    ); But if you are creating a regional DB that includes data only for that region there is no need to partition it.

Maybe you are looking for

  • New To The Forum And Looking For Speed Help!

    Hello, After trying to find information about my problem on the Internet and then speaking to the BT Indian Call Centre, I stumbled upon this forum. I am hoping, having looked at so many helpful comments and contributions, that I might be able to she

  • Formulas and Rounding

    Two things here that I've found problematic. -How can I set cells to display the formulas I have typed into them, rather than the formula outcome? -My Numbers is rounding 5s down, not up? Is this An American thing or a fault in Numbers? Anyone got an

  • Bangla font problem in indesign

    in indesign cc I can not write  কর্ ব্য, before it was ok.

  • First operand of . is not an object, so cannot access member WriteLine

    1) I get error like First operand of . is not an object, so cannot access member WriteLine. (180,235) Z_REM_STRING.Z_FUNCLIB_FORMULA.FieldFormula Name:RemoveSpace PCPC:691 Statement:11 2) I have the record called Z_REM_STRING and have one field call

  • I can't install any adobe cs version due to a pending restart

    I have tried to install adobe packs but the installer kept failing! Accoording to the adobe support advisor, it seems that a restart is still pending. My problem is that I've restarted the computer several times, and even checked my windows 7 registe