11 Replies Latest reply: Aug 3, 2011 10:25 AM by 873695 RSS

    How to create new database in oracle 11g

    873695
      Hi,
      I m new in oracle 11g, i have downloaded oracle 11g and with the help of 2day-developer guide i learn all the SQL queries , but i worked with HR database .
      Now i want to create my own database with required tables. Can anyone help me how can i make my own database in oracle 11g.

      Thanks
      Manna
        • 1. Re: How to create new database in oracle 11g
          sb92075
          870692 wrote:
          Hi,
          I m new in oracle 11g, i have downloaded oracle 11g and with the help of 2day-developer guide i learn all the SQL queries , but i worked with HR database .
          Now i want to create my own database with required tables. Can anyone help me how can i make my own database in oracle 11g.
          CREATE USER
          CREATE TABLE

          do you know how to Read The Fine Manual found at http://tahiti.oracle.com?
          • 2. Re: How to create new database in oracle 11g
            rajeysh
            870692 wrote:
            Hi,
            I m new in oracle 11g, i have downloaded oracle 11g and with the help of 2day-developer guide i learn all the SQL queries , but i worked with HR database .
            Now i want to create my own database with required tables. Can anyone help me how can i make my own database in oracle 11g.

            Thanks
            Manna
            refer:- 2 day oracle dba 11gR2 oracle manual.
            http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/install.htm#CHDGJGHB
            see:-Creating and Managing a Database with DBCA
            http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/install.htm#BABCABGJ
            • 3. Re: How to create new database in oracle 11g
              Dude!
              Oracle provides a GUI tool called Database Configuration Assistant, which will help you to create a new database. Login as the user Oracle on the Server console or use SSH with X-forwarding and then type "dbca".
              • 4. Re: How to create new database in oracle 11g
                jgarry
                870692 wrote:
                Hi,
                I m new in oracle 11g, i have downloaded oracle 11g and with the help of 2day-developer guide i learn all the SQL queries , but i worked with HR database .
                Now i want to create my own database with required tables. Can anyone help me how can i make my own database in oracle 11g.

                Thanks
                Manna
                Be careful to distinguish between the terms schema and database. Some other products get them wrong. It would be an HR schema (or user, which is the same thing in Oracle). So you don't need to use the database creation assistant, unless you are working with a new host that has no database.

                One simple way would be to get the DDL for creating the HR schema, and edit it for your own. It can be extracted from your database in several ways, or you can copy the hr_cre.sql to your own script and edit that. Both ways are educational, and you can google for instructions.
                • 5. Re: How to create new database in oracle 11g
                  873695
                  Hi,
                  I did the same but i do not know how to use this database and make tables in that.
                  Thanks & Regards
                  Manna
                  • 6. Re: How to create new database in oracle 11g
                    JustinCave
                    To jgarry's point, are you sure that you want a separate Oracle database? And not a separate schema in the database you already have? A separate schema would seem like a much more logical thing to want.

                    If you did, in fact, create a new database, you'd connect to it the same way you connected to the old database. You'd need a new tnsnames.ora entry for the new database. You'd need a username & password for the new database. If you created it with the same options that you used to create the old database, the same sample schemas, like HR, will exist in the new database. So you could potentially connect to the new database as HR.

                    Again, though, it's not obvious that a second database is actually what you're after, though.

                    Justin
                    • 7. Re: How to create new database in oracle 11g
                      873695
                      Hi Jgarry
                      You are right i was confused between terms database,schema and user .
                      i actually want to create new schema like hr which is by default for my project.
                      Can you please help me how can i create my own schema and tables for my project

                      Thanks
                      Manna
                      • 8. Re: How to create new database in oracle 11g
                        Srini Chavali-Oracle
                        Check the 2-Day DBA documentation

                        http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/users_secure.htm#CHDEBHDE
                        http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/schema.htm#CFHJAHAA

                        HTH
                        Srini
                        • 9. Re: How to create new database in oracle 11g
                          873695
                          Ya my problem is solved.
                          Thanks to all .special thanks to jgarry who pointed me out that database and schema(user) are different in oracle, and thanks to Srini Chavali to show me right directions of user guides .
                               
                          Thanks
                          Manna
                          • 10. Re: How to create new database in oracle 11g
                            873695
                            Hi Srini Chavali      

                            Thanks for showing me the right direction of user guide. My prob is solved.

                            T&R
                            Manna
                            • 11. Re: How to create new database in oracle 11g
                              873695
                              Hi JGarry,

                              You are right and thanks a lot.

                              T&R
                              Manna