Link to home
Start Free TrialLog in
Avatar of CSecurity
CSecurityFlag for Iran, Islamic Republic of

asked on

Oracle corrupted suddenly without logical reason

Hello

I was downloaded Oracle 10g R1 for Linux from Oracle.com 9 month ago. I installed that in a server, we was using that for testing and research stuff, we did not paid for Oracle License, just we downloaded Oracle 10g R1 from Oracle.com and installed it in a Linux server.

After 7-8 month, suddenly power problem caused shutting down server. When we started PC back, Oracle not works anymore. I'm not sure it's because of Power problem, because I scanned entire hard disk for bad sector and no any single bad sector was detected.

Before shutting down our server admin was busy with server, maybe he changed some configs, like I think he updated gcc and installed some C++ rpms.

Now when I start sqlplus with sqlplus / as sysdba command in Oracle user, I get ORACLE_HOME not set properly error.

But I have set it properly FOR SURE 100% I do echo $ORACLE_HOME and I see right data.

ORACLE_HOME ORACLE_SID etc. ALL IS SET! But I get that error. I'm for sure in oracle user (owner of oracle) and I think Oracle db is also down.

Please advice about it, what caused this error?

1) Some people said to me it's because I did not paid for Oracle license and Oracle corrupted itself because of it

2) Some people said Oracle corrupted because of that RPM updates

3) Some people said Oracle corrupted because of bad sector/power problem. But I did not detected any hardware failure.

Please advice about it. I really ONLY need to know what's wrong and what caused this problem AND IF POSSIBLE solving it. More important problem is knowing what caused this problem.

THANKS a lot from now
Avatar of nsanga
nsanga

I am not sure about your problem. But you can try this

Go to oracle "database configuration assistance"
select "configure database options"
select your database and finish the configuration wizard ( may be if values not correct update them otherwise leave them as is and just press Next).

Now try to connect using sql plus.
Avatar of CSecurity

ASKER

what command I should run? You mean dbca?
yes...try it
I tried to open dbca, but I can't. Because I cannot open dbca via ssh and via VNC, I cannot login to oracle account, when I login into VNC it directly goes into root user.
Another point:

When I login via ssh into oracle user, I get this errors:

': not a valid identifier
': not a valid identifier
': not a valid identifierD
': not a valid identifier
': not a valid identifier
': not a valid identifierD


But I have only this in .bash_profile in /home/oracle:

:/home/oracle # cat .bash_profile
ORACLE_BASE=/oracle
ORACLE_HOME=/oracle/10g
ORACLE_SID=MRC
export ORACLE_BASE
export ORACLE_HOME
export ORACLE_SID


But when I type echo $ORACLE_SID I have data in $ORACLE_SID, but I get this errors:
': not a valid identifier
': not a valid identifier
': not a valid identifierD
': not a valid identifier
': not a valid identifier
': not a valid identifierD



When I login into ssh via ssh with oracle user. Do you think this may cause problem?
Your problem has got to do with your bash profile and/or .bashrc.

Please make sure that these are free of errors or use another shell, e.g. korn shell.
I have this in all of my bashrc bash_profile and profile files.

ORACLE_BASE=/oracle
ORACLE_HOME=/oracle/10g
ORACLE_SID=MRC
export ORACLE_BASE
export ORACLE_HOME
export ORACLE_SID

This is what I have in all of them.

How can I use korn shell? I use putty (ssh) to connect and manage my server.

Thanks
echo $ORACLE_SID should not result in "': not a valid identifier", ok?

for korn shell : look for ksh, using which ksh for example. must be somewhere /bin or /sbin.

Then just call it.

Now you have a kornshell and you can set your variables as above. Donot forget to set PATH=$PATH:$ORACLE_HOME/bin
and
NLS_LANG=american_america.WE8ISO8859P15

Avatar of schwertner
Oracle 10g R1 is unstable version.
Download 10g R2

Logon as 'oracle' user.

% printenv

command will show you all environment variables.

You have to pay attention to
ORACLE_HOME
ORACLE_BASE
ORACLE_SID
PATH
I added PATH and NLS_LANG and now errors became duplicate:


': not a valid identifierSE
': not a valid identifierME
': not a valid identifierD
': not a valid identifier
': not a valid identifier
': not a valid identifierSE
': not a valid identifierME
': not a valid identifierD
': not a valid identifier
': not a valid identifier

It's my bash profile:

ORACLE_BASE=/oracle
ORACLE_HOME=/oracle/10g
ORACLE_SID=MRC
export ORACLE_BASE
export ORACLE_HOME
export ORACLE_SID
PATH=$PATH:$ORACLE_HOME/bin
export PATH
NLS_LANG=american_america.WE8ISO8859P15
export NLS_LANG



And here what I tried in korn shell:


oracle@MRC:~> ksh
oracle@MRC:/home/oracle> sqlplus / as sysdba
ksh: sqlplus: not found [No such file or directory]
oracle@MRC:/home/oracle> cd /home/oracle
oracle@MRC:/home/oracle> sh .bash_profile
': not a valid identifierport: `ORACLE_BASE
': not a valid identifierport: `ORACLE_HOME
': not a valid identifierport: `ORACLE_SID
': not a valid identifierport: `PATH
': not a valid identifierxport: `NLS_LANG
oracle@MRC:/home/oracle>


in printenv I cannot see ORACLE_HOME ORACLE_SID etc. But when I do echo $ORACLE_HOME I see correct data
And I need to add this one:

oracle@MRC:/oracle/10g/bin> emctl start
TZ set to US/Eastern
 not found. tion issue. /oracle/10g/MRC.site_MRC
oracle@MRC:/oracle/10g/bin>


Even messages is not clear... !!!
This is not a oracle installation problem. Your environment is not set properly once again!.

after running ksh, you should set your environment: ORACLE_SID, ORACLE_HOME and PATH!
Then you should be able to run sqlplus.

DoNOT run .bash_profile again! That is obviously corrupt!
Thanks a lot Yalcin. It worked! But what's wrong with my that file?! I don't want to open ksh and set that variable manually then running sqlplus, can you tell me how can I solve it and automate this process? Thanks once again!
ASKER CERTIFIED SOLUTION
Avatar of byalcin
byalcin
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a lot. Invisible character stuff was there, you solved my problem. :) Thanks