How to crate a new database

I have installed the XE edition and the home page and all works. What I would like to do is create a simple database and have an application talk to it via OLEDB. Two problems with that:
1) If you want to create a new database, the simplest option is to use the Database Configuration Assistance (DBCA). But that doesnt come with XE and you dont appear to be able to download it.
Your next option is to use SQL statements. The manual contains some info but it states that your DBA will typically create the database using SQl scripts. It does give some snippets as to what you might do, but it is not complete and hence fails if you try it (bad docs!). I found a few other web pages that contain some commands, e,g this one:
http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html
which I am about to try next.
Why is creating a new DB using Oracle so hard? Took me 10 min on MySQL and SQL Server. Surely for test purposes if you just want a simple database with default settings, it should be easy to create?
2) Visual Studio 2003 lets you do a database connection test. So with Oracle XE installed, I did a connection test using "Microsfot OLE DB Provider for SQL Server" and I choose local host and give it my admin user name and password. It says "Test connection failed because of an error initializing provider. SQL Server does not exist or access denied". I also installed ODAC101040 which is supposed to install the Oracle OLEDB driver. So if I try and do a connection test for the "Oracle Provider for OLE DB". Just selecting it gives you "OraOLEDBplus10.dll - The specific module could not be found". So what does ODAC101040 install really then?
Any ideas?

I will take the first part of this (BTW - it's often better to have seperate threads for seperate questions - makes it easier to track).
The concept of a database in SQLServer and MySQL is different than the concept of a database in Oracle. In Oracle, we use the concept of a schema to seperate logical objects in a name space, SQLServer and MySQL use a database. We also then use the concept of a tablespace to seperate how physical objects are stored, as opposed to how a database is used in SQLServer and MySQL.
In XE, you can have as many schemas and tablespaces as you want. So instead of looking at CREATE DATABASE (which is really complicated, and not really doing what you think it is doing), you should be instead be considering CREATE USER (creates a schema in which you can then create database objects) and CREATE TABLESPACE (creates a physical storage location). Having said that, XE defaults the physical storage locations to a generic tablespace called USERS, as an aid to simplicity, but you can create your own tablespaces if you wish.
CREATE USER is docced in the 2 DAY DBA guide for XE. CREATE TABLESPACE is in the Oracle Database 10g Release 2 doc - http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7003.htm#SQLRF01403
So the question really is - what is if that you are wanting to do when you are trying to create a database in Oracle ? What is the problem you are trying to solve ?

Similar Messages

  • How to create a new database in SUP

    Hi,
    Iam using SUP 2.1 ESD#1 licensed version
    How to create a new database other than the default sampleDB.
    Thanks,
    B.Ushasri

    Hi B.Ushasri,
    This is actually pretty easy.
    1) open the Unwired Workspace (SDK in eclipse).
    2) Bottom right, add a new Database connection with the following details:
               Sybase ASA v12.x,
               host=Your Sup box,
               port=5500,
               user=dba
               password= Your password (default = dba)
    3) Once you connect successfully, right click on the connection and choose the "Create database" option.
    That should do it for you. It is the same connection as the sampleDB connection so if you already have that defined then its a simple, right click on it once connected and hit create database.
    Hope that helps,
    Brenton.

  • How to Create A new Database in the oracle 10g XE

    i have oracle 10g XE i tried to create a new database but its giveing me error when i execute the sql command that is create database testDatabase how to create a new database in oracle 10g XE

    Hi there 785434,
    (This is a generic SQL question relating to Database Triggers, please post future questions of this type into the relevant forum area.)
    Moderator, please move this if able
    I use Before Update and Before Delete Triggers to record a 'snapshot' of the row being changed in my applications.
    Example:
    CREATE TABLE TEST
    DATA VARCHAR2(64 CHAR),
    CREATING_USERID VARCHAR2(20 CHAR) DEFAULT user NOT NULL,
    CREATED_DATE DATE NOT NULL,
    CHANGED_BY_USERID VARCHAR2(20 CHAR),
    CHANGED_DATE DATE
    LOGGING
    STORAGE
    (MAXEXTENTS UNLIMITED);
    CREATE TABLE TEST_HISTORY
    DATA VARCHAR2(64 CHAR),
    CREATING_USERID VARCHAR2(20 CHAR) DEFAULT user NOT NULL,
    CREATED_DATE DATE NOT NULL,
    CHANGED_BY_USERID VARCHAR2(20 CHAR),
    CHANGED_DATE DATE,
    CHANGE_DESCRIPTION
    NOLOGGING
    STORAGE
    (MAXEXTENTS UNLIMITED);
    CREATE OR REPLACE TRIGGER TRG_BU_TEST
    BEFORE UPDATE ON TEST FOR EACH ROW
    BEGIN
    INSERT /*+ append */ INTO TEST_HISTORY
    (DATA, CREATING_USERID, CREATED_DATE, CHANGED_BY_USERID, CHANGED_DATE, CHANGE_DESCRIPTION)
    VALUES
    (:old.DATA, :old.CREATING_USERID, :old.CREATED_DATE, USER, SYSDATE, 'UPDATE');
    END;
    CREATE OR REPLACE TRIGGER TRG_BD_TEST
    BEFORE DELETE ON TEST FOR EACH ROW
    BEGIN
    INSERT /*+ append */ INTO TEST_HISTORY
    (DATA, CREATING_USERID, CREATED_DATE, CHANGED_BY_USERID, CHANGED_DATE, CHANGE_DESCRIPTION)
    VALUES
    (:old.DATA, :old.CREATING_USERID, :old.CREATED_DATE, USER, SYSDATE, 'DELETE');
    END;
    Using triggers like this will record who made an update or delete to the database and record the row before it was changed.
    Note that this method might not be suitable for very high transaction rates.
    You will need to 'clear' these history tables as part of routine maintenance.
    Hope that this Helps.
    Ronald.

  • How to create a new DataBase using Oracle 10g Express Edition???

    Hello, I am new to Oracle, I am used to Microsoft SQL Server (Enterprise Manager).
    Here in Oracle I do not get how do I create a DataBase, and then create tables on it.
    could anyone please explain to me how to do it?

    A SQL Server database is roughly equivalent to an Oracle schema.
    You should rarely need to create a new database. If you do need to create a database, get a 'for fee' edition of Oracle and use the dbca tool (Database Configuration Assistant) to do that. In fact, you are only allowed to have one XE database on the machine.
    However, you can create as many schemas in an existing Oracle database as you need. (One schema, owned by userid SYS, is roughly equal to your 'master catalog'.)
    You can create other schemas simply by
    1) creating a userid that will own the schema (one designated for maintenance of the schema);
    2) grant that userid appropriate privileges, such as 'CREATE TABLE', 'CREATE VIEW' as shown in the SQL Reference manual under the GRANT section;
    3) provide that userid with a quota in one or more tablespaces (see the CREATE USER command in the SQL Reference manual);
    4) create the objects, such as tabels, views, sequences, stored procs and functions, etc. (as in the SQL Reference manual);
    5) create the users who will access the objects, and grant them the CREATE SESSION capability (as in the SQL Reference manual);
    6) grant access (select, update, execute, etc.) on the schema objects to these users (as in the SQL Reference manual);
    7) if desired, create synonyms on the schema objects so the users do not need to use fully qualified syntax such as "SELECT col FROM schema.table;" (as in the SQL Reference manual).
    In case you are interested in looking at the SQL Reference manual, it can be found at http://www.oracle.com/pls/db102/portal.portal_db?selected=1 ;-)

  • How to create a new database instance from an existing one?

    Hi, I basically want to create a snapshot of a production
    instance (version 8.1.7) for querying purposes. Would anyone
    tell me the steps involved? What I did as follows:
    1. Copy all data files to a new location
    2. Modify init.ora accordingly. I believe there is no separate
    control file for this version.
    But when I startup the instance, got this error:
    ORA-01103: database name 'TRITON' in controlfile is not 'HERCULE'
    What is missing? Do these data files contains links to the
    previous instance name?
    Thanks for any help.

    Hi All,
    I need some help in recreating new database instance.
    Here are the steps I have done so far:
    1. Created a database with name 'LASTDB' using DBCA
    2. Connected to RMAN.
    3. RMAN>SET DBID=******; (of the source database)
    4. Connect to target. RMAN>connect target SYS/*****;
    5. Executed controlfile restore on RMAN.
         RMAN>Run{
    Allocate channel D1 Type DISK;
              Set controlfile autobackup format for device type DISK to
    ‘\\<ip_address>\Backup\Prod\%F’;
    Restore controlfile from autobackup;
    6. RMAN> ALTER DATABASE MOUNT;
    Now got an error saying ORA-01103: database name ‘PRODDB' in control file is not ‘LASTDB’
    I tried using NID to change the database name but it's throwing an error that database is not mounted.
    I have browsed a lot and found that I need to recreate a control file of the production database using ALTER DATABASE BACKUP CONTROLFILE TO TRACE and should edit the trace file. But it also says to shutdown the source database which is production database and I cannot try that.
    Also I have tried adding a line to init.ora like lock_space_name = LASTDB. Also tried replacing everything from LASTDB to PRODDB but that didn't work either.
    I have been trying to find a solution to this. Please bear with me as I'm a beginner and please let me know how I can fix the error.
    I am running oracle 10.1.0.2.0 enterprise edition on windows 2000.
    Thanks for your patience,
    KG

  • How to create a new database and use it?

    Hi there,
    I have so many tables in the current database that i'm working on. When i start to create a new table such as employee, student, person...etc it doesnt allow me to create them becuase it says the tables exists. Even when i use the drop command to drop the tables, doesn't help. So most of the time i have to create a table with postfix of 1, 2 to the table name.
    Therefore i need to create a database for every project that i do.
    How do i create a new database?
    Then how do i use the database that i just created?
    Then how do i find the out whats the database that i'm currently working on?
    Thanks!
    Message was edited by:
    dingdong
    Message was edited by:
    dingdong

    A database is a physical set of files that contains many schemas. Each schema has a one to one relationship with database users, so to create a new schema you create a new database user.
    e.g.
    CREATE USER fred IDENTIFIED BY fredspassword;Then, by logging on as fred you can create all the new tables you like as that user, in that users schema.
    If you create a new database then you will find you cannot access functions/procedures, packages, tables etc. that exist in another users schema without creating a database link to the other database that contains them.
    If you just create a new schema, you can more easily get at other users schema objects (tables, packages etc.) by referencing them with the users name e.g. JOE.TABLE1 providing that user has given permission for your user to access them. You can also create synonyms that allow you to reference other users schema objects as if they exist in your own e.g. you can have something called TABLE1 in your own schema that is in fact referencing JOE.TABLE1.
    Message was edited by:
    BluShadow
    remove quotes from password. oops! thanks padders

  • How to create a new database using Enterprise manager?

    hi all,
    thank you for all your support. i want to create a new database . I tried following these steps
    i am using Oracle 9i and windows XP
    1, opened the enterprise manager by clicking from programs
    2,selected launch standalone Application
    3, from the tree i expanded the network node and expanded the databases node ,now i can see the globaldatabase i created during installation . i can login that database using systems and manager (username & password )
    4, clicked the new database icon from the window , a small window with node named database appeared
    5 , I tried to expand that by clicking on the database node ,but it pops up a new window showing no active session selected
    I would be grateful if anyone can suggest a solution for this
    thanks & regards

    Hi,
    How can i access DBCA
    start ---> run ---> DBCA <<hit enter>>
    or
    start ---> program ---> oracle home ---> configuration tools ---> database configuration assistant.Regards
    Mohammed Taj
    http://dbataj.blogspot.com

  • How to create a New database application in APEX

    Hi everyone..
    Greetings!!!
    I am a beginner to Oracle APEX, i want to develop a new database application(upload my own data) and wants to perform validations, LOV's, Regions etc..
    Can you guide me to handle this....
    Thanks,
    suresh

    Suresh,
    The forum can help ... but maybe "guide" is asking a lot. There are tons of suggestions here (in the forum).
    Have you read? https://forums.oracle.com/forums/ann.jspa?annID=1324 It's a good place to start.
    There are a wealth of APEX books if you have access to Safari, Books 24 or something like those.
    There are on-line courses: See http://www.oracle.com/technetwork/tutorials/index.html
    Specifically: http://apex.oracle.com/pls/apex/f?p=44785:24:87555121473::NO::P24_CONTENT_ID,P24_PREV_PAGE:6268,1 is "Building an Application using Oracle Application Express: Part 1"
    I'm certain you can find many more by Google'ing.
    If you're like me, you need to see (and do) many examples before you launch off into something non-trivial.
    Best wishes,
    Howard

  • How to create a new database

    hi
    I am not able to create a new database other than the one created during the installation. i am using the oracle 9i client. i am able to create new database from the enterprise manager console,add a database manually but not able to connect to the new database.Can any one help me in solving this problem
    Thanking you in advance
    Dinny

    Hi
    I am using the client and in the sever i have created a new database other than the one created during the installatiom. i have installed the standalone in the server and not the management server. From my client machine iam able to connect to the database created in the server during the installation but not to other databases that i have created in the server from the Add database to tree option in oracle enterprise manager. It is showing insufficient privilage.So can can i get the previlage ? where to set these options ?
    Thanking you in advance
    Dinny

  • How to create a new database after copying an existing database with a new name

    hi
    i have an existing database and want to copy with a new name in sql server 2005 how do it is possible 
    spose
    i have a db name attached in sql server StoreManagementDB now i want to copy this database with all the transactions as StoreManagementDB_1.
    thanks

    Use a two steps to use a backup file to restore a database with a new name.
    ----You need to have a full backup of your database:
    --Step 1:
    RESTORE FILELISTONLY
    FROM DISK = 'C:\bk\TEST.BAK'
    --Find out the LogicalName of data file and log file
    -- in this case: the data file: TEST and the log file LogicalName: TEST_log
    --Both names will be used in the MOVE command
    --Step 2:
    -- Restore the files for test1.
    RESTORE DATABASE test1
    FROM DISK = 'C:\bk\TEST.BAK'
    WITH RECOVERY,
    MOVE 'TEST' TO 'C:\bk\test1_Data.mdf',
    MOVE 'TEST_log' TO 'C:\bk\test1_Log.ldf'
    GO

  • How ro create a new database ?

    hi friends
    i logged in to the oracle enterprise manager . using the Global database name and scott and tiger . How can i create a new databse using enterprise manager
    i am using ORACLE 9i
    thanks & regards

    Duplicate post - How  to create a database ?
    Probably you need to go through the concepts to find out what database, schema means. I assume you must be from SQL Server background.
    Or did you want to know how to create a table?

  • How to add a new database service name to 9iDS

    Hello,
    I installed 9iDS and 9iDB on my laptop which worked fine for few months. I had trouble with 9iDB I/O system so I reinstalled 9iDB with a new SID name. I updated 9iDS by replacing old SID name with new SID name in tnsnames.ora file but it did not work.
    Please someone suggest where should I update in 9iDS to access my newly installed database service with new SID so that forms appication builder can connect properly.
    Currently it is saying :
    ORA-12514: tns listener could not resolve service name given in connect descriptor.
    Thanks,
    [email protected]

    Shyam,
    could it be that you are still starting the old database tnslistener. Please make sure that you start the listener for your new Db instance.
    Frank

  • How to create a new database object?

    i login at sys or system, then enter below:
    create database project;
    the error is < privileges deny >
    what is going wrong???
    null

    Kelvin (guest) wrote:
    : i login at sys or system, then enter below:
    : create database project;
    : the error is < privileges deny >
    : what is going wrong???
    The full format of the command is
    create database project
    controlfile reuse
    datfile '?/oradata/system.dbf' size 250M reuse
    autoextend on next 100M maxsize 550M
    logfile '?/oradata/redo1.rdo' size 30M reuse,
    '?/oradata/redo2.rdo' size 30M reuse
    maxdatafiles 256;
    To execute this command do this:
    sqlplus /nolog <<EOF
    connect internal
    startup force nomount
    create database project
    controlfile reuse
    datafile '?/oradata/system.dbf' size 250M reuse
    autoextend on next 100M maxsize 550M
    logfile '?/oradata/redo1.rdo' size 30M reuse,
    '?/oradata/redo2.rdo' size 30M reuse
    maxdatafiles 256;
    alter tablespace system minimum extent 64k;
    create rollback segment rb_t;
    alter rollback segment rb_t online;
    @?/rdbms/admin/catalog
    @?/rdbms/admin/catproc
    EOF
    and your project database will be created.
    null

  • How to create new database?

    In the "Oracle ODBC Test" client app, when I try to create a database with ...
    create database swett
    ... I get the error "ORA-01100: database already mounted" error.
    Why? I can create a table with:
    create table mytable ....
    and it builds it in the SYS database. I can insert rows into it and select rows out of it OK.
    I just don't know how to create a new database via ODBC. (There are probably ways to create a database via interactive GUI, but I need to do it via SQL statements for my app.)
    My connection is with user "internal" into SID ORCL.
    I'm using Oracle 8 Server on Netware 5 and the Windows 95 client on a Windows 98 machine.
    null

    Hi,
    I hope, below stored procedure is useful for your scenario.
    CREATE PROC Create_New_Database
    ( @DBNAME VARCHAR(550)
    )AS
    Test : Exec [Create_New_Database] @DBNAME='DB20122013'        
    BEGIN TRY               
    SET NOCOUNT ON   
    DECLARE @sql VARCHAR(MAX), @DBNAME_NEW VARCHAR(550),@num int
    IF EXISTS(SELECT 1 FROM sys.databases WHERE name=@DBNAME) AND ISNUMERIC(RIGHT(@DBNAME,4))=1
    BEGIN
    SELECT @num= RIGHT(@DBNAME,4) 
    SELECT @DBNAME_NEW='DB'+CAST(@num AS VARCHAR(10))+''+CAST(@num+1 AS VARCHAR(10)) 
    IF EXISTS(SELECT 1 FROM sys.databases WHERE name=@DBNAME_NEW)
    BEGIN
    SELECT @DBNAME_NEW+' database already exists'
    END
    ELSE
    BEGIN
    SET @sql='USE '+@DBNAME+'  '+' backup database '+@DBNAME+' to disk = ''C:\'+@DBNAME+'.bak''  '
    +' restore database '+@DBNAME_NEW+' from disk = ''C:\'+@DBNAME+'.bak'''
    +' with move '''+@DBNAME+''' to ''C:\'+@DBNAME+'_data.mdf'' ,
    move '''+@DBNAME+'_log'' to ''C:\'+@DBNAME+'_log.log'''
    EXEC (@sql)
    SET @sql=''
    SET @sql=' USE '+@DBNAME_NEW+' IF EXISTS(SELECT 1 FROM SYS.TABLES WHERE NAME=''Dailytemp'') 
    BEGIN DROP TABLE Dailytemp END IF EXISTS(SELECT 1 FROM SYS.TABLES WHERE NAME=''DailyMain'') 
    BEGIN DROP TABLE DailyMain END '
    EXEC (@sql)
    END  
    END
    ELSE 
    BEGIN
    SELECT 'Database is now found or Database name does not mach the scenario'
    END
    SET NOCOUNT OFF   
    END TRY   
    BEGIN CATCH                
     DECLARE @ErrorMessage NVARCHAR(4000)                
        DECLARE @ErrorSeverity INT                
        DECLARE @ErrorState INT                           
        SELECT @ErrorMessage = ERROR_MESSAGE(), @ErrorSeverity = ERROR_SEVERITY(),@ErrorState = ERROR_STATE()                
        RAISERROR (@ErrorMessage,@ErrorSeverity,@ErrorState )                
    END CATCH;   
    GO
    Regards,
    RAMBHARATH

  • How do you create a fresh new database, tables, forms and reports?

    Hi, I am new to this. Where can I find instructions on how to create a new database using 10g XE?
    I have tried and I got stuck on the Table Creation Page. I need to know how to set primary, foreign keys, and constraints. Also what is Precision and Scale on the Table Page.Etc.

    I recommend reading Oracle® Database Concepts for 10gR2 http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14220/toc.htm
    Schema objects
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14220/schema.htm#i5663

Maybe you are looking for

  • Problem with threads communication

    Hi All I have a multithreaded application in which I have 3 threads running including main thread. One of the thread (Thread1) spawned by main thread is performing the business logic required. The other one (Thread 2) is just to send the periodic sig

  • Transition Problems in Full Screen View

    Hi. I've created a Powerpoint presentation on the Bayeux Tapestry which I now want to convert to a PDF document so that I can add multimedia. My Powerpoint presentation features photographs of a section the tapestry with each photograph placed on a s

  • Providing Access based on Client IP Address

    Current Scenario  - SAP Portal is accessible directly and via Citrix (VPN). Based on the URL alias - we have implemented Desktop Filtering. eg if the URL ends with / internet - You get restricted roles eg if the URL ends with / intranet - You get wid

  • F4 help in Interactive forms with Webdynpro abap

    Hi All, How to create a f4 help in interactive adobe form by using  Webdynpro ABAP.

  • "How to remove incompatible plug-ins" in the Mail.

    I have installed Intego/virus barrier and after removed it. Every time I open the Mail now I receive the message: "Incompatible plug-ins disabled". I have to press OK, the mail works fine, but is annoying