alter table myschema.mytable rename to mytable_old;Change ownership for a table:
alter table myschema.mytable owner to anotherschema;
Minimalistic Oracle contains a collection of practical examples from my encounters with Oracle technologies. When relevant, I also write about other technologies, like Linux or PostgreSQL. Many of the posts starts with "how to" since they derive directly from my own personal experience. My goal is to provide simple examples, so that they can be easily adapted to other situations.
alter table myschema.mytable rename to mytable_old;Change ownership for a table:
alter table myschema.mytable owner to anotherschema;
select name from v$database; NAME --------- PRODDB01 SQL> show parameter db_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_name string PRODDB01As expected, the query from v$database it is displayed in upper case as Oracle alwaysd does by default, but we also see that the value of the parameter db_name is actually in lower case.
env | grep ORA ORACLE_SID=testdb01It is indeed shown in lower case
sqlplus / as sysdba create pfile='inittestdb01.ora' from spfile;
Old value: *.db_name='TESTDB01'New value:
*.db_name='testdb01'
sqlplus / as sysdba shutdown immediate startup
create spfile from pfile='inittestdb01.ora'; shutdown immediate startup