9 Replies Latest reply on Mar 23, 2011 2:55 PM by 848583

    create schema Test;

    785153
      Windows 7 + 10.2.0.3.0

      create schema Test;
      It prompts me an error as below:
      ORA-02420: missing schema authorization clause

      Please help.
        • 1. Re: create schema Test;
          sb92075
          when all else fails Read The Fine Manual

          http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/toc.htm

          CREATE SCHEMA is NOT valid syntax!
          • 2. Re: create schema Test;
            Kamran Agayev A.
            782150 wrote:
            Windows 7 + 10.2.0.3.0

            create schema Test;
            It prompts me an error as below:
            ORA-02420: missing schema authorization clause

            Please help.
            The syntax is incorrect. Check the following link:
            http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6014.htm
            • 3. Re: create schema Test;
              As you can find the syntax for CREATE SCHEMA in the documentation without effort
              ( http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6014.htm#SQLRF01313 )
              this is a question which must be considered abuse of this forum.

              Your next doc question will be marked as such.

              -----------
              Sybrand Bakker
              Senior Oracle DBA
              • 4. Re: create schema Test;
                785153
                I was reading the tutorial regarding hibernate - oracle. One of the examples in the tutorial says
                create schema SchemaName;
                So, I did the same, but failed. That was the reason I posted a message.
                • 5. Re: create schema Test;
                  sb92075
                  That was the reason I posted a message.
                  before posting here you should have RTFM found at htpp://tahiti.oracle.com
                  • 6. Re: create schema Test;
                    Wrong.

                    The reason was you were too lazy to look up the syntax for CREATE SCHEMA, ignoring Forums Etiquette, and abusing this discussion forum, where volunteers are answering, as a chat room.


                    ----------
                    Sybrand Bakker
                    Senior Oracle DBA
                    • 7. Re: create schema Test;
                      Lubiez Jean-Valentin
                      Hello,

                      ORA-02420
                      In fact the error code is rather explicit:

                      http://www.error-code.org.uk/view.asp?e=ORACLE-ORA-02420

                      You have to add the AUTHORIZATION clause.

                      You'll find all the detail of this clause on the link previously posted by Kamran Agayev.


                      Hope this help.
                      Best regards,
                      Jean-Valentin
                      • 8. Re: create schema Test;
                        785153
                        It was my mistaken, I read the derby tutorial and thought it was Oracle.
                        However, I have read the Oracle document and the document provides a piece of information and I ran through it.


                        CREATE SCHEMA AUTHORIZATION myuser
                        CREATE TABLE new_product
                        (color VARCHAR2(10) PRIMARY KEY, quantity NUMBER)
                        CREATE VIEW new_product_view
                        AS SELECT color, quantity FROM new_product WHERE color = 'RED'
                        GRANT select ON new_product_view TO anothername;

                        CREATE SCHEMA AUTHORIZATION myuser
                        *
                        ERROR at line 1:
                        ORA-02421: missing or invalid schema authorization identifier
                        • 9. Re: create schema Test;
                          848583
                          I think the schema name should be equal to the current user name, so please login into myuser and retry the command.


                          Thanks,

                          Balaji K.