This seemed worthy of Little Things Doth Crabby Make status mostly because I was surprised to see that Oracle Database 11g STARTUP command worked this way…
Consider the following text box. I purposefully tried to do a STARTUP FORCE specifying a PFILE that doesn’t exist. Well, it did exactly what I told it to do, but I was surprised to find that the abort happens before sqlplus checks for the existence of the specified PFILE. I ended up with a down database instance.
SQL> startup force pfile=./p4.ora ORACLE instance started. Total System Global Area 3525079040 bytes Fixed Size 2217912 bytes Variable Size 1107298376 bytes Database Buffers 2231369728 bytes Redo Buffers 184193024 bytes Database mounted. Database opened. SQL> SQL> SQL> HOST ls foo.ora ls: foo.ora: No such file or directory SQL> startup force pfile=./foo.ora LRM-00109: could not open parameter file './foo.ora' ORA-01078: failure in processing system parameters SQL> show sga ORA-01034: ORACLE not available Process ID: 0 Session ID: 737 Serial number: 5
This one goes in the don’t-do-stupid-stuff category I guess. Please don’t ask how I discovered this…
Well you discovered it by testing failure scenarios, clearly. It couldn’t possibly have been a typo/ wrong server/OH issue. It certainly wasn’t when I discovered it 😉
I’m thinking it should be an ora-1091 and the ora-1091 ought to say the reason ora-1091 was thrown.
I just have this odd feeling there are some things that could prevent a shutdown that couldn’t be predictably trapped, and force is like a NOW, DAMMIT!
The docs say:
In unusual circumstances, you might experience problems when attempting to start a database instance. You should not force a database to start unless you are faced with the following:
*
You cannot shut down the current instance with the SHUTDOWN NORMAL, SHUTDOWN IMMEDIATE, or SHUTDOWN TRANSACTIONAL commands.
*
You experience problems when starting an instance.
So the docs, at least, think you shouldn’t be forcing unless you were going to abort anyways. He-Men in testing mode don’t have to care, but don’t you think it would be a good habit for production DBA/operator/sysadmins to use a minimal-force-necessary approach in general?
Hi Joel,
Yes you are right. The post isn’t a sales pitch for the SHUTDOWN ABORT command. I’m only blogging about the fact that the pfile discovery comes after the shutdown during a STARTUP FORCE. I just always presumed the processing of the STARTUP command performed the PFILE discovery at the very earliest stages. It just so happens that it doesn’t. If you read the last sentence in my post you’ll see I’m not loosing sleep over this “discovery.”