sábado, 4 de dezembro de 2010

The SELECT INTO Clause

The SELECT INTO clause of SQL is used to retrieve one row or set of columns from the Oracle database.  The SELECT INTO is actually a standard SQL query where the SELECT INTO clause is used to place the returned data into predefined variables. 

 

SQL> declare

  2    v_authName author.author_last_name%type;

  3  begin

  4    select

  5      author_last_name into v_authName

  6    from

  7      author

  8    where

  9      author_key = 'A103';

10

11    dbms_output.put_line('Name: '||v_authName);

12  end;

13  /

 

Name: weaton

Here the author_key was used to retrieve one author's last name and place it in the variable called v_authName.  The query can also retrieve an entire row as a record with SELECT INTO. 

In the example below a record based on the columns of the author table is declared in line two below.  Because v_author is declared as an author table %rowtype , you can safely use the SELECT * clause to retrieve all the columns.

 

SQL> declare

  2    v_author author%rowtype;

  3  begin

  4    select

  5      * into v_author

  6    from

  7      author

  8    where

  9      author_key = 'A103';

10

11    dbms_output.put_line('Name:   

             '||v_author.author_first_name||' '||

                v_author.author_last_name);

12  end;

13  /

 

Name: erin weaton

 

If the DBA adds a column to the author table, the query above will still execute.  The record variable v_author contains a record that includes all the columns in the author table.  If the value of a column in the table is NULL, it will also be NULL in the record.  The individual columns are accessed using the dot "." notation with SELECT INTO. 

You can see this in line 11 of the listing.  Although it is important to define variables using the database datatype definition of the retrieved data, sometime this is not possible. 

This is shown in the example below.

 

SQL> declare

  2    v_totalName varchar2(80);

  3  begin

  4    select

  5      initcap(author_last_name||',

                             '||author_first_name)

           into v_totalName

  6    from

  7      author

  8    where

  9      author_key = 'A105';

10    dbms_output.put_line('Name: '||

         v_totalName);

11  end;

12  /

 

Name: Withers, Lester

 

The query above is returning a string value created from multiple table columns.  The variable v_totalname must be defined as a datatype that can hold the composite string returned by the query.  If the SELECT INTO clause attempts to load a value into a variable that is the wrong datatype, or not large enough to contain the value, an exception is raised.

Although a SELECT INTO  can only return one row of data, SELECT INTO can return multiple columns into multiple variables.  In the example below, two columns are selected from a table and loaded into two predefined variables.

 

SQL> declare

  2    v_lname author.author_last_name%type;

  3    v_fname author.author_first_name%type;

  4  begin

  5    select

  6      author_first_name, author_last_name

  7      into v_fname, v_lname

  8    from

  9      author

10    where author_key = 'A108';

11

12    dbms_output.put_line('Name: '||v_fname||'

'||v_lname);

13  end;

14  /

 

Name: minnie mee

 

A single row of column values is loaded into the list of variables when multiple columns are selected.  The order of the columns and the order of the variables must match when using the SELECT INTO clause.

In each example so far, the restriction defined in the query's WHERE clause has been based on a primary key.  Using a unique or primary key is important as the SELECT INTO clause can not retrieve more that one row of data.  If the query returns more that one row an exception is thrown  

SQL> declare

  2    v_authName author.author_last_name%type;

  3  begin

  4    select

  5      author_last_name into v_authName

  6    from

  7      author

  8    where

  9      author_state = 'MO';

10    dbms_output.put_line('Name: '||v_authName);

11  end;

12  /

 

declare

*

ERROR at line 1:

ORA-01422: exact fetch returns more than requested number of rows

ORA-06512: at line 4

 

The above example retrieved the authors from the author table with an author_state of 'Missouri'.  There are three authors in the author table from Missouri and the SELECT INTO  raised a TOO_MANY_ROWS   exception.

Another issue with using SELECT INTO statement is that SELECT INTO throws an exception is it fails to return at least one rows.

 

SQL> declare

  2    v_authName author.author_last_name%type;

  3  begin

  4    select

  5      author_last_name into v_authName

  6    from

  7      author

  8    where

  9      author_state = 'FL';

10    dbms_output.put_line('Name: '||v_authName);

11  end;

12  /

declare

*

ERROR at line 1:

ORA-01403: no data found

ORA-06512: at line 4

 

Here the query asks for authors from Florida.  Since there are not any authors in the table from Florida, the SELECT INTO raises a NO_DATA_FOUND exception exception" .  Your PL/SQL code should be written in such a way that it is able to handle these exceptions.  Anytime the SELECT INTO raises an exception, the query will not load a value into the defined variable. 

When you try and access the variable, you will either get another exception or worse, use an old or invalid variable value.  So using the SELECT INTO query can be problematic.  However since a SELECT INTO query can return one and only one row of data, it makes a perfect PL/SQL function.  Within the function, your code can catch and handle the possible exceptions.   

Below is an example of wrapping the SELECT INTO   query in a function with exception handling.

 

SQL> create or replace function auth_Name

  2    ( v_auth_state IN author.author_state%type)

  3    return varchar2

  4  as

  5    v_authName author.author_last_name%type;

  6  begin

  7    select

  8      author_last_name into v_authName

  9    from

10      author

11    where

12      author_state = v_auth_state;

13    return v_authName;

14    exception

15    when TOO_MANY_ROWS

16      then return 'Too Many Authors in that

                      State';

17    when NO_DATA_FOUND

18      then return 'No Authors in that State';

19    when others

20      then raise_application_error(

21      -20011,'Unknown Exception in authName

                 Function');

22  end;

23  /

 

Function created.

 

Notice when the function code catches an exception it must handle it and return something appropriate or pass the exception back to the calling block.  In the above example, the code catches and handles the TOO_MANY_ROWS and NO_DATA_FOUND exception  , which should cover most of the exceptions the function will encounter.

 

http://www.rampant-books.com/book_2005_1_easy_plsql.htm

Failed Login Attempts

Na instalação do Oracle 10 o parâmetro FAILED_LOGIN_ATTEMPTS é definido como 10, isso faz com que a cada conexão errada seja incrementado um ao contador e quando ele chega a 10 tentativas erradas o oracle bloqueia o usuário, essa situação deve ser analisada pelos DBAs e caso seja necessário esse parâmetro pode ser definido como UNLIMITED.

Verificar Tabela "Lockada"

SELECT 'LOCK TABLE' LOCK_STATE,
       'COR_IDF' TABELA,
       L.SESSION_ID,
       L.ORACLE_USERNAME,
       S.STATUS,
       S.OSUSER,
       S.MACHINE,
       S.PROGRAM,
       S.MODULE,
       S.LOGON_TIME,
       S.STATE
  FROM V$LOCKED_OBJECT L,
       V$SESSION       S
WHERE L.OBJECT_ID = (SELECT OBJECT_ID FROM USER_OBJECTS O WHERE OBJECT_NAME ='COR_IDF')
   AND S.SID = L.SESSION_ID

Verificando as sessões de um usuário

select SID,
       STATUS,
       SCHEMANAME,
       OSUSER,
       MACHINE,
       PROGRAM,
       MODULE,
       ACTION,
       LOGON_TIME
  From v$session where username = 'FISC33'

Identificação de Constraints e Índices

--IDENTIFICAÇÃO DE CONSTRAINTS FORA DO PADRÃO SYNCHROSELECT DISTINCT TABLE_NAME, CONSTRAINT_NAME, INDEX_NAME  FROM USER_CONSTRAINTS
WHERE (CONSTRAINT_NAME LIKE 'BON%'
OR INDEX_NAME LIKE 'BON_%')
AND TABLE_NAME NOT LIKE 'BON_%'
--IDENTIFICAÇÃO DE ÍNDICES FORA DO PADRÃO SYNCHROSELECT * FROM User_Ind_Columns where index_name = 'BON_LFIS_IDF_IMPOSTO_UK'
SELECT A.TABLE_NAME, A.INDEX_NAME, A.COLUMN_NAME, B.UNIQUENESS FROM  USER_IND_COLUMNS A , USER_INDEXES B
WHERE A.INDEX_NAME LIKE 'BON_%'
AND A.TABLE_NAME NOT LIKE 'BON_%'
AND A.INDEX_NAME = B.INDEX_NAME

Lixeira do Oracle - Recyclebin

Todas os objetos dropados no banco são enviados para a lixeira do oracle.
Para dropar uma tabela definitivamente:   drop <table> purge
Para limpar a lixeira do oracle       :   purge recyclebin
Para verificar a lixeira do oracle    :   show recyclebin
Para apagar um objeto da lixeira      :   purge <nome_do_objeto na recyclebin>

Verificar Andamento das Cargas

  SELECT '1' ID,'INTERMEDIÁRIA' AS TABELA,
         TO_CHAR(COUNT(1),'9G999G999') || ' Registros' TOTAL,
         MSG_CRITICA
    FROM SAP_ITF_SALDO_MENSAL_IN
   group by MSG_CRITICA
   UNION
   SELECT '2','DEFINITIVA',
         TO_CHAR(COUNT(1),'9G999G999') || ' Registros', '******************'
    FROM IN_SALDO_MENSAL

Verificar Objetos Inválidos

Select object_name || ' (' || object_type || ')' From user_objects Where status = 'INVALID';
Select trigger_name || ' (' || table_name || ')' From user_triggers Where status = 'DISABLED';
Select constraint_name || ' (' || table_name || ')' From user_constraints Where status = 'DISABLED';

Criação de objetos para envio de e-mail

table SQ_VERIF_TABLESPACE

create table SQ_VERIF_TABLESPACE

(

  ID       CHAR(2),

  CONTEUDO VARCHAR2(50)

)

tablespace DAD5

  pctfree 10

  pctused 40

  initrans 1

  maxtrans 255

  storage

  (

    initial 32K

    next 32K

    minextents 1

    maxextents unlimited

    pctincrease 0

  );

 

procedure sq_sendmail  

create or replace procedure sq_sendmail (

      from_name     varchar2                     :='sergio@intelm.com.br'

      ,to_name       varchar2                    :='sergio.@intelm.com.br'

      ,subject       varchar2                    :='Mensagem Oracle'

      ,message       varchar2                    :='Envio automatico de e-mail'

      ,max_size      number   default 9999999999

      ,filename1  in varchar2                    :='/erro.txt'

      ,filename2  in varchar2                    :='/u41/spool/email/enviados/P182303.txt'

      ,filename3  in varchar2                    :='/u41/spool/email/enviados/P182552.txt'

      ,debug         number   default 0 )

 

is

 

  -- Colocar os e-mails separados por ponto-vírgula

 

  v_smtp_server                          varchar2(30)     :='EXCHQT.IIG23';

  v_smtp_server_port                     number           := 25;

  v_directory_name                       varchar2(100);

  v_file_name                            varchar2(100);

  v_line                                 varchar2(1000);

  crlf                                   varchar2(2)      := chr(13) ||

chr(10);

  mesg                                   varchar2(32767);

 

  conn                                   UTL_SMTP.CONNECTION;

 

  type varchar2_table  is table of       varchar2(200) index by binary_integer;

  file_array                             varchar2_table;

 

  i                                      binary_integer;

  v_file_handle                          utl_file.file_type;

  v_slash_pos                            number;

  mesg_len                               number;

  mesg_too_long                          exception;

  invalid_path                           exception;

  mesg_length_exceeded                   boolean           := false;

 

  x number;

  vemail varchar2(200) := null;

  chars char(1);

 

begin

 

   -- Carregando os arquivos dentro do ARRAY

   -- ---------------------------------------

   file_array(1) := filename1;

   file_array(2) := filename2;

   file_array(3) := filename3;

 

   -- Abrindo Conexão SMTP e HTTP

   -- ----------------------------

   conn  := utl_smtp.open_connection( v_smtp_server, v_smtp_server_port );

 

   -- Comunicando SMTP

   -- ------------------

   utl_smtp.helo( conn, v_smtp_server );

 

         -- Autenticando Usuário e Senha

         -- -----------------------------

         --utl_smtp.command (conn, 'AUTH LOGIN');

         --utl_smtp.command (conn,utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw('sergio.queiroz'))));

         --utl_smtp.command (conn,utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw('sergio0101'))));

 

   utl_smtp.mail( conn, from_name );

--   utl_smtp.rcpt( conn, to_name );

 

    -- Separa os destinatários

    -- -----------------------

    x := 1;

    for x in 1..length(to_name) loop

        chars :=  substr(to_name,x,1);

        if chars <> ';' then

           vemail := vemail || chars;

        else

           utl_smtp.rcpt( conn, vemail );

           vemail := '';

        end if;

    end loop;

    utl_smtp.rcpt( conn, vemail );

 

   -- Abre a conexão

   -- --------------

 

   utl_smtp.open_data ( conn );

 

   -- Criando Cabeça do E-mail

   -- -----------------------------------

   mesg:= 'Date: '    || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' )                     || crlf ||

          'From: '    || from_name                                                      || crlf ||

          'Subject: ' || subject                                                        || crlf ||

          'To: '      || to_name                                                        || crlf ||

          'Mime-Version: 1.0'                                                           || crlf ||

          'Content-Type: multipart/mixed; boundary="DMW.Boundary.605592468"'            || crlf ||

          ''                                                                            || crlf ||

          'This is a Mime message, which your current mail reader may not'              || crlf ||

          'understand. Parts of the message will appear as text. If the remainder'      || crlf ||

          'appears as random characters in the message body, instead of as'             || crlf ||

          'attachments, then you''ll have to extract these parts and decode them'       || crlf ||

          'manually.'                                                                   || crlf ||

          ''                                                                            || crlf ||

          '--DMW.Boundary.605592468'                                                    || crlf ||

          'Content-Type:              text/plain; name="message.txt"; charset=US-ASCII' || crlf ||

          'Content-Disposition:       inline;     filename="message.txt"'               || crlf ||

          'Content-Transfer-Encoding: 7bit'                                             || crlf ||

          ''                                                                            || crlf ||

          message                                                                       || crlf ;

 

   mesg_len := length(mesg);

 

   if mesg_len > max_size then

      mesg_length_exceeded := true;

   end if;

 

   utl_smtp.write_data ( conn, mesg );

 

   -- Anexando Arquivos

   -- ------------------

   for i in  1..3 loop

 

       -- Sair se ultrapassar o tamanho de mensagem

       -- -----------------------------------------

       exit when mesg_length_exceeded;

 

       if file_array(i) is not null then

 

          begin

 

             -- Localiza a '/' ou '\' no caminho

             -- ---------------------------------

             v_slash_pos := instr(file_array(i), '/', -1 );

 

             if v_slash_pos = 0 then

                v_slash_pos := instr(file_array(i), '\', -1 ); -- Valor Retornado = 3

 

             end if;

 

             -- Separa o arquivo do diretório

             -- ------------------------------

             v_directory_name := substr(file_array(i), 1, v_slash_pos - 1);

             v_file_name      := substr(file_array(i), v_slash_pos + 1 );

 

             -- Abrir Arquivo

             -- --------------

--             v_file_handle := utl_file.fopen(v_directory_name,v_file_name,'r');

             v_file_handle := utl_file.fopen('c:/',v_file_name,'r');

 

             -- Gera a linha MIME boundary

             -- --------------------------

             mesg := crlf || '--DMW.Boundary.605592468' || crlf ||

             'Content-Type:              application/octet-stream; name=    "v_file_name"'  || crlf ||

             'Content-Disposition:       attachment;               filename="v_file_name"'  || crlf ||

             'Content-Transfer-Encoding: 7bit'                                              || crlf ||

             crlf ;

 

             mesg_len := mesg_len + length(mesg);

             utl_smtp.write_data ( conn, mesg );

 

             -- Anexa o conteúdo do arquivo ao corpo da mensagem

             -- ------------------------------------------------

 

             loop

 

                 utl_file.get_line(v_file_handle, v_line);

 

                 if mesg_len + length(v_line) > max_size then

 

                    mesg := '*** truncado ***' || crlf;

 

                    utl_smtp.write_data ( conn, mesg );

 

                    mesg_length_exceeded := true;

 

                    raise mesg_too_long;

 

                 end if;

 

                 mesg := v_line || crlf;

 

                 utl_smtp.write_data ( conn, mesg );

 

                 mesg_len := mesg_len + length(mesg);

 

             end loop;

 

          exception

 

             when utl_file.invalid_path then

                 if debug > 0 then

                    dbms_output.put_line('Erro anexando arquivo ! '|| file_array(i));

                 end if;

 

             -- Todas EXCEPTIONS ignoradas

             when others then null;

 

          end;

 

          mesg := crlf;

 

          utl_smtp.write_data ( conn, mesg );

 

          -- Fecha Arquivo

          -- --------------

          utl_file.fclose(v_file_handle);

 

        end if;

 

   end loop;

 

   -- Fechando a Cabeça do E-mail

   -- ----------------------------

   mesg := crlf || '--DMW.Boundary.605592468--' || crlf;

   utl_smtp.write_data ( conn, mesg );

 

   -- Fechando conexão SMTP

   -- -----------------------

   utl_smtp.close_data( conn );

   utl_smtp..quit( conn );

 

end;

 

PROCEDURE SQ_VERIFICAR_TABLESPACE

CREATE OR REPLACE PROCEDURE SQ_VERIFICAR_TABLESPACE IS

DECLARE

    Cursor c_space is (SELECT TABLESPACE_NAME, SUM(BYTES)

                FROM DBA_FREE_SPACE

               WHERE TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE_NAME FROM USER_TABLES

                                         UNION

                                         SELECT DISTINCT TABLESPACE_NAME FROM USER_INDEXES

                                          WHERE TABLE_NAME IN (SELECT TABLE_NAME

                                                                 FROM USER_TABLES))

              GROUP BY TABLESPACE_NAME);

 

---------------------------------------

-- Criado por: Sérgio Queiroz

-- Empresa   : Atos Origin

-- Data      : 27/03/09

---------------------------------------

 

reg_tablespace varchar2(50);

reg_tamanho    varchar2(30);

reg_minimo     number := 52428800; --50Mb

msg            varchar2(30000);

crlf           varchar2(2) := chr(13) || chr(10);

 

/*

A TABELA SQ_VERIF_TABLESPACE DEVE SER ALIMENTADA CONFORME ABAIXO:

 

ID | CONTEUDO

--------------

1  | NOME DO CONSULTOR

2  | E-MAIL DO CONSULTOR

3  | TELEFONES DO CONSULTOR

4  | EMPRESA DO CONSULTOR

5  | E-MAIL QUE ENVIARÁ AS MENSAGEM

6  | E-MAILS QUE RECEBERÃO AS MENSAGENS (SEPARAR POR ";" SEM ESPAÇOS)

7  | ASSUNTO DO E-MAIL

8  | QUANTINDADE MÍNIMA DE Mb PARA O ENVIO DA MENSAGEM

9  | NOME DA TABLESPACES DE DADOS OU ÍNDICES QUE SERÁ VERIFICADA (UM PARA CADA ID)

9  | ...

9  | ...

10 | MENSAGEM INCIAL (ATÉ 50 BYTES POR ID, SOMENTE PARA OS IDs 10 A 15)

11 | ...

12 | ...

13 | ...

14 | ...

15 | ...

*/     

 

vconsnome   sq_verif_tablespace.conteudo%type;

vconsmail   sq_verif_tablespace.conteudo%type;

vconstel    sq_verif_tablespace.conteudo%type;

vconsemp    sq_verif_tablespace.conteudo%type;

 

vmailfrom   sq_verif_tablespace.conteudo%type;

vmailto     sq_verif_tablespace.conteudo%type;

vmailsubj   sq_verif_tablespace.conteudo%type;

 

vmensagem   varchar2(400);

vmsg        varchar2(50);

 

vqtdeminima sq_verif_tablespace.conteudo%type

vind        number;

vconteudo   sq_verif_tablespace.conteudo%type;

 

begin

     -- Busca informações para envio do e-mail

     -- --------------------------------------

     select conteudo into vconsnome from sq_verif_tablespace where id = '1';

     select conteudo into vconsmail from sq_verif_tablespace where id = '2';

     select conteudo into vconstel from sq_verif_tablespace where id = '3';

     select conteudo into vconsemp from sq_verif_tablespace where id = '4';

     select conteudo into vmailfrom from sq_verif_tablespace where id = '5';

     select conteudo into vmailto from sq_verif_tablespace where id = '6';

     select conteudo into vmailsubj from sq_verif_tablespace where id = '7';

     select conteudo into vqtdeminima from sq_verif_tablespace where id = '8';

     --

 

     -- Busca a mensagem incial que vai aparecer no topo do e-mail

     -- ----------------------------------------------------------

     vmensagem :=  crlf || 'TABLESPACES COM MENOS DE ' || vqtdeminima || ' Mb' || crlf || crlf ;

     vind := 0;

     for vind in 10..15 loop

         select conteudo into vmsg from sq_verif_tablespace where id = vind;

         if vmsg is not null then

            vmensagem := vmensagem || trim(vmsg) || crlf;

         end if;

     end loop;

     --

 

     -- Monta parte superior da tabela

     -- ------------------------------

     msg := crlf || vmensagem || crlf || crlf;

     msg := msg || '+------------------------------------------+---------------+' || crlf ;

     msg := msg || '| TABLESPACE_NAME                          |  FREE SPACE   |' || crlf ;

     msg := msg || '+------------------------------------------+---------------+' || crlf ;

     msg := msg || '|                                          |               |' || crlf ;

     --

    

     -- Transforma o quantidade mínima em Mb

     -- ------------------------------------

     vqtdeminima := to_char(to_number(vqtdeminima) * 1024 * 1024);

     --

    

     open c_space;

    

     loop

         fetch c_space into reg_tablespace, reg_tamanho;

         exit when c_space%notfound;

         vconteudo := null;

         begin

             -- Verifica as tablespaces existentes e monta a linha da tabela

             -- ------------------------------------------------------------

             select conteudo into vconteudo from sq_verif_tablespace where id = 9 and conteudo = reg_tablespace;

          

             if vconteudo is not null then

                 if reg_tamanho <= to_number(vqtdeminima) then        

                    msg := msg || '| ' || rpad(reg_tablespace, 41,' ') || '| ' || lpad(to_char(to_number(reg_tamanho)/1024/1024,'999G999G999G999','nls_numeric_characters='',.''') || ' Mb',11,' ') || '   |' || crlf;

                 end if;

             end if;

             exception

                 when no_data_found then

                      null;

             --        

         end;

     end loop;

 

     -- Monta parte inferior da tabela

     -- ------------------------------

     msg := msg || '|                                          |               |' || crlf ;

     msg := msg || '+------------------------------------------+---------------+' || crlf || crlf ;

     msg := msg || '------------------------------------------------------------' || crlf ;

     msg := msg || ' CONSULTOR: ' || vconsnome || crlf ;

     msg := msg || ' E-MAIL   : ' || vconsmail || crlf ;

     msg := msg || ' TELEFONE : ' || vconstel  || crlf ;

     msg := msg || ' EMPRESA  : ' || vconsemp  || crlf ;

     msg := msg || '------------------------------------------------------------' || crlf ;

     --

    

     -- Envia o e-mail

     -- --------------

     sq_sendmail (vmailfrom,

                  vmailto,

                  vmailsubj,

                  msg);

     --

                    

     close c_space;

end;

 

Exemplo insert SQ_VERIF_TABLESPACE

prompt PL/SQL Developer import file

prompt Created on sexta-feira, 27 de março de 2009 by sergio.queiroz

set feedback off

set define off

prompt Loading SQ_VERIF_TABLESPACE...

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('1 ', 'SÉRGIO QUEIROZ');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('2 ', 'sergio.queiroz@an.com');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('3 ', '13 8111-8329 / 11 2183-2629');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('4 ', 'ATOS ORIGIN');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('5 ', 'sergio.queiroz@inteligtelecom.com.br');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('6 ', 'sergio.queiroz@inteligtelecom.com.br');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('7 ', 'ALERTA AUTOMÁTICO: Tablespaces com pouco espaço');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('8 ', '100');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'USERS');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('10', 'FAVOR VERIFICAR AS TABLESPACES ABAIXO');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('11', '*************************************');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('12', null);

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('13', null);

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('14', null);

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('15', null);

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'DAD1');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'DAD2');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'DAD3');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'DAD4');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'DAD5');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'IDX1');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'IDX2');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'IDX3');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'IDX4');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'IDX5_S160K');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'IDX6_S5');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'TS_CIAP_DADOS');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'TS_CIAP_INDICES');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'TS_FIS_ARQMAG');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'TS_FIS_ARQMAG_IDX');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'TS_IN86_DADOS');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'TS_IN86_DADOS_CARGA');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'TS_IN86_INDEX');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'TS_IN86_INDEX_CARGA');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'TS_SYN_ALL');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'TS_SYN_ALL_IDX');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'TS_SYN_PRCGER_IMP');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'TS_SYN_PRCGER_IMP_IDX');

insert into SQ_VERIF_TABLESPACE (ID, CONTEUDO)

values ('9 ', 'TS_TEMP');

commit;

prompt 39 records loaded

set feedback on

set define on

prompt Done.

 

Related Posts Plugin for WordPress, Blogger...