Reputation: 2633
I'm new to oracle. I run a batch file file to create a db in the oracle. Now i want to check whether the database was created or not. When i try to login through the sqlplus. it's asking the username and password but it's saying invalid. So can you give me some other way to check it!!
Upvotes: 0
Views: 856
Reputation: 35401
Normally a batch job will produce some form of log file. Go look.
Because you haven't specified which OS, I'll assume Linux or other *nix variant. Windows is a black hole that sucks all life from a computer leaving nothing but a cold, dark husk. [Okay, I lie. But it doesn't have as rich a command line interface so it is hard to give instructions. Especially without information like edition and versions. "Look for the icon a bit like an oil drum and click it until something happens" makes user support on Windows a nightmare.]
I like updatedb and locate. They find your files so you don't have to remember where you put them. They are very good if you are taking over a system and someone has put files somewhere and not left a map. You may have to do a sudo (especially if it isn't installed). Run updatedb, go get a coffee. It should be finished when you come back.
Do a locate system.dbf
That should give you a good idea of where the database might be. If it can't find one, you probably don't have a database. I'm guessing you have since, when you try to log in, it is saying 'invalid username or password', so it is probably actually checking them somewhere.
Now check whether you have an instance. ps -ef | grep smon
is my favourite. You should get something like 'ora_smon_blub' where blub is the SID of the instance.
If you have an instance (and again, if it is complaining about passwords, you probably do), try sqlplus / as sysdba
. If you are allowed to create databases, that should get you in.
Then slowly work your way through the "2-Day DBA" guide. If it takes less than 2 days, read it a second time.
Upvotes: 1