Brbackup - ORA-01017








BR0051I BRBACKUP 7.40 (22)

BR0055I Start of database backup: betuhkhq.anf 2016-08-08 14:52:38

BR0484I BRBACKUP log file: /oracle/TST/sapbackup/betuhkhq.anf

BR0280I BRBACKUP time stamp: 2016-08-08 14:52:39

BR0301E SQL error -1017 at location BrDbConnect-3, SQL statement:

'CONNECT /'

ORA-01017: invalid username/password; logon denied

BR0310E Connect to database instance TST failed

BR0280I BRBACKUP time stamp: 2016-08-08 14:52:39

BR0301E SQL error -1017 at location BrDbConnect-3, SQL statement:

'CONNECT /'

ORA-01017: invalid username/password; logon denied

BR0310E Connect to database instance TST failed

ORA-00059: maximum number of DB_FILES exceeded



Problema
BR0280I BRSPACE time stamp: 2015-06-01 11:15:55
BR1088I Extending tablespace PSAPBTABI ...
BR0280I BRSPACE time stamp: 2015-06-01 11:16:34
BR0301E SQL error -59 at location BrSqlExecute-1, SQL statement:
'/* BRSPACE */ alter tablespace PSAPBTABI add datafile '/oracle/TST/sapdata4/btabi_28/btabi.data28' size 5000M autoextend on next 20M maxsize 6000M'
ORA-00059: maximum number of DB_FILES exceeded
BR1017E Execution of SQL statement '/* BRSPACE */ alter tablespace PSAPBTABI add datafile '/oracle/TST/sapdata4/btabi_28/btabi.data28' size 5000M autoextend on next 20M maxsize 6000M' failed

BR0280I BRSPACE time stamp: 2015-06-01 11:16:34
BR0669I Cannot continue due to previous warnings or errors - you can go back and repeat the last action
BR0671I Enter 'b[ack]' to go back, 's[top]' to abort:


Referencia

Solução
You do not need to recreate control file. See below:

SQL> sho user
SYS
SQL> select * from v$version;


BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production


SQL> sho parameter db_files

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 200
SQL> alter system set db_files = 512 scope = spfile;

SQL> shutdown immediate
SQL> startup
SQL> sho parameter db_files

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 512




Criando Oracle DBLINK


Arquivo tnsnames.ora
- Na máquina onde o dblink será criado, configure o arquivo $ORACLE_HOME/network/admin/tnsnames.ora.
- Adicione uma entrada como o exemplo abaixo.

> Modelo
<SID>.WORLD =
  (DESCRIPTION =
   (SDU = 32768)
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = IP)(PORT = 1521))
    )
     (CONNECT_DATA =
      (SID = <sid>)
      (GLOBAL_NAME = <SID>.WORLD)
     )
  )


onde, 
SID = É o nome do seu banco de dados remoto.

> Exemplo

TST.WORLD =
  (DESCRIPTION =
   (SDU = 32768)
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.3)(PORT = 1521))
    )
     (CONNECT_DATA =
      (SID = tst)
      (GLOBAL_NAME = TST.WORLD)
     )
  )

Criando DBLINK
- Na instancia onde se deseja criar o dblink.

> Modelo
CREATE PUBLIC  DATABASE LINK  Name
   CONNECT TO Name IDENTIFIED BY User

   USING 'SID'; 

onde,
Name = Nome do seu link
User = Usuário do banco de dados remoto que será utilizado para se identificar
SID = O nome da instancia remota (o mesmo utilizado dentro do arquivo tnsnames.ora)

> Exemplo
CREATE PUBLIC  DATABASE LINK  LTST
   CONNECT TO LTST IDENTIFIED BY ltst

   USING 'TST'; 

Abraços

Excluindo tablespace via brtools

SAP

Referencia
http://help.sap.com/saphelp_nw70/helpdata/en/99/364d3f51a9995ee10000000a114084/content.htm

Solução
- Execute o comando no formato abaixo:

brspace -f tsdrop -t tablespace_nome

onde,
tablespace_nome = Nome da tablespace que se deseja excluir. Caso o nome da sua tablespace possua espaço, utilize aspas duplas.

Exemplo
maqtst:oratst 5> brspace -f tsdrop -t "PSAPCLUI ADD"
BR1001I BRSPACE 7.20 (34)
BR1002I Start of BRSPACE processing: semuadom.tsd 2013-12-18 13.45.40
BR0484I BRSPACE log file: /oracle/TST/sapreorg/semuadom.tsd

BR0280I BRSPACE time stamp: 2013-12-18 13.45.41
BR1009I Name of database instance: TST
BR1010I BRSPACE action ID: semuadom
BR1011I BRSPACE function ID: tsd
BR1012I BRSPACE function: tsdrop

BR0280I BRSPACE time stamp: 2013-12-18 13.45.42
BR0657I Input menu 310 - please enter/check input values
-------------------------------------------------------------------------------
Options for dropping of tablespace PSAPCLUI ADD

 1 * Number of files in tablespace (files) . [1]
 2 * Total tablespace size in MB (size) .... [40]
 3 - Force tablespace drop (force) ......... [no]
 4 - SQL command (command) ................. [drop tablespace PSAPCLUI ADD]

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
-------------------------------------------------------------------------------

BR0662I Enter your choice:
c
BR0259I Program execution will be continued...

BR0280I BRSPACE time stamp: 2013-12-18 13.47.36
BR1090I Dropping tablespace PSAPCLUI ADD ...

BR0280I BRSPACE time stamp: 2013-12-18 13.47.36
BR1016I SQL statement 'drop tablespace "PSAPCLUI ADD"' executed successfully

BR1069I Tablespace PSAPCLUI ADD dropped successfully

BR0794I Database file /oracle/TST/sapdata1/clui_1/clui.data1 deleted
BR0480I Directory /oracle/TST/sapdata1/clui_1 deleted

BR1821I Table data class (tabart) handling will be executed now

BR0280I BRSPACE time stamp: 2013-12-18 13.47.36
BR0675I This is a recommended action - do you want to execute it now?
BR0676I Enter 'y[es]/c[ont]' to execute the action, 'n[o]' to skip it, 's[top]' to abort:
y
BR0280I BRSPACE time stamp: 2013-12-18 13.47.56
BR0257I Your reply: 'y'
BR0677I The action will be executed...

BR1822I Table data class (tabart) handling executed successfully

BR0280I BRSPACE time stamp: 2013-12-18 13.47.57
BR0340I Switching to the next online redolog file for database instance TST ...
BR0321I Switch to the next online redolog file for database instance TST successful

BR0280I BRSPACE time stamp: 2013-12-18 13.47.59
BR0319I Control file copy created: /oracle/TST/sapreorg/semuadom/cntrlTST.new 15056896

BR0280I BRSPACE time stamp: 2013-12-18 13.47.59
BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRSPACE:


Abraços

Purging AWR Reports from SYSAUX tablespaces

Extend a tablespace via brtools

 SAP

Problema
- Extend uma tablespace via brtools

Solução
- Faça login com o usuário ora<.sid>.
- Execute o comando brtools.
- Siga os passos abaixo.

maqtst:oratst 2> brtools
BR0651I BRTOOLS 7.20 (34)

BR0280I BRTOOLS time stamp: 2013-12-18 08.15.17
BR0656I Choice menu 1 - please make a selection
-------------------------------------------------------------------------------
BR*Tools main menu

 1 = Instance management
 2 - Space management
 3 - Segment management
 4 - Backup and database copy
 5 - Restore and recovery
 6 - Check and verification
 7 - Database statistics
 8 - Additional functions
 9 - Exit program

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
-------------------------------------------------------------------------------
BR0662I Enter your choice:
2
BR0280I BRTOOLS time stamp: 2013-12-18 08.21.05
BR0663I Your choice: '2'

BR0280I BRTOOLS time stamp: 2013-12-18 08.21.05
BR0656I Choice menu 5 - please make a selection
-------------------------------------------------------------------------------
Database space management

 1 = Extend tablespace
 2 - Create tablespace
 3 - Drop tablespace
 4 - Alter tablespace
 5 - Alter data file
 6 - Move data file
 7 - Additional space functions
 8 - Reset program status

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
-------------------------------------------------------------------------------
BR0662I Enter your choice:
1
BR0280I BRTOOLS time stamp: 2013-12-18 08.21.13
BR0663I Your choice: '1'

BR0280I BRTOOLS time stamp: 2013-12-18 08.21.13
BR0657I Input menu 81 - please enter/check input values
-------------------------------------------------------------------------------
BRSPACE options for tablespace extension

 1 - BRSPACE profile (profile) ...... [initTST.sap]
 2 - Database user/password (user) .. [/]
 3 ~ Tablespace name (tablespace) ... []
 4 - Confirmation mode (confirm) .... [yes]
 5 - Scrolling line count (scroll) .. [20]
 6 - Message language (language) .... [E]
 7 - BRSPACE command line (command) . [-p initTST.sap -s 20 -l E -f tsextend]

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
-------------------------------------------------------------------------------
BR0662I Enter your choice:
c
BR0280I BRTOOLS time stamp: 2013-12-18 08.21.22
BR0663I Your choice: 'c'
BR0259I Program execution will be continued...

BR0291I BRSPACE will be started with options '-p initTST.sap -s 20 -l E -f tsextend'

BR0280I BRTOOLS time stamp: 2013-12-18 08.21.22
BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:
c
BR0280I BRTOOLS time stamp: 2013-12-18 08.22.24
BR0257I Your reply: 'c'
BR0259I Program execution will be continued...

###############################################################################

BR1001I BRSPACE 7.20 (34)
BR1002I Start of BRSPACE processing: semtzawm.tse 2013-12-18 08.22.24
BR0484I BRSPACE log file: /oracle/TST/sapreorg/semtzawm.tse

BR0280I BRSPACE time stamp: 2013-12-18 08.22.25
BR1009I Name of database instance: TST
BR1010I BRSPACE action ID: semtzawm
BR1011I BRSPACE function ID: tse
BR1012I BRSPACE function: tsextend

BR0280I BRSPACE time stamp: 2013-12-18 08.22.25
BR0656I Choice menu 301 - please make a selection
-------------------------------------------------------------------------------
Tablespace extension main menu

 1 = Extend tablespace
 2 - Show tablespaces
 3 - Show data files
 4 - Show disk volumes
 5 * Exit program
 6 - Reset program status

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
-------------------------------------------------------------------------------
BR0662I Enter your choice:
1
BR0280I BRSPACE time stamp: 2013-12-18 08.22.42
BR0663I Your choice: '1'

BR0280I BRSPACE time stamp: 2013-12-18 08.22.43
BR0658I List menu 302 - please select one entry
-------------------------------------------------------------------------------
List of tablespaces for extension

Pos.  Tablespace    Files/AuExt.   Total[KB]   Used[%]    Free[KB]  MaxSize[KB]

  1 - PSAPBTABD         3/0         9977856     40.75     5911808      9977856
  2 - PSAPBTABI         2/0         5267456     52.02     2527488      5267456
  3 - PSAPCLUD          2/0          302080     15.17      256256       302080
  4 - PSAPCLUI          1/0          204800      6.91      190656       204800
  5 - PSAPCLUI ADD      1/0           40960      0.16       40896        40960
  6 - PSAPDDICD         3/0         8956928     29.72     6295040      8956928
  7 - PSAPDDICI         3/0         4313088     29.25     3051328      4313088
  8 - PSAPTST          10/0        15861760      0.00    15861120     15861760
  9 - PSAPTST46C        9/0        13414400      0.00    13413824     13414400
 10 - PSAPTSTUSR        1/0           20480      0.31       20416        20480
 11 - PSAPDIMD          1/0          104448      0.12      104320       104448
 12 - PSAPDIMI          1/0          104448      0.12      104320       104448
 13 - PSAPDOCUD         1/0          204800     23.38      156928       204800
 14 - PSAPDOCUI         1/0          276480     13.08      240320       276480
 15 - PSAPEL702D        3/2         1801216      0.01     1801024      3107840
 16 - PSAPEL702DX       1/0         6518784     51.55     3158144      6518784
 17 - PSAPEL702I        1/0         1048576      0.01     1048512      1048576
 18 - PSAPEL702IX       1/0         2099200      0.56     2087360      2099200
 19 - PSAPES702D        2/0        35622912      0.00    35622784     35622912
 20 - PSAPES702DX       2/0        23173120     75.11     5767616     23173120

Press <Rtn> - scroll, <n> - select, c - cont, s - skip, b - back, h - header
c
 21 - PSAPES702I        2/0        21060608      0.00    21060480     21060608
 22 - PSAPES702IX       1/0        14927872     75.09     3717888     14927872
 23 - PSAPFACTD         1/0          104448      0.18      104256       104448
 24 - PSAPFACTI         1/0          104448      0.31      104128       104448
 25 - PSAPLOADD         3/0         2244608      2.99     2177536      2244608
 26 - PSAPLOADI         2/0         1316864      0.54     1309696      1316864
 27 - PSAPODSD          1/0          114688      0.33      114304       114688
 28 - PSAPODSI          1/0          114688      0.45      114176       114688
 29 - PSAPPOOLD         4/0        12429312     67.92     3987072     12429312
 30 - PSAPPOOLI         4/0         9472000     63.48     3458816      9472000
 31 - PSAPPROTD         4/0         1476608     12.25     1295744      1476608
 32 - PSAPPROTI         3/0          489472     19.61      393472       489472
 33 - PSAPSOURCED       4/0          950272     60.96      371008       950272
 34 - PSAPSOURCEI       4/0         2096128     61.25      812224      2096128
 35 - PSAPSR3USR        1/0         1048576      0.02     1048320      1048576
 36 - PSAPSTABD         4/0        10102784     57.57     4286464     10102784
 37 - PSAPSTABI         3/0        10244096     61.94     3898624     10244096
 38 - PSAPSTAI          1/0         2560000      0.00     2559936      2560000
 39 - PSAPTEMP          1/0         3072000      0.00     3072000      3072000
 40 - PSAPUNDO          2/0         7954432      0.00     7954304      7954432
 41 - PSAPUSER1D        1/0          102400      1.81      100544       102400
 42 - PSAPUSER1I        1/0          204800      0.94      202880       204800
 43 - SYSAUX            2/0         1126400     95.27       53248      1126400
 44 - SYSTEM            3/1         1996800     76.44      470400      3686400

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
-------------------------------------------------------------------------------
BR0662I Enter your selection:
43
BR0280I BRSPACE time stamp: 2013-12-18 08.23.20
BR0663I Your selection: '43'

BR0280I BRSPACE time stamp: 2013-12-18 08.23.20
BR0657I Input menu 303 - please enter/check input values
-------------------------------------------------------------------------------
Options for extension of tablespace SYSAUX (1. file)

 1 * Last added file name (lastfile) ....... [/oracle/TST/sapdata2/system_4/sysaux04.dbf]
 2 * Last added file size in MB (lastsize) . [1000]
 3 - New file to be added (file) ........... [/oracle/TST/sapdata2/system_5/sysaux04.dbf]
 4 ~ Raw disk / link target (rawlink) ...... []
 5 - Size of the new file in MB (size) ..... [1000]
 6 - File autoextend mode (autoextend) ..... [no]
 7 # Maximum file size in MB (maxsize) ..... []
 8 # File increment size in MB (incrsize) .. []
 9 - SQL command (command) ................. [alter tablespace SYSAUX add datafile '/oracle/TST/sapdata2/system_5/sysaux04.dbf' size 1000M autoextend off]

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
-------------------------------------------------------------------------------
BR0662I Enter your choice:
3
BR0280I BRSPACE time stamp: 2013-12-18 08.24.55
BR0663I Your choice: '3'
BR0681I Enter string value for "file" (<file>|<sapdata>|<N>) [/oracle/TST/sapdata2/system_5/sysaux04.dbf]:
/oracle/TST/sapdata2/system_5/sysaux05.dbf
BR0280I BRSPACE time stamp: 2013-12-18 08.25.02
BR0683I New value for "file": '/oracle/TST/sapdata2/system_5/sysaux05.dbf'

BR0280I BRSPACE time stamp: 2013-12-18 08.25.02
BR0657I Input menu 303 - please enter/check input values
-------------------------------------------------------------------------------
Options for extension of tablespace SYSAUX (1. file)

 1 * Last added file name (lastfile) ....... [/oracle/TST/sapdata2/system_4/sysaux04.dbf]
 2 * Last added file size in MB (lastsize) . [1000]
 3 - New file to be added (file) ........... [/oracle/TST/sapdata2/system_5/sysaux05.dbf]
 4 ~ Raw disk / link target (rawlink) ...... []
 5 - Size of the new file in MB (size) ..... [1000]
 6 - File autoextend mode (autoextend) ..... [no]
 7 # Maximum file size in MB (maxsize) ..... []
 8 # File increment size in MB (incrsize) .. []
 9 - SQL command (command) ................. [alter tablespace SYSAUX add datafile '/oracle/TST/sapdata2/system_5/sysaux05.dbf' size 1000M autoextend off]

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
-------------------------------------------------------------------------------
BR0662I Enter your choice:
c
BR0280I BRSPACE time stamp: 2013-12-18 08.25.21
BR0663I Your choice: 'c'
BR0259I Program execution will be continued...

BR1091I Next data file can be specified now

BR0280I BRSPACE time stamp: 2013-12-18 08.25.21
BR0675I This is a optional action - do you want to execute it now?
BR0676I Enter 'y[es]' to execute the action, 'n[o]/c[ont]' to skip it, 's[top]' to abort:
n
BR0280I BRSPACE time stamp: 2013-12-18 08.25.42
BR0257I Your reply: 'n'
BR0678I The action will be skipped...

BR0370I Directory /oracle/TST/sapreorg/semtzawm created

BR0280I BRSPACE time stamp: 2013-12-18 08.25.43
BR0319I Control file copy created: /oracle/TST/sapreorg/semtzawm/cntrlTST.old 15056896

BR0370I Directory /oracle/TST/sapdata2/system_5 created

BR0280I BRSPACE time stamp: 2013-12-18 08.25.43
BR1088I Extending tablespace SYSAUX ...
BR0280I BRSPACE time stamp: 2013-12-18 08.26.27
BR1016I SQL statement 'alter tablespace SYSAUX add datafile '/oracle/TST/sapdata2/system_5/sysaux05.dbf' size 1000M autoextend off' executed successfully

BR1051I Tablespace SYSAUX extended successfully with file: /oracle/TST/sapdata2/system_5/sysaux05.dbf 1000M

BR0280I BRSPACE time stamp: 2013-12-18 08.26.27
BR0340I Switching to the next online redolog file for database instance TST ...
BR0321I Switch to the next online redolog file for database instance TST successful

BR0280I BRSPACE time stamp: 2013-12-18 08.26.29
BR0319I Control file copy created: /oracle/TST/sapreorg/semtzawm/cntrlTST.new 15056896

BR0280I BRSPACE time stamp: 2013-12-18 08.26.29
BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRSPACE:

Abraços

Modificando a SYSAUX após ajuste de retenção AWR

Oracle

Problema
- Após o ajuste de retenção do AWR indicado no post Increasing AWR Retention, percebemos que o espaço livre na tablespace SYSAUX diminuiu.

Solução
- Faça um extend na tablespace SYSAUX via brtools.



Reference - Installing Oracle Database 12c for Linux

Setando caracteres por linha no sqlplus

Oracle

Referencia
http://docs.oracle.com/cd/B19306_01/server.102/b14357/ch12040.htm#i2678481

Sintaxe
SET LIN[ESIZE] {80 | n} SET LIN[ESIZE] {150 | n}
Explicação
- Configura o número total de caracteres que o SQL Plus exibe em uma linha antes de começar uma nova.

Exemplo
- Exibindo as informações sobre tablespaces.

TABLESPACE                     TOTAL_SPACE FREE_SPACE TOTAL_SPACE_MB
------------------------------ ----------- ---------- --------------
USED_SPACE_MB FREE_SPACE_MB   PCT_FREE
------------- ------------- ----------
SYSAUX                          1384120320  458293248           1320
          883           437      33.11

SYSTEM                          3135242240 1517944832           2990

         1542          1448      48.42


- Executando o comando set linesize antes:

SQL>set linesize 300


TABLESPACE                     TOTAL_SPACE FREE_SPACE TOTAL_SPACE_MB USED_SPACE_MB FREE_SPACE_MB   PCT_FREE
------------------------------ ----------- ---------- -------------- ------------- ------------- ----------
SYSAUX                          1384120320  458293248           1320           883           437      33.11
SYSTEM                          3135242240 1517944832           2990          1542          1448      48.42


BR0121E Processing of log file /oracle/SID/sapreorg/semslywd.tse failed

SAP

Problema
BR1001I BRSPACE 7.20 (34)
BR0252E Function fopen() failed for '/oracle/TST/sapreorg/semslywd.tse' at location main-5
BR0253E errno 13: Permission denied
BR0121E Processing of log file /oracle/TST/sapreorg/semslywd.tse failed

BR0700E Fatal errors occurred - terminating processing...

BR1008I End of BRSPACE processing: semslywd.tse 2013-12-10 09.35.19
BR0280I BRSPACE time stamp: 2013-12-10 09.35.19
BR1007I BRSPACE terminated with errors

###############################################################################

BR0292I Execution of BRSPACE finished with return code 3

Solução
- Altere as permissões do diretório /oracle/<SID>/sapreorg.
chmod 777 /oracle/<SID>/sapreorg
chown ora<sid>:dba /oracle/<SID>/sapreorg

BR1014I Please delete file /oracle/SID/sapreorg/.lock_tse.brs if BRSPACE was killed

SAP

Problema
BR1001I BRSPACE 7.20 (34)
BR1002I Start of BRSPACE processing: semslxsn.tse 2013-12-10 09.22.29
BR0484I BRSPACE log file: /oracle/TST/sapreorg/semslxsn.tse
BR1013E BRSPACE currently running with function 'tsextend' or was killed
BR1014I Please delete file /oracle/TST/sapreorg/.lock_tse.brs if BRSPACE was killed
BR1015E Setting of BRSPACE lock failed

BR0700E Fatal errors occurred - terminating processing...

BR1008I End of BRSPACE processing: semslxsn.tse 2013-12-10 09.22.29
BR0280I BRSPACE time stamp: 2013-12-10 09.22.29
BR1007I BRSPACE terminated with errors

Solução
- Exclua o arquivo /oracle/<SID>/sapreorg/.lock_tse.brs.

BR0301E SQL error -14063 at location tab_onl_reorg-10


Problema

BR0301E SQL error -14063 at location tab_onl_reorg-10, SQL statement:
'ALTER TABLE "SAPR3"."CDCLS" ADD PRIMARY KEY ("MANDANT", "OBJECTCLAS", "OBJECTID", "CHANGENR", "PAGENO")'
ORA-14063: Unusable index exists on unique/primary constraint key
BR0280I BRSPACE time stamp: 2013-12-06 13.54.55
BR1106E Reorganization of table SAPR3.CDCLS failed


Solução
- Identificando o nome do index.
select index_name,index_type,status,table_owner from dba_indexes
where  table_name='RFBLG' and table_owner='SAPR3';


INDEX_NAME                     INDEX_TYPE                  STATUS
------------------------------ --------------------------- --------
TABLE_OWNER
------------------------------
SYS_IL0000437505C00008$$       LOB                         VALID
SAPR3

RFBLG~0                        NORMAL                      UNUSABLE
SAPR3


- Faça um rebuild no index com status UNUSABLE.

SQL> connect sapr3
Enter password:
Connected.
SQL> alter index SAPR3."RFBLG~0" rebuild online;

Index altered.


- Repita o comando da brspace para reorganização da tabela.

Exibir tamanho total de uma tabela

Oracle

Problema
- Exibir tamanho total de uma tabela em mega bytes

Solução

select 
   segment_name           table_name,   
   sum(bytes)/(1024*1024) MBytes 
from   
   user_extents 
where  
   segment_type='TABLE' 
and    
   segment_name = 'CDCLS'
group by segment_name;




Export a tablespace

Oracle

Applied
Oracle 11.2.0.3, 10.2.0.4

Format
exp user/pass FILE=/path/file_name.dmp tablespaces=tablespace_name

Example
exp system/manger FILE=/oracle/TST/sapdata3/clud.dmp tablespaces=PSAPCLUD 

EXP-00026: conflicting modes specified

Oracle

Referencia
http://docs.oracle.com/cd/B10501_01/server.920/a96525/expus.htm

Problema 
maqtst:oratst 16> exp system/manager FILE=clud.dmp tablespaces=PSAPCLUD owner=SAPR3 full=y rows=y

Export: Release 11.2.0.3.0 - Production on Wed Dec 4 10:10:20 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
EXP-00026: conflicting modes specified
EXP-00000: Export terminated unsuccessfully

Solução
- Execute o comando sem os parâmetros desnecessários.

exp system/manager FILE=clud.dmp tablespaces=PSAPCLUD