4 Replies Latest reply: Feb 8, 2010 4:02 PM by Lubiez Jean-Valentin RSS

    add a new schema.Help!

    751958
      hello!

      Can someone tell me how to insert a new schema in oracle?
      I installed Oracle and I have there a schema name "hr".
      I want to have also the schema "scott".
      I have the sql file witch creates the tables in scott but I don't konw how to upload it...
      How should I do?

      Please someone help me!
      Thanks
        • 1. Re: add a new schema.Help!
          damorgan
          We would need to see the contents of the file to know for sure how you should start. Does it assume scott already exists or does it create it?

          But generically speaking you open SQL*Plus, log in to a DBA account such as SYS or SYSTEM and do the following:
          SQL> @c:\path_to_the_directory_with_the_file\the_file_name.file_extension
          and hit the [Enter] key

          If you need more help then post the first 10-20 lines of the file.

          But the chances that scott does not already exist in your database is close to zero unless it has been dropped intentionally.
          • 2. Re: add a new schema.Help!
            TexasApexDeveloper
            Dan,
            10g XE does NOT include the scott schema, it only has the hr schema installed..

            Thank you,

            Tony Miller
            Webster, TX
            • 3. Re: add a new schema.Help!
              P.Forstmann
              You can run following script with SYSTEM account (from 11.2 <ORACLE_HOME>/rdbms/admin/utlsampl.sql) to create SCOTT user account:
              GRANT CONNECT,RESOURCE,UNLIMITED TABLESPACE TO SCOTT IDENTIFIED BY tiger;
              • 4. Re: add a new schema.Help!
                Lubiez Jean-Valentin
                Hello,


                To install the SCOTT schema you may execute the following scripts from a DOS box:
                set ORACLE_SID=XE
                sqlplus /nolog
                connect / as sysdba
                
                @<ORACLE_HOME>/rdbms/admin/scott.sql
                @<ORACLE_HOME>/sqlplus/demo/demobld.sql
                @<ORACLE_HOME>/rdbms/admin/utlsampl.sql
                Hope this help.
                Best regards,
                Jean-Valentin