ORA-00845: 11G linux MEMORY_TARGET not supported on this system

Acontece que ao logar com o usuário sys no sql plus aparece a mensagem: Connected to an idle instance.

oracle@srv-db-01:/u01/app/oracle/product/11.2.0/db_1/dbs$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 23 11:23:42 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> conn sys@oracle as sysdba
Enter password:

SQL> conn sys / as sysdba
Enter password:
Connected to an idle instance.





Subindo banco

SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system



Para resolver o problema editei o arquivo init.ora da instância orcl:

nano oracle@srv-db-01:/u01/app/oracle/product/11.2.0/db_1/dbs/init.ora



Agora alteraremos  o memory_target de 1GB para 500M

memory_target=500M



Logue novamente no sqlplus, vamos iniciar o banco com o arquivo init.ora que alteramos:

SQL> startup pfile=’/u01/app/oracle/product/11.2.0/db_1/dbs/init.ora’

ORACLE instance started.

Total System Global Area 523108352 bytes
Fixed Size 1337632 bytes
Variable Size 314574560 bytes
Database Buffers 201326592 bytes
Redo Buffers 5869568 bytes
Database mounted.
Database opened.



Finalizando Criaremos agora o spfile apartir do arquivo  init.ora, que modificamos o memory_target, para que na proxima inicializacao ele ja carregue com os novos parametros sem precisar setar o arquivo pfile:

SQL> create spfile from pfile=’/u01/app/oracle/product/11.2.0/db_1/dbs/init.ora’

File created.

Veja mais dicas sobre oracle aqui.

Oracle distinct sql- Distinct eliminando linhas duplicadas dos resultados

O sql possui a palavra chave distinct que pode ser muito útil na otimização das consultas sql, abaixo mostraremos um exemplo de uso:

sqlplus> select nrdepto from empregados;

nrdepto
______
         10
         20
         30
         10
         40
         40
Na consulta acima ele mostra o departamentos repetido por existir departamento com mais de um funcionario no banco e usando a palavra chave distinct iremos eliminar as linhas duplicadas do resultado.


sqlplus> select  distinct nrdepto from empregados;

nrdepto
______
         10
         20
         30
         40
       


Veja mais dicas sobre oracle aqui.
 

ORACLE_HOME: Setando a variavel ORACLE_HOME NO LINUX:

Nessa dica rápida irei mostra como setar a variável ambiente do oracle no linux:

oracle@databasesrv:# ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1

Exportando a variável para que ela ficque global e todos os usuários da maquina tenham acesso:

oracle@databasesrv:# export ORACLE_HOME

Verificando a variável:

oracle@databasesrv:# echo $ORACLE_HOME


Veja mais dicas sobre oracle aqui.

Oracle Listner- Inicializando o listner do oracle 11G

Essa pequena dica de como iniciliazar listner do oracle no linux ou no windows, mais indicado quando esta se usando o linux sem ambiente grafico:

Windows via prompt de comando:

E:\lsnrctl


E:\app\nobrega\product\11.2.0>lsnrctl

LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 22-SET-2011 18:12
:39

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Bem vindo ao LSNRCTL, digite "help" para obter informações.

LSNRCTL> start


Linux via prompt de comando:

oracle@databasesrv:# cd $ORACLE_HOME/bin

oracle@databasesrv:# ./lsnrctl


LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 22-SEP-2011 17:54:13

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> start

Starting /u01/app/oracle/product/11.2.0/dbhome_1//bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/srv-db-01/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                22-SEP-2011 17:54:55
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/srv-db-01/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
The listener supports no services
The command completed successfully


Veja mais dicas sobre oracle aqui.

oracle error- ORA-00325: archived log for thread string, wrong thread # string in header


ORA-00325:

archived log for thread string, wrong thread # string in header
Cause:The archived log is corrupted or for another thread. Can not use the log for applying redo.
Action:Find correct archived log.

oracle error- ORA-00324: log file 'string' translated name 'string' too long, string characters exceeds string limit


ORA-00324:

log file 'string' translated name 'string' too long, string characters exceeds string limit
Cause:the translated name for a log file is too long.
Action:Choose a untranslated name that yields a shorter translated name.

oracle error- ORA-00323: Current log of thread string not useable and all others need archiving


ORA-00323:

Current log of thread string not useable and all others need archiving
Cause:Attempt to open thread failed because it is necessary to switch redo generation to another online log, but all the other logs need to be archived before they can be used.
Action:Archive the logs for the thread then retry open.

oracle error- ORA-00322: log string of thread string is not current copy


ORA-00322:

log string of thread string is not current copy
Cause:Check of log file header at database open found that an online log appears to be an incorrectly restored backup.
Action:Restore correct file or reset logs.

oracle error- ORA-00321: log string of thread string, cannot update log file header


ORA-00321:

log string of thread string, cannot update log file header
Cause:Cannot write to the log file.
Action:Restore the access to the file.

oracle error- ORA-00319: log string of thread string has incorrect log reset status


ORA-00319:

log string of thread string has incorrect log reset status
Cause:Check of log file header at database open found that an online log has log reset data that is different from the control file. The log is probably an incorrectly restored backup.
Action:Restore correct file or reset logs.

oracle error- ORA-00320: cannot read file header from log string of thread string


ORA-00320:

cannot read file header from log string of thread string
Cause:The file is not available.
Action:Restore the log file.

oracle error- ORA-00318: log string of thread string, expected file size string doesn't match string


ORA-00318:

log string of thread string, expected file size string doesn't match string
Cause:On header read the file size indicated in the control file did not match the file size contained in the log file.
Action:Restore correct file or reset logs.

oracle error- ORA-00317: file type string in header is not log file


ORA-00317:

file type string in header is not log file
Cause:This is not an archived log file.
Action:Find the correct file and try again.

ORA-00316: log string of thread string, type string in header is not log file


ORA-00316:

log string of thread string, type string in header is not log file
Cause:The online log is corrupted or is an old version.
Action:Find and install correct version of log or reset logs.

oracle error- ORA-00315: log string of thread string, wrong thread # string in header


ORA-00315:

log string of thread string, wrong thread # string in header
Cause:The online log is corrupted or is an old version.
Action:Find and install correct version of log or reset logs.

oracle error- ORA-00314: log string of thread string, expected sequence# string doesn't match string


ORA-00314:

log string of thread string, expected sequence# string doesn't match string
Cause:The online log is corrupted or is an old version.
Action:Find and install correct version of log or reset logs.

oracle error- ORA-00313: open failed for members of log group string of thread string


ORA-00313:

open failed for members of log group string of thread string
Cause:The online log cannot be opened. May not be able to find file.
Action:See accompanying errors and make log available.

oracle error- ORA-00312: online log string thread string: 'string'


ORA-00312:

online log string thread string: 'string'
Cause:This message reports the filename for details of another message.
Action:Other messages will accompany this message. See the associated messages for the appropriate action to take.

oracle error- ORA-00311: cannot read header from archived log


ORA-00311:

cannot read header from archived log
Cause:An I/O error occurred when attempting to read the log file header from the specified archived redo log file.
Action:Other messages will accompany this message. See the associated messages for the appropriate action to take.

oracle error- ORA-00310: archived log contains sequence string; sequence string required


ORA-00310:

archived log contains sequence string; sequence string required
Cause:The archived log is out of sequence, probably because it is corrupted or the wrong redo log filename was specified
Action:Specify the correct redo log file; then retry the operation.

oracle error- ORA-00309: log belongs to wrong database


ORA-00309:

log belongs to wrong database
Cause:The system cannot access the archived redo log because it belongs to another database.
Action:Specify the correct redo log file, then retry the operation.

oracle error- ORA-00308: cannot open archived log 'string'


ORA-00308:

cannot open archived log 'string'
Cause:The system cannot access a required archived redo log file.
Action:Check that the off line log exists, the storage device is online, and the archived file is in the correct location. Then attempt to continue recovery or restart the recovery session.

oracle error- ORA-00307: requested INSTANCE_NUMBER out of range, maximum is string


ORA-00307:

requested INSTANCE_NUMBER out of range, maximum is string
Cause:The initialization parameter INSTANCE_NUMBER specified a number that was out of range.
Action:Change INSTANCE_NUMBER to a valid range and restart the instance. The minimum value is one and the maximum value is the lower of the operating system-specific maximum or the MAXINSTANCES option specified in the CREATE DATABASE statement. See also your operating system-specific Oracle documentation.

oracle error- ORA-00306: limit of string instances in this database


ORA-00306:

limit of string instances in this database
Cause:Starting this instance would exceed the maximum number of instances allowed for this database. This message occurs only with STARTUP shared and multiple instances.
Action:You cannot start more than the lower of a) port-specific limit as to the number of instances b) the number of instances specified at create-database time

oracle error -- ORA-00305: log string of thread string inconsistent; belongs to another database

ORA-00305:

log string of thread string inconsistent; belongs to another database
Cause: The database ID in the redo log file does not match the database ID in the control file. This redo log file is not from the current database.
Action: Specify the correct redo log file, then retry the operation.

oracle error -- ORA-00304: requested INSTANCE_NUMBER is busy

ORA-00304:

requested INSTANCE_NUMBER is busy
Cause: An instance tried to start by using a value of the initialization parameter INSTANCE_NUMBER that is already in use.
Action: Either a) specify another INSTANCE_NUMBER, b) shut down the running instance with this number c) wait for instance recovery to complete on the instance with this number.

oracle error -- ORA-00303: cannot process Parallel Redo

ORA-00303:

cannot process Parallel Redo
Cause: A redo log containing Parallel Redo has been detected. The current Oracle release cannot process this format of redo.
Action: Use a later release that supports Parallel Redo. to process this log.

oracle error -- ORA-00298: Missing or invalid attribute value

ORA-00298:

Missing or invalid attribute value
Cause: A non-zero integer value is required when the following keyword attributes are specified: TIMEOUT, EXPIRE, DELAY, NEXT
Action: Correct the syntax and retry the command.

oracle error -- ORA-00297: must specify RECOVER DATAFILE LIST before RECOVER DATAFILE START

ORA-00297:

must specify RECOVER DATAFILE LIST before RECOVER DATAFILE START
Cause: The RECOVER DATAFILE START command was issued, but no RECOVER DATAFILE LIST commands had been issued. This only happens when doing recovery with Recovery Manager, and is an internal error in Recovery Manager, because Recovery Manager should always issue RECOVER DATAFILE LIST before RECOVER DATAFILE START.
Action: Contact customer support