Document Type | Technical Information
Category | Administration
Applicable Product Version | Tibero6, Tibero7
Document Number | TADTI159
Overview
This document describes how to handle blank files that exist in DiskSpace (hereafter DS) in a TAS environment.
Method
Creating Blank Files in TAS
Blank characters may be included when creating database-related files.
# $TB_SID.tip DB_CREATE_FILE_DEST='+DATA0/tbdata' # tbsql create tablespace tbs_test datafile '+DATA0/tbdata/ ' size 32g;
If a file is created with a blank, the data file containing the blank may not be backed up during BEGIN / END backup operations.
There is no separate issue when performing backups using tbrmgr.
If you perform the operation in the order of BEGIN โ FILE COPY โ END, there may be a case where FILE COPY is not possible. This is because the operation is performed in the tbascmd interpreter, and it is a separate issue from Linux escape handling.
In tbascmd, if a specific patch (307138) is not applied, there is a phenomenon where blank characters are not recognized properly.
As a result, there may be a problem where files with blank characters in the file name cannot be read correctly during the file copy process using the cptolocal command.
ASCMD> ls <File_name> system/ .passwd <- Blank file name - Number of files found: 3 ASCMD> cp '+DATA0/tbdata/ ' '+DATA0/tbdata/usr002.dtf' ERROR: too many arguments for command 'cp' (rc=-12)
Workaround for Blank Files in TAS
1. Apply Patch with 307138 Included in the Binary
If you apply the 307138 patch to the current binary, files containing blanks can be handled properly.
If you want to handle it in the current version without applying the binary patch, please follow the procedure below.
2. Use tbascmd Client with 307138 Patch Included
Without replacing the binary, you can handle the issue by accessing tbascmd with a binary that has the 307138 patch applied. Connect to the current binary TAS using the tbascmd from the binary containing the 307138 patch.
# Check if patch 307138 is applied or if a patch based on it is applied $ tbboot -version |grep 307138
Copy the data file containing the blank in tbascmd.
# Connect using tbascmd from the binary with patch 307138 $ tbascmd tasport [TAS: tibero@db1 ~]$ tbascmd 7629 [15:10]ASCMD +> cd DATA0/tbdata [15:10]ASCMD +DATA0/tbdata> ls system/ .passwd ' ' <- Blank data file usr002.dtf - Number of files found: 4 [15:11]ASCMD +DATA0/tbdata> cp ' ' 'tbs_junsu001.dtf' Copying file: +DATA0/tbdata/ -> +DATA0/tbdata/tbs_junsu001.dtf 10485760 bytes (10.00 MB) copied, 0.137022 s, 76.526105 MB/s [15:11]ASCMD +DATA0/tbdata> ls system/ .passwd ' ' <- Blank data file usr002.dtf tbs_junsu001.dtf <- Copied file - Number of files found: 5
Renaming Blank Data Files in TAS
The procedure for renaming a blank data file in an environment where blank data files cannot be read, using the tbascmd client with the 307138 patch, is as follows.
1) Check for Blank Files
SQL> select '|'||file_name||'|' file_fullpath from dba_datafiles; file_fullpath -------------------------------------------------------------------------------- |+DATA0/tbdata/system/system001.dtf| |+DATA0/tbdata/system/undo001.dtf| |+DATA0/tbdata/system/usr001.dtf| |+DATA0/tbdata/system/tpr_ts.dtf| |+DATA0/tbdata/ |<- Blank file found 5 rows selected.
2) Stop TAC on Both Nodes (Only TAS Remains UP)
3) Connect to TAS Using tbascmd from the Binary with 307138 Patch Applied or a Based Patch
This binary is only used for file copying and will not be used afterward
[14:23]ASCMD +DATA0/tbdata> ls system/ .passwd ' ' <- Blank file name
4) Copy the Blank Data File
This binary is only used for file copying and will not be used afterward
[14:12]ASCMD +DATA0/tbdata> cp '+DATA0/tbdata/ ' '+DATA0/tbdata/usr002.dtf' Copying file: +DATA0/tbdata/ -> +DATA0/tbdata/usr002.dtf 1073741824 bytes (1.00 GB) copied, 11.001547 s, 97.599167 MB/s
5) Start in Mount Mode with the Original Binary
6) Rename the File in tbsql with the Original Binary
SQL> alter database rename file '+DATA0/tbdata/ ' to '+DATA0/tbdata/usr002.dtf'; Database altered.
7) Perform tbdown with the Original Binary
8) Start TAC with the Original Binary
9) Check that the Data File Name No Longer Contains a Blank
SQL> select '|'||file_name||'|' file_fullpath from dba_datafiles; file_fullpath -------------------------------------------------------------------------------- |+DATA0/tbdata/system/system001.dtf| |+DATA0/tbdata/system/undo001.dtf| |+DATA0/tbdata/system/usr001.dtf| |+DATA0/tbdata/system/tpr_ts.dtf| |+DATA0/tbdata/usr002.dtf| <- File successfully renamed 5 rows selected.