Cannot start Oracle-XE 18c due to being full - oracle

I am unable to start a container inside oracel 18c xe , when using command "Alter Datbase Open" it gives error
"ORA-12954: The request exceeds the maximum allowed database size of 12 GB"
Upon searching internet i have found a way which says
"The only way was to append the XE datafiles in a "auxiliary" Oracle 18c home"
But i am unable to understnad how to mount only single tablespace from my xe database into Home version and remove not required stuff from the tablespace to free up space. Any help regarding this is appreciated

There is a bug in Oracle XE which allows a BigFile tablespace being created in a container DB and grow beyond the DB size limit imposed by Oracle Express Edition. The bug is fixed on version 19.1.0.
Unfortunately there is no workaround for this bug.
You might try to open the database with the problematic tablespace in OFFLINE and perform the following actions:
1.Start the database in mount state
SQL> STARTUP MOUNT
2.Put the tablespace in offline,
SQL> ALTER TABLESPACE xxxxx OFFLINE IMMEDIATE;
3.Open the database
SQL> ALTER DATABASE OPEN ;
In this status, the problematic tablespace is offline, so you can't access any element on it. Remove everything you don't need from other tablespaces ( USERS , etc) and resize others to a lower size ( UNDO , TEMP, SYSTEM ), if possible. Then, try also to resize the problematic datafile ( if the data is beyond the HWM it won't work ).
Finally, put the tablespace that was offline online again and see if the total size of the database is lower than the limit. Then try to open the database.

Related

Is it possible to customize default tablespaces when installing Oracle Database 12c?

I'm having trouble with an Oracle Database 12c Release 1 install for Linux. I am expecting to see a 'DATA01' tablespace and 'INDEX01' tablespace after I finish installation and database setup.
I follow the guide at this link https://oracle-base.com/articles/12c/oracle-db-12cr1-installation-on-oracle-linux-7. After the install I end up with the following default tablespaces: SYSTEM , SYSAUX , USERS , UNDOTBS1 , and TEMP.
Am I missing some customization steps to get the 'DATA01' and 'INDEX01' tablespaces to show up or should I not expect those additional tablespaces?
I am expecting to see a 'DATA01' tablespace and 'INDEX01' tablespace after I finish installation and database setup.
Why are you expecting that? Default installation installs default tablespaces. If you want to take control over it, create the database yourself, starting with create database command.
It allows you to specify default (that would be your data01), temporary and undo tablespaces. Index (or any other) tablespace is added separately with create tablespace command. Nowadays, it is usual to let Oracle handle that itself. Previously, people did create separate tablespaces for data and indexes to improve performance, but today that's not to be done.
Finally, this question should probably be placed on SE DBA, not here (as we're mostly developers).

How to start Oracle 12c database when table space file was accidentally deleted

I've accidentally deleted a tablespace file and now Oracle 12c will not open.
How can I remove this tablespace from oracle without the database being open?
If you have deleted the datafiles then you have to restore it from the physical backup if you don't want loose data.
Performing Complete Recovery of a Tablespace
The datafiles information is checked by Oracle during open database process. It means you can mount the database and make the datafile offline.
ALTER DATABASE DATAFILE 'path to datafile' OFFLINE;
ALTER DATABASE OPEN;
ALTER DATABASE DATAFILE '/u02/oracle/rbdb1/stuff01.dbf' OFFLINE;

Removing user-created datafile from SYSTEM tablespace in Oracle

While attempting to create a replacement tablespace for USER, I accidentally created a datafile in SYSTEM
Too many applications are using the database to bring down the entire database, and people will get hurt if these applications are not running.
Is there a way for me to remove the datafiles from the SYSTEM tablespace without bringing it down?
I tried:
ALTER TABLESPACE SYSTEM DROP DATAFILE 'path_here.dbf'
but get this error:
Error starting at line 1 in command:
alter tablespace system drop datafile 'path_here.dbf'
Error report:
SQL Error: ORA-01541: system tablespace cannot be brought offline; shut down if necessary
01541. 00000 - "system tablespace cannot be brought offline; shut down if necessary"
*Cause: Tried to bring system tablespace offline
*Action: Shutdown if necessary to do recovery
From the Oracle 11.1 documentation
You cannot drop datafiles in the SYSTEM tablespace.
However you can resize data files.

oracle database cloning

i tried to clone one of my database in one machine to another machine.
the procedure is right i guess its getting mounted but am unable to go to open state.its showing errors as below.
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist
would anyone suggest me what the exact pblm is?
Thanks in advance!
perhaps this might help you:
Cause of your problem:
Some datafiles are offline.
ORACLE instance terminated. Disconnection forced so this might cause the datafiles to be offlined
Solution:
Check if you have a good backup from which you can restore any problematic data file.
1) first restore the problematic datafile.
2) mount the database
SQL > recover database;
And then try to open the database
SQL > alter database open ;
3) Try to find if there are any offline files by checking the recover_file.
SQL> select * from v$recover_file;
For example:-
11 OFFLINE OFFLINE
2489793132
30-JAN-09
20 OFFLINE OFFLINE
2489793132
4) Recover the offline datafiles that were appearing from above select statement,
i.e.
SQL> recover datafile 11,20;
Media recovery complete.
5) Bring these datafiles back online,
i.e
SQL> alter database datafile 11,20 online;
Database altered.
6) To ensure no more files just check again the recover_file view, then you can safely open the database
SQL> select * from v$recover_file;
no rows selected
Hope this helps.
Did you also clone your Oracle home?
If yes, make sure your update your pfile/spfile with your new server name.
Also, don't forget listener.ora.
Hope this helps.

Oracle dba_data_files table doesn't exist

I've been trying to access the dba_data_files table to see whether the autoextend is turned on for my data files. However, even though I'm using Oracle 10g, this table seems to not exist:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select * from dba_data_files;
select * from dba_data_files
*
ERROR at line 1:
ORA-00942: table or view does not exist
Is there some other way to check and even change whether a data file for a particular tablespace has the autoextend option turned on?
You should make sure you're connecting with an account that has privileges to see this view - try the SYSTEM account if you have that password, otherwise have your DBA grant the SELECT_CATALOG_ROLE to the account you are using.
You should be able to do this through the oracle enterprise manager under Administration

Resources