Pesquisar este blog


sábado, 21 de fevereiro de 2015

Titulo Novo !!! Oracle Certification - OCP 12c


Passei na prova do OCP 12c New features !

Tai o certificado !

Proximo a caminho ...

Clique aqui para continuar lendo este post...

quinta-feira, 19 de fevereiro de 2015

Bom pessoal amanha - farei minha prova do 12c !!!

Sorte para nos !
Clique aqui para continuar lendo este post...

Sistema BTRFS

O BTRFS ou better file system, e um sistema de arquivos que e disponibilizado a partir da versao 6.3 do Oracle Linux. Foi desenvolvido pela Oracle para que possamos ter mais uma opcao de um file system confiavel e de alta disponibilidade.

O BTRFS entre outras coisas podemos fazer o RAID 0, RAID 1 e o RAID 10. Obviamente, se gasta discos para a redundancia via software. O Interessante e que se voce precisar efetuar um clone do file system ou um backup pode ser feito a quente, e de quebra - copia remota para outra maquina.

BTRFS utiliza para gravacao um procedimento que se chama COPY ON WRITE que em miudos significa que ele somente grava mesmo nas operacoes de alteracao. Isso e interessante porque assim consegue fazer a replicacao sem comprometer a integridade.

Clique aqui para continuar lendo este post...

quinta-feira, 12 de fevereiro de 2015

Make Aliases on sqlplus

In first example, i can show these:
[oracle@localhost~] echo “select count(*) from tab;” | sqlplus -s username/pass
With another method, you can run from one Linux command a SQL file
 [oracle@localhost~] sqlplus -s username/pass <filename.sql

  1. alias sysdba='select status, instance_name from v\$instance; | sqlplus / as sysdba'
  2. alias sysoper='sqlplus / as sysoper'
  3. alias rman='rman target / '
Clique aqui para continuar lendo este post...

domingo, 9 de fevereiro de 2014

Change the face for SQLPLUS - Automatically display SID and connected User in Sql*Plus

Show the name of instance on startup of sqlplus

set termout off
define gname=idle
column global_name new_value gname
select lower(user)||’@’ ||substr(global_name,1,decode(dot,0,length(global_name),dot-1)) global_name from (select global_name, instr(global_name,’.') dot from global_name);
set sqlprompt ‘&gname>’
set termout on

Put this code on file “glogin.sql” in your $ORACLE_HOME/sqlplus/admin 

SQL>show user

sys@ORCL>show user

Clique aqui para continuar lendo este post...

domingo, 2 de fevereiro de 2014

Automatically startup the database when Oracle Linux Starts

To make a startup of Oracle database automatically please follow these steps.
1. First of all we’ve to change our /etc/oratab file. This file have some hints like, database name, Oracle home, and start or not - N/Y
The first field is the name of my database (orcl), the second one is my home directory (/home/oracle/product/10.2.0/Db_1), and the third indicates to the dbstart utility whether the database should, or should not be brough up at the system boot time with “Y” or “N” parameters respectively
As a root user, we’ll change last field of this line from “N” to “Y” to let dbstart utility start this database when it runs
2. This need to put one file dbora in /etc/init.d/ directory. In this script, we’ll define two variables, ORA_OWNERand ORACLE_HOME and then, we’ll start (or shutdown) our database by connecting with oracle user and running lsnrctl (Listener utility), dbstart (utility which starts the database) and dbshut (utility which shutdowns the database) utilities depending on our OS state.
This is the source of our dbora file:
case “$1″ in
 ’start’)  #If the system is starting, then …
su – $ORA_OWNER -c “$ORACLE_HOME/bin/lsnrctl start” #Start the listener
su – $ORA_OWNER -c “$ORACLE_HOME/bin/dbstart #Start the database
‘stop’)   #If the system is stops, that is we’re shutting down our OS, then …
  su -$ORA_OWNER -c $ORACLE_HOME/bin/dbshut
  su -$ORA_OWNER -c “$ORACLE_HOME/bin/lsnrctl stop”
3. Once you’ve saved your file into this directory, make sure that it’s executable by running:
chmod 750  dbora
4. Then you need to add the appropriate symbolic links to cause the script to be executed when the system goes down, or comes up. Create it with ln -s command.
# ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/K01dbora
# ln -s /etc/init.d/
dbora /etc/rc.d/rc3.d/S99dbora
# ln -s /etc/init.d/
dbora /etc/rc.d/rc5.d/K01dbora
# ln -s /etc/init.d/
dbora /etc/rc.d/rc5.d/S99dbora
Let’s analyze these commands:
The first line creates symbolic link of our script in rc3.d directory. At startup, Linux runs /etc/rc.d/rc script at the current level (normally 3 or 5). rc3.d indicates 3rd runlevel, “K” indicates OS’s shutdown (on servers shutdown, Linux calls the scripts in /etc/rc.d/rc3/K* in order)
The second line creates another symbolic link of our script, to be run at startup of our OS, indicating “S99″ and the name of our script
Another two lines creates symoblic links for 5th runlevel.
That’s all. Your script and your service is ready for use. Just restart your OS and upon startup you’ll see your newly created service running. Then open new terminal, enter you database and issue :
SQL>SELECT status FROM v$instance;
You’ll see your database’s status is OPEN
In some releases, even when we create a new service, it doesn’t work. When we issue dbstart command manually from OS, we’re getting an error:
cat: /var/opt/oracle/oratab: No such file or directory
It has simple reason and solution
If the directory /var/opt/oracle exists during the Oracle installation the dbhome script will have the parameter ORATAB set to “/var/opt/oracle/oratab” instead of “/etc/oratab”. The normal DBCA process during a default installation will still add the instance entry to /etc/oratab.
It has two solutions:
1. You can either copy the original oratab file to this directory :
cp /etc/oratab /var/opt/oracle/
2. Or you can edit dbstart and dbshut scripts, find the variable ORATAB, and you’ll find that it’s addressing to  /var/opt/oracle/oratab file. Just change it to /etc/oratab
Clique aqui para continuar lendo este post...

quarta-feira, 27 de julho de 2011

Problemas instalação windows - senha enteprise manager

Ao fazer operações no enteprise manager - da erro de senha do usuario windows mas ele está correto.

Para corrigir isso temos que fazer o post install do windows:

4.3.12 Setting Credentials for the Job System to Work with Enterprise Manager

Windows systems require that you set the correct credentials for the Jobs system to work properly in Enterprise Manager. By default, the Management Agent service is installed as a LocalSystem user. When submitting jobs, such as stopping or starting the database, the user submitting the job must have the Log on as a batch job privilege enabled.
Perform the following steps to establish that privilege for any operating system user who needs to submit an Enterprise Manager job.
  1. Start the Local Security Policy tool:
    • Windows 2000: From the Start menu, select Control Panel, Administrative Tools, then Local Security Policy.
    • Windows 2003: From the Start menu, select Administrative Tools, then Local Security Policy.
    • Windows XP: From the Start menu, select Control Panel, Administrative Tools, then Local Security Policy.
    • Windows Vista: From the Start menu, select Programs, Administrative Tools, then Local Security Policy.
  2. Under the Security Settings list, expand the list to Local Policies.
  3. Under Local Policies, double-click User Rights Assignment.
  4. Under Policy, search for the Log on as a batch job policy.
    If the Management Agent service is installed as any other user (that is, not LocalSystem), then, in addition to granting the Log on as a batch job privilege, you must grant the "Windows service" user the following three privileges:
    • Act as part of the operating system
    • Adjust memory quotas for a process (This setting is named Increase memory quotas on Windows 2000.)
    • Replace a process level token
  5. With each policy, perform the following steps:
    1. Double-click the policy name.
    2. In the Properties dialog box, click Add User or Group.
    3. In the Select Users or Groups dialog box, enter the name of the user (for example, jsmith, administrator, and so on.)
      On Windows Vista, the name of the dialog box is Select Users, Computers, or Groups.
    4. Click Check Names to check that you have entered the name correctly.
    5. Click OK.
  6. Click OK to exit the Properties dialog box, then exit Local Security Settings and Administrative Tools.
  7. Restart your computer.
If a user exists locally and at the domain level, Windows gives the local user precedence. To use the domain user, qualify the user name with the domain name. For example, to use the user joe in the ACCOUNTS domain specify the user name as ACCOUNTS\joe.

Clique aqui para continuar lendo este post...