how to add datafile extend table space.docx

Upload: shafeeq-mohammed

Post on 14-Apr-2018

341 views

Category:

Documents


3 download

TRANSCRIPT

  • 7/30/2019 How to add datafile Extend Table space.docx

    1/13

    How To Extend Table space on

    oraclecreated bypriyan shannon Jun 26, 2012 6:30 AM, last modified bypriyan shannon Jun 26, 2012 8:16AM

    Version 2inShare

    How To Extend Table space on oracle on Linux

    Table of Contents

    1. Check the table space before extend2. Using SAP GUI3.

    Check Using SQL on OS and select the datafiles of tablespaces.

    4. Extend Table space on oracle.5. Login in to the console from user.6. Run brtools with following options.7. Verify the extended table-space.8. Though SAP GUI9. Check Using SQL on OS and select the datafiles of tablespaces.

    Summary

    The purpose is this document is to show how to extend a database table space using BRTOOLS

    in LINUX environment and then verify whether the in the new data file has been added correctly

    or not. TheThe Document will guide to use: Commands and GUI usage for particular task.

    Applies to SAP Netweaver R/3 System

    Author: Priyashantha Fernando

    Company: CPSTLSri Lanka

    Created on: 26 June 2012

    Check the table space before extend Using

    SAP GUI

    http://scn.sap.com/people/shann.shannhttp://scn.sap.com/people/shann.shannhttp://scn.sap.com/people/shann.shannhttp://scn.sap.com/people/shann.shannhttp://scn.sap.com/people/shann.shannhttp://scn.sap.com/people/shann.shannhttp://scn.sap.com/docs/DOC-29484/diff?secondVersionNumber=2http://scn.sap.com/docs/DOC-29484/diff?secondVersionNumber=2http://scn.sap.com/docs/DOC-29484/diff?secondVersionNumber=2http://scn.sap.com/people/shann.shannhttp://scn.sap.com/people/shann.shann
  • 7/30/2019 How to add datafile Extend Table space.docx

    2/13

    Use TCODE DB02 and check the database size. [The Total size is 293.97 GB]

    Use tcode DB02 select the tablespace which is intend to extend. Eg: PSAPSR3

    [= PSAPSR3]

    It shows the last datafile as the sr3.data18.

    http://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113727/db02-after2.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113726/db02-1.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113727/db02-after2.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113726/db02-1.png
  • 7/30/2019 How to add datafile Extend Table space.docx

    3/13

    Check Using SQL on OS and select the datafiles of

    tablespaces.

    Login to SQL from the user Erppi1# su orapi1

    erppi1:orapi1 54>

    erppi1:orapi1 53> sqlplus / as sysdba

    SQL>

    SQL> select file_name from dba_data_files;

    Then It will display datafiles till the last.

    Eg : /oracle/PI1/sapdata4/sr3_18/sr3.data18

    Extend Table space on oracle Login in to the

    console from user

    Log in to the operating system with a user who has authorize for Oracle DBA and then run the

    command BRTOOLS.

    Erppi1# su orapi1

    erppi1:orapi1 54>

    Run brtools with following options

    Run brtools and then follow the following steps.

    erppi1:orapi1 54> brtools

    BR0651I BRTOOLS 7.00 (32)

    BR0280I BRTOOLS time stamp: 2012-06-26 09.51.52BR0656I Choice menu 1 - please make a selection

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

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

    BR*Tools main menu

    1 = Instance management

  • 7/30/2019 How to add datafile Extend Table space.docx

    4/13

    2 - Space management

    3 - Segment management

    4 - Backup and database copy

    5 - Restore and recovery

    6 - Check and verification7 - 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: 2012-06-26 09.51.56

    BR0663I Your choice: '2'

    BR0280I BRTOOLS time stamp: 2012-06-26 09.51.56

    BR0656I Choice menu 5 - please make a selection

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

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

    Database space management

    1 = Extend tablespace2 - 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: 2012-06-26 09.51.56

    BR0663I Your choice: '1'

  • 7/30/2019 How to add datafile Extend Table space.docx

    5/13

    BR0280I BRTOOLS time stamp: 2012-06-26 09.51.56

    BR0657I Input menu 81 - please check/enter input values

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

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

    BRSPACE options for tablespace extension

    1 - BRSPACE profile (profile) ...... [initPI1.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 initPI1.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: 2012-06-26 09.52.04

    BR0663I Your choice: 'c'

    BR0259I Program execution will be continued...

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

    tsextend'

    BR0280I BRTOOLS time stamp: 2012-06-26 09.52.04

    BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:

    c

    BR0280I BRTOOLS time stamp: 2012-06-26 09.52.11

    BR0257I Your reply: 'c'

    BR0259I Program execution will be continued...

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

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

    BR1001I BRSPACE 7.00 (32)

    BR1002I Start of BRSPACE processing: seivvhdr.tse 2012-06-26 09.52.11

  • 7/30/2019 How to add datafile Extend Table space.docx

    6/13

    BR0484I BRSPACE log file: /oracle/PI1/sapreorg/seivvhdr.tse

    BR0280I BRSPACE time stamp: 2012-06-26 09.52.11

    BR1009I Name of database instance: PI1

    BR1010I BRSPACE action ID: seivvhdr

    BR1011I BRSPACE function ID: tse

    BR1012I BRSPACE function: tsextend

    BR0280I BRSPACE time stamp: 2012-06-26 09.52.11

    BR0656I Choice menu 301 - please make a selection

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

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

    Tablespace extension main menu

    1 = Extend tablespace2 - 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:

    c

    BR0280I BRSPACE time stamp: 2012-06-26 09.52.23

    BR0663I Your choice: 'c'

    BR0259I Program execution will be continued...

    BR0280I BRSPACE time stamp: 2012-06-26 09.52.24

    BR0658I List menu 302 - please select one entry

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

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

    List of tablespaces for extension

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

  • 7/30/2019 How to add datafile Extend Table space.docx

    7/13

    1 - PSAPSR3 18/18 175484928 96.07 6901376

    176291840

    2 - PSAPSR3700 9/9 88948736 87.78 10866112

    88948736

    3 - PSAPSR3USR 1/1 389120 95.82 1625610240000

    4 - PSAPTEMP 1/0 2048000 0.00 2048000

    2048000

    5 - PSAPUNDO 1/1 7987200 0.00 7987136

    10240000

    6 - SYSAUX 1/1 634880 89.99 63552

    10240000

    7 - SYSTEM 1/1 921600 98.41 14656

    10240000

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

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

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

    BR0662I Enter your selection:

    1

    BR0280I BRSPACE time stamp: 2012-06-26 09.52.27

    BR0663I Your selection: '1'

    BR0280I BRSPACE time stamp: 2012-06-26 09.52.27

    BR0657I Input menu 303 - please check/enter input values

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

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

    Options for extension of tablespace PSAPSR3 (1. file)

    1 * Last added file name (lastfile) ....... [/oracle/PI1/sapdata4/sr3_18/sr3.data18]

    2 * Last added file size in MB (lastsize) . [9216]

    3 - New file to be added (file) ........... [/oracle/PI1/sapdata4/sr3_19/sr3.data19]

    4 ~ Raw disk / link target (rawlink) ...... [] 5 - Size of the new file in MB (size) ..... [9216]

    6 - File autoextend mode (autoextend) ..... [yes]

    7 ? Maximum file size in MB (maxsize) ..... []

    8 - File increment size in MB (incrsize) .. [20]

  • 7/30/2019 How to add datafile Extend Table space.docx

    8/13

    9 - SQL command (command) ................. [alter tablespace PSAPSR3 add

    datafile '/oracle/PI1/sapdata4/sr3_19/sr3.data19' size 9216M autoextend on next 20M

    maxsize M]

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

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

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

    BR0662I Enter your choice:

    5

    BR0280I BRSPACE time stamp: 2012-06-26 09.57.52

    BR0663I Your choice: '5'

    BR0280I BRSPACE time stamp: 2012-06-26 09.57.52

    BR0682I Enter integer value for "size" (1-32767) [9216]:

    9216

    BR0280I BRSPACE time stamp: 2012-06-26 09.57.59

    BR0683I New value for "size": '9216'

    BR0280I BRSPACE time stamp: 2012-06-26 09.57.59

    BR0657I Input menu 303 - please check/enter input values

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

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

    Options for extension of tablespace PSAPSR3 (1. file)

    1 * Last added file name (lastfile) ....... [/oracle/PI1/sapdata4/sr3_18/sr3.data18]

    2 * Last added file size in MB (lastsize) . [9216]

    3 - New file to be added (file) ........... [/oracle/PI1/sapdata4/sr3_19/sr3.data19]

    4 ~ Raw disk / link target (rawlink) ...... []

    5 - Size of the new file in MB (size) ..... [9216]

    6 - File autoextend mode (autoextend) ..... [yes]

    7 ? Maximum file size in MB (maxsize) ..... []

    8 - File increment size in MB (incrsize) .. [20]

    9 - SQL command (command) ................. [alter tablespace PSAPSR3 adddatafile '/oracle/PI1/sapdata4/sr3_19/sr3.data19' size 9216M autoextend on next 20M

    maxsize M]

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

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

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

  • 7/30/2019 How to add datafile Extend Table space.docx

    9/13

    BR0662I Enter your choice:

    7

    BR0280I BRSPACE time stamp: 2012-06-26 09.58.19

    BR0663I Your choice: '7'

    BR0280I BRSPACE time stamp: 2012-06-26 09.58.19

    BR0682I Enter integer value for "maxsize" (0-32767) []:

    9216

    BR0280I BRSPACE time stamp: 2012-06-26 09.58.24

    BR0683I New value for "maxsize": '9216'

    BR0280I BRSPACE time stamp: 2012-06-26 09.58.24

    BR0657I Input menu 303 - please check/enter input values

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

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

    Options for extension of tablespace PSAPSR3 (1. file)

    1 * Last added file name (lastfile) ....... [/oracle/PI1/sapdata4/sr3_18/sr3.data18]

    2 * Last added file size in MB (lastsize) . [9216]

    3 - New file to be added (file) ........... [/oracle/PI1/sapdata4/sr3_19/sr3.data19]

    4 ~ Raw disk / link target (rawlink) ...... []

    5 - Size of the new file in MB (size) ..... [9216]

    6 - File autoextend mode (autoextend) ..... [yes]

    7 - Maximum file size in MB (maxsize) ..... [9216]8 - File increment size in MB (incrsize) .. [20]

    9 - SQL command (command) ................. [alter tablespace PSAPSR3 add

    datafile '/oracle/PI1/sapdata4/sr3_19/sr3.data19' size 9216M autoextend on next 20M

    maxsize 9216M]

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

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

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

    BR0662I Enter your choice:c

    BR0280I BRSPACE time stamp: 2012-06-26 09.58.30

    BR0663I Your choice: 'c'

    BR0259I Program execution will be continued...

    BR0280I BRSPACE time stamp: 2012-06-26 09.58.30

  • 7/30/2019 How to add datafile Extend Table space.docx

    10/13

    BR1091I Next data file can be specified now

    BR0675I Do you want to perform this action?

    BR0676I Enter 'y[es]' to perform the action, 'n[o]/c[ont]' to skip it, 's[top]' to

    abort:

    c

    BR0280I BRSPACE time stamp: 2012-06-26 09.59.30

    BR0257I Your reply: 'c'

    BR0678I The action will be skipped...

    BR0259I Program execution will be continued...

    BR0280I BRSPACE time stamp: 2012-06-26 09.59.30

    BR0370I Directory /oracle/PI1/sapreorg/seivvhdr created

    BR0280I BRSPACE time stamp: 2012-06-26 09.59.33BR0319I Control file copy created: /oracle/PI1/sapreorg/seivvhdr/cntrlPI1.old 31211520

    BR0280I BRSPACE time stamp: 2012-06-26 09.59.33

    BR0370I Directory /oracle/PI1/sapdata4/sr3_19 created

    BR0280I BRSPACE time stamp: 2012-06-26 09.59.33

    BR1088I Extending tablespace PSAPSR3...

    Verify the extended table-space

    Though SAP GUI

    Use DB02 and then refresh to get oracle space statistics.

    Then select OK to confirm the action.

  • 7/30/2019 How to add datafile Extend Table space.docx

    11/13

    Then Check the status thorugh the DB02 and database size.[New Size is 302.97 GB]

    http://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113736/up3.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113735/up2.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113728/up1.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113736/up3.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113735/up2.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113728/up1.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113736/up3.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113735/up2.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113728/up1.png
  • 7/30/2019 How to add datafile Extend Table space.docx

    12/13

    Then check the extended tablespace and added datafile.

    [= PSAPSR3] Then

    [New datafile has been added as sr3.data19 ]

    Check Using SQL on OS and select the datafiles of

    tablespaces.

    http://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113738/db02-after3.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113737/db02-after1.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113738/db02-after3.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/102-29484-2-113737/db02-after1.png
  • 7/30/2019 How to add datafile Extend Table space.docx

    13/13