The database status must be 'MOUNTED' or 'OPEN'

I am getting the following error when trying to run an oracle db backup

The database status must be 'MOUNTED' or 'OPEN' when performing backups. Mount the database, and then run the job again.

How do a check the status of the database?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
If you got that error the database is either down or in nomount.

Don't know of a way to check the status.  If it is down, there isn't anything to query to check.

If you can connect and it is at least mounted:
select open_mode from v$database;
Alex [***Alex140181***]Software DeveloperCommented:
if this gives no result at all then the DB is down:
ps -ef | grep pmon

Open in new window

If you're able to connect, follow slightwv (plus you also may query the v$instance view).
DavidSenior Oracle Database AdministratorCommented:
The database instance has to be "up" and available for a backup to run.  Your question suggests you don't yet know why the database was NOT up.  It should be obvious from the alert_<sid>.xml log.  Also, if this is an existing system, what changed?

For example, if you're using an O/S script to start the backup, does the script include commands to stop (shutdown) the database, or did something else cause that.

The one exception to an up system is for an O/S backup (such as a UNIX fbackup), but O/S backups aren't very useful for database restoration.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Geert GOracle dbaCommented:
i'd use rman,
just add the command startup mount to your backup script

startup mount;
backup as compressed backupset database;

Open in new window

rman target / @backup_script.sql
you might want to set the output path of your backup files
Alex [***Alex140181***]Software DeveloperCommented:
That's the point, Geert. Actually we do not know, how and what the asker is using / executing...
Geert GOracle dbaCommented:
i know, we don't know :)
slightwv (䄆 Netminder) Commented:
>>The database instance has to be "up" and available for a backup to run.

Not necessarily.  RMAN and other tools can do a cold backup.
DavidSenior Oracle Database AdministratorCommented:
>> Not necessarily.  RMAN and other tools can do a cold backup

Yes, though in the context of this question, I didn't want to confuse things.  Hopefully the asker will return on Monday.
Geert GOracle dbaCommented:
if it's down, a file copy works just as easy
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.