7 Replies Latest reply on Jun 26, 2014 10:35 AM by rhisingh

    unable to insert data into a table

    rhisingh

      Hay guys this might sound strange but I have created a table in SQL workshop and when I tried to insert data into this table in the SQL workshop GUI it gave me this error error ORA-01950: no privileges on tablespace 'USERS'  .  So I think I would have to grant myself some privileges like so grant select, insert, update, delete on mytable1 to rhisingh;   . Which I tried in SQL workshop on APEX but it comes back statement not ended properly . Where and how should i execute this grant as in SQL workshop or should i SQL plus into the DB to do this relative to my user name . Thanks Guys  

        • 1. Re: unable to insert data into a table
          jariola

          Hi,

           

          You can't grant needed privileges to your self.

          Ask help from your DBA. He should know what privileges you need when ORA-01950 is raised.

           

          Or you have created table to wrong tablespace.

           

          Regards,
          Jari

          • 2. Re: unable to insert data into a table
            rhisingh

            Hay Jariola

            There is no DBA for this project  . Im doing the development as well as the DBA stuff  by my self .You mentioned something about me creating the wrong table space how would i check this . What I did was download the app from one apex set up where it was working fine regarding inserts and updates but when I imported it to this new apex set up this error came about while trying to insert . Could it be that the schema that Im working with is useing a tabl space thats not allowed   is there some way to fix this .Thank you

            • 3. Re: unable to insert data into a table
              jariola

              HI,

               

              Problem is that user rhisingh that owns table do not have quota to tablespace user or do not have unlimited tablespace privilege.

               

              That user might have quota to other tablespace, but you have defined users tablespace for table when it is created.

               

              When you create table specify correct tablespace, or grant needed privileges.

              See ORA-01950: no privileges on tablespace tips

               

               

              Regards,

               

              Jari

              • 4. Re: unable to insert data into a table
                rhisingh

                Hi Jari

                Thanks for your reply . I dont know I should  mention this or if it will help  the apex set up where i downloaded the working app from when i check the user Im under in that set up it comes back as "public_user" and when I check the user Im under in the new set up where Im having this problem of inserts it shows "ANONYMOUS"  .

                 

                when i run the following command SQL> select * from USER_TS_QUOTAS ;

                 

                TABLESPACE_NAME                     BYTES  MAX_BYTES     BLOCKS      MAX_BLOCKS DRO

                ------------------------------ ----------     ----------      ----------              ----------        ---

                USERS                                                  0                -1                          0            -1 NO

                 

                This is on the set up that's giving me the error

                • 5. Re: unable to insert data into a table
                  rhisingh

                  Hi Jari

                  I ran this after using  SQLPLUS to get into the DB where apex was running 

                  SQL> grant  ALL to PRIVILEGES TO [application phrasing schema]  .And the inserts and updates are working now . Thank you once again  

                  • 6. Re: unable to insert data into a table
                    GhanaApexDeveloper

                    HI,

                    SQL> grant  ALL to PRIVILEGES TO [application phrasing schema]  .And the inserts and updates are working now .

                    You could have also used

                     grant  unlimited tablespace TO [ username] 
                    

                    which is is more generic to any tablespace or specified

                    ALTER USER <username> QUOTA 100M ON <tablespace name>
                    

                    To direct which tablespace to use.

                    Regards

                    BEnjamin.

                    • 7. Re: unable to insert data into a table
                      rhisingh

                      hay benjamin

                      Thanks for your reply dude i really appreciate it .