De Wiki inetshell
Saltar a: navegación, buscar
(Operaciones)
 
Línea 128: Línea 128:
 
----------
 
----------
 
  151749632
 
  151749632
 +
</pre>
 +
 +
== Configurar cliente Oracle para mostrar correctamente caracteres ==
 +
http://www.stumx.info/2015/01/de-inicializacion-de-parametros-en.html
 +
 +
Definir variable de entorno
 +
<pre>
 +
NLS_LANG=MEXICAN SPANISH_MEXICO.WE8MSWIN1252
 
</pre>
 
</pre>

Revisión actual del 00:12 11 jul 2019

Instalacion de Oracle Server

Instalar 12c en Linux

https://www.tecmint.com/install-oracle-database-12c-on-centos-7/

https://www.nodalpoint.com/devops-ansible-oracle-database-oraclelinux-7-vagrant/

Instalar Oracle 12c desde Docker

https://container-registry.oracle.com/pls/apex/f?p=113:4:::NO:4:P4_REPOSITORY,AI_REPOSITORY,AI_REPOSITORY_NAME,P4_REPOSITORY_NAME,P4_EULA_ID,P4_BUSINESS_AREA_ID:9,9,Oracle%20Database%20Enterprise%20Edition,Oracle%20Database%20Enterprise%20Edition,1,0&cs=3F2VQCFZHBXswAEMQj30hCDPn7tJ3gxeDGQOQ60fD7IPMtfilKUaeHdUJQYcH2R2yMnv5CrPO3pdIIC0WijEZmw

  • Credenciales por defecto: sys/Oradoc_db1
docker login container-registry.oracle.com
docker pull container-registry.oracle.com/database/enterprise:12.2.0.1
docker run -d -it --name oracle01 -p 1521:1521 -p 5500:5500 container-registry.oracle.com/database/enterprise:12.2.0.1
docker exec -it oracle01 bash -c "source /home/oracle/.bashrc; sqlplus /nolog"
docker exec -it oracle01 bash
docker exec -it --user=root oracle01 bash
  • Para iniciar con SQLPLUS:
sqlplus sys/Oradoc_db1@ORCLCDB as sysdba

Instalar Oracle 11g desde Docker

https://github.com/wnameless/docker-oracle-xe-11g

Instalar Oracle Client

Instalar Oracle 12c Client desde cmd

https://pierreforstmanndotcom.wordpress.com/2013/07/29/how-to-install-oracle-client-12-1-on-windows-in-silent-mode/

powershell -Command "expand-archive -Path 'c:\ODTwithODAC121012.zip' -DestinationPath 'c:\ODTwithODAC121012'"
del /F /Q c:\ODTwithODAC121012.zip
cd c:\ODTwithODAC121012
setup -silent "ORACLE_BASE=c:\oracle" "ORACLE_HOME=c:\oracle\oc121" "ORACLE_HOME_NAME=oracle121_x86" "oracle.install.IsBuiltInAccount=true" "INSTALL_TYPE=Administrator" "oracle.installer.autoupdates.option=SKIP_UPDATES"

Configurar Instant Client

https://www.krenger.ch/blog/oracle-instantclient-tnsnames-ora-location/

https://sodeve.net/2009/08/how-to-connect-tora-to-oracle-database/

TNS_ADMIN=/opt/oracle/instantclient_11_2/

Operaciones

Cambiar contraseña

https://www.quora.com/How-do-I-change-the-system-password-of-an-Oracle-Database-11g

alter user sys identified by "SECRETO!";

Verificar el estado del LISTENER

lsnrctl status

Restablecer password

https://community.oracle.com/thread/899559?start=0&tstart=0

  • Hay que asegurarse de que la autenticacion de Windows esta activa (NTS)

http://dba-oracle.com/bk_sqlnet_authentication_services.htm

sqlplus /nolog
connect / as sysdba
Once connected, you can change the SYS password to something you know:
ALTER USER sys IDENTIFIED BY new_password;

Errores conocidos

ORA-12638

El cliente de oracle no inicia correctamente.

Se debe a que se intenta usar inicio de sesion con Windows, hay que desactivarlo.

Please change the sqlnet.ora file in the $ORACLE_HOME/network/admin directory. Change the following entry and the ORA-12638 error will disappear:

Change - SQLNET.AUTHENTICATION_SERVICES= (NTS)

To: - SQLNET.AUTHENTICATION_SERVICES= (NONE)

http://www.dba-oracle.com/t_ora_12638_credential_retrieval_failed.htm

ORA-65096

ORA-65096: create 12c user without c## prefix

http://www.dba-oracle.com/t_ora_65096_create_user_12c_without_c_prefix.htm

alter session set "_ORACLE_SCRIPT"=true;

create user fred identified by flintstone;

grant dba to pubs; 

Optimizacion

Configurar memoria

https://docs.oracle.com/database/121/ADMIN/memory.htm#ADMIN11011

https://logicalread.com/oracle-11g-crucial-initialization-parameters-mc02/#.W-Q0auJRfIU

https://docs.oracle.com/database/121/ADMQS/GUID-E6784230-0A0C-443D-8537-36FFA08A7E75.htm#ADMQS12039

SQL> SHOW PARAMETER TARGET

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
archive_lag_target                   integer     0
db_big_table_cache_percent_target    string      0
db_flashback_retention_target        integer     1440
fast_start_io_target                 integer     0
fast_start_mttr_target               integer     0
memory_max_target                    big integer 2G
memory_target                        big integer 2G
parallel_servers_target              integer     16
pga_aggregate_target                 big integer 0
sga_target                           big integer 0
target_pdbs                          integer     0

SQL> select value from v$pgastat where name='maximum PGA allocated';

     VALUE
----------
 151749632

Configurar cliente Oracle para mostrar correctamente caracteres

http://www.stumx.info/2015/01/de-inicializacion-de-parametros-en.html

Definir variable de entorno

NLS_LANG=MEXICAN SPANISH_MEXICO.WE8MSWIN1252