Is the environment variable LOCAL set? this will cause sqlplus to connect to a TNS alias instead of directly to the local database instance.
Your other problem with starting it into mount, you are missing a parameter to oradim -STARTTYPE srvc. All of the options can be seen by typing oradim /?
to start just the service so that you can manually start to mount use
oradim -start -sid dantest3 -starttype srvc
At this point the database will not be registered with the listener so you will still need to connect without using the listener.
Your permissions are incorrect.
Oracle recommends role separation, which it appears you've followed by creating separate oracle and grid users. But I'm willing to wager that your ORACLE_HOME is under /u01/app/database or similar, which means that the chmod and chown commands you ran also changed permissions and ownership on the database home, too. This defeated the role separation Oracle expected, and your database will not start.
The permission structure of an Oracle grid/database installation is far more complex than a simple chmod/chown can duplicate. For one thing, the database binary ($ORACLE_HOME/bin/oracle) requires a setguid bit:
chmod 6751 $ORACLE_HOME/bin/oracle
You also need to have correct ownership of the binary, which should be oracle in your case:
chown oracle:oinstall $ORACLE_HOME/bin/oracle
Those two commands may fix the problem, but I wouldn't trust that everything will work as it should. You could easily get into a situation where fixing one thing just shows you the next thing that's broken.
There are specific permissions required for binaries in the GRID_HOME that will differ (and be more restrictive) from the generic 775 applied to the root directory. Notably, the listener will not start correctly if the permissions and ownership are not correct.
Unfortunately while it may be possible to repair this manually, it is not straightforward. You may be able to correct the permissions in the grid installation with:
$GRID_HOME/crs/install/rootcrs.pl
But, it may just be easier to start from scratch, particularly if you want to avoid future issues and don't have a working installation to compare against.
The original gateway issue may have been that your environment was not set correctly. The gateway installation is applied to the database home; the path you noted is the grid home and includes the word "ASM" suggesting that you were attempting to install in the ASM (storage) database instead of the actual database. ASM is part of the grid installation and will be distinct from your working database.
Best Answer
Check if autostart for Oracle Restart is enabled:
If it is not enabled, then enable it:
Check if ASM autostart is enabled:
If ASM is not registered in GI, add it with:
Check if used diskgroups are registered:
If they are not registered, add them with:
Check if the database is registered and autostart is enabled:
If it is not, register and enable:
Finally make sure you define the used ASM diskgroups as dependencies:
You can also check the listener:
If it does not exist, you can add with:
You do not need to start or stop anything manually with sqlplus, lsnrctl. Oracle Restart takes care of that based on the defined start/stop options and dependencies.