Veritas NetBackup using backint: error -8020 Reply buffer filled

Hi All
I'm trying to configure NetBackup on one of our SAP BW 7.0 system with MaxDB 7.6.00.35 running on Linux. I followed sap help and configure the backint. But when I execute the backup I'm getting the following error.
Constructed the following reply:
ERR
-24920,ERR_BACKUPOP: backup operation was unsuccessful
The backup tool failed with 2 as sum of exit codes. The database request failed with error -8020.
Reply buffer filled.
following is the dbm.ebp
2007-06-26 21:35:40
Setting environment variable 'TEMP' for the directory for temporary files and pipes to default ''.
Setting environment variable 'TMP' for the directory for temporary files and pipes to default ''.
Using connection to Backint for MaxDB Interface.
2007-06-26 21:35:40
Checking existence and configuration of Backint for MaxDB.
Using configuration variable 'BSI_ENV' = '/sapdb/data/wrk/BWA/backint/config' as path of the configuration file of Backint for MaxDB.
Setting environment variable 'BSI_ENV' for the path of the configuration file of Backint for MaxDB to configuration value '/sapdb/data/wrk/BWA/backint/config'.
Reading the Backint for MaxDB configuration file '/sapdb/data/wrk/BWA/backint/config'.
Found keyword 'BACKINT' with value '/sapdb/BWA/db/bin/backint'.
Found keyword 'INPUT' with value '/sapdb/data/wrk/BWA/backint/backint4MAXDB.in'.
Found keyword 'OUTPUT' with value '/sapdb/data/wrk/BWA/backint/backint4MAXDB.out'.
Found keyword 'ERROROUTPUT' with value '/sapdb/data/wrk/BWA/backint/backint4MAXDB.err'.
Found keyword 'PARAMETERFILE' with value '/sapdb/data/wrk/BWA/backint/adapter.para'.
Found keyword 'TIMEOUT_SUCCESS' with value '600'.
Found keyword 'TIMEOUT_FAILURE' with value '300'.
Found keyword 'ORIGINAL_RUNDIRECTORY' with value '/sapdb/data/wrk/BWA/'.
Finished reading of the Backint for MaxDB configuration file.
Using '/sapdb/BWA/db/bin/backint' as Backint for MaxDB program.
Using '/sapdb/data/wrk/BWA/backint/backint4MAXDB.in' as input file for Backint for MaxDB.
Using '/sapdb/data/wrk/BWA/backint/backint4MAXDB.out' as output file for Backint for MaxDB.
Using '/sapdb/data/wrk/BWA/backint/backint4MAXDB.err' as error output file for Backint for MaxDB.
Using '/sapdb/data/wrk/BWA/backint/adapter.para' as parameter file for Backint for MaxDB.
Using '600' seconds as timeout for Backint for MaxDB in the case of success.
Using '300' seconds as timeout for Backint for MaxDB in the case of failure.
Using '/sapdb/data/wrk/BWA/dbm.knl' as backup history of a database to migrate.
Using '/sapdb/data/wrk/BWA/dbm.ebf' as external backup history of a database to migrate.
Checking availability of backups using backint's inquire function.
Check passed successful.
2007-06-26 21:35:40
Checking medium.
Check passed successfully.
2007-06-26 21:35:40
Preparing backup.
Setting environment variable 'BI_CALLER' to value 'DBMSRV'.
Setting environment variable 'BI_REQUEST' to value 'NEW'.
Setting environment variable 'BI_BACKUP' to value 'FULL'.
Constructed Backint for MaxDB call '/sapdb/BWA/db/bin/backint -u BWA -f backup -t file -p /sapdb/data/wrk/BWA/backint/adapter.para -i /sapdb/data/wrk/BWA/backint/backint4MAXD
B.in -c'.
Created temporary file '/sapdb/data/wrk/BWA/backint/backint4MAXDB.out' as output for Backint for MaxDB.
Created temporary file '/sapdb/data/wrk/BWA/backint/backint4MAXDB.err' as error output for Backint for MaxDB.
Writing '/backup/BWA/BWAPIPE #PIPE' to the input file.
Prepare passed successfully.
2007-06-26 21:35:40
Creating pipes for data transfer.
Creating pipe '/backup/BWA/BWAPIPE' ... Done.
All data transfer pipes have been created.
2007-06-26 21:35:40
Starting database action for the backup.
Requesting 'SAVE DATA QUICK TO '/backup/BWA/BWAPIPE' PIPE BLOCKSIZE 8 NO CHECKPOINT MEDIANAME 'BWAPIPE'' from db-kernel.
The database is working on the request.
2007-06-26 21:35:40
Waiting until database has prepared the backup.
Asking for state of database.
2007-06-26 21:35:40 Database is still preparing the backup.
Waiting 1 second ... Done.
Asking for state of database.
2007-06-26 21:35:41 Database is still preparing the backup.
Waiting 2 seconds ... Done.
Asking for state of database.
2007-06-26 21:35:43 Database has finished preparation of the backup.
The database has prepared the backup successfully.
2007-06-26 21:35:43
Starting Backint for MaxDB.
Starting Backint for MaxDB process '/sapdb/BWA/db/bin/backint -u BWA -f backup -t file -p /sapdb/data/wrk/BWA/backint/adapter.para -i /sapdb/data/wrk/BWA/backint/backint4MAXD
B.in -c >>/sapdb/data/wrk/BWA/backint/backint4MAXDB.out 2>>/sapdb/data/wrk/BWA/backint/backint4MAXDB.err'.
Process was started successfully.
Backint for MaxDB has been started successfully.
2007-06-26 21:35:44
Waiting for end of the backup operation.
2007-06-26 21:35:44 The backup tool is running.
2007-06-26 21:35:44 The database is working on the request.
2007-06-26 21:35:49 The backup tool is running.
2007-06-26 21:35:49 The database is working on the request.
2007-06-26 21:35:59 The backup tool is running.
2007-06-26 21:35:59 The database is working on the request.
2007-06-26 21:36:14 The backup tool is running.
2007-06-26 21:36:14 The database is working on the request.
2007-06-26 21:36:34 The backup tool is running.
2007-06-26 21:36:34 The database is working on the request.
2007-06-26 21:36:41 The backup tool process has finished work with return code 2.
2007-06-26 21:36:41 The database has finished work on the request.
Receiving a reply from the database kernel.
Got the following reply from db-kernel:
SQL-Code :-8020
Date :20070626
Time :00213542
Database :BWA
Server :s254176rg04
KernelVersion :Kernel 7.6.00 Build 035-123-139-084
PagesTransfered :131072
PagesLeft :2847194
MediaName :BWAPIPE
Location :/backup/BWA/BWAPIPE
Errortext :end of file
Label :DAT_000000025
IsConsistent :true
FirstLogPageNo :1777329
DBStamp1Date :20070626
DBStamp1Time :00213541
BDPageCount :2978242
DevicesUsed :1
DatabaseID :s254176rg04:BWA_20070605_123955
Max Used Data Page
Converter Page Count :1604
The backup operation has ended.
2007-06-26 21:36:41
Filling reply buffer.
Have encountered error -24920:
The backup tool failed with 2 as sum of exit codes. The database request failed with error -8020.
Constructed the following reply:
ERR
-24920,ERR_BACKUPOP: backup operation was unsuccessful
The backup tool failed with 2 as sum of exit codes. The database request failed with error -8020.
Reply buffer filled.
2007-06-26 21:36:41
Cleaning up.
Removing data transfer pipes.
Removing data transfer pipe /backup/BWA/BWAPIPE ... Done.
Removed data transfer pipes successfully.
Copying output of Backint for MaxDB to this file.
Begin of output of Backint for MaxDB (/sapdb/data/wrk/BWA/backint/backint4MAXDB.out)----
Reading parameter file /sapdb/data/wrk/BWA/backint/adapter.para.
Using staging area /sapdb/BWA/backintstage/stage1 with a size of 1073741824 bytes.
Using staging area /sapdb/BWA/backintstage/stage2 with a size of 1073741824 bytes.
Using staging area /sapdb/BWA/backintstage/stage3 with a size of 1073741824 bytes.
Using staging area /sapdb/BWA/backintstage/stage4 with a size of 1073741824 bytes.
Using 2 file per Backint for Oracle call.
Using /sapdb/BWA/db/bin/backint as Backint for Oracle.
Using /sapdb/data/wrk/BWA/backint/initBWA.utl as parameterfile of Backint for Oracle.
Using /sapdb/data/wrk/BWA/backint/BackintHistory as history file.
Using /sapdb/data/wrk/BWA/backint/backint4Oracle.in as input of Backint for Oracle.
Using /sapdb/data/wrk/BWA/backint/backint4Oracle.out as output of Backint for Oracle.
Using /sapdb/data/wrk/BWA/backint/backint4Oracle.err as error output of Backint for Oracle.
Reading input file /sapdb/data/wrk/BWA/backint/backint4MAXDB.in.
Backing up pipe /backup/BWA/BWAPIPE.
Found 1 entry in the input file.
Starting the backup.
Starting pipe2file program(s).
Waiting for creation of temporary files.
1 temporary file is available for backup.
Calling Backint for Oracle at 2007-06-26 21:36:40.
Calling '/sapdb/BWA/db/bin/backint -u BWA -f backup -t file -p /sapdb/data/wrk/BWA/backint/initBWA.utl -i /sapdb/data/wrk/BWA/backint/backint4Oracle.in -c' .
Backint for Oracle ended at 2007-06-26 21:36:40 with return code 2.
Backint for Oracle output: Reading parameter file /sapdb/data/wrk/BWA/backint/initBWA.utl.
Backint for Oracle output:
Backint for Oracle output:
Backint for Oracle error output: No staging area is defined in the parameter file.
Backint for Oracle error output: The path of Backint for Oracle is not defined in the parameter file.
Backint for Oracle error output: The name of the history file is not defined in the parameter file.
Backint for Oracle error output: The name of the input file of Backint for Oracle is not defined in the parameter file.
Backint for Oracle error output: The name of the output file of Backint for Oracle is not defined in the parameter file.
Backint for Oracle error output: The name of the error output file of Backint for Oracle is not defined in the parameter file.
Backint for Oracle error output:
Finished the backup unsuccessfully.
#ERROR /backup/BWA/BWAPIPE
End of output of Backint for MaxDB (/sapdb/data/wrk/BWA/backint/backint4MAXDB.out)----
Removed Backint for MaxDB's temporary output file '/sapdb/data/wrk/BWA/backint/backint4MAXDB.out'.
Copying error output of Backint for MaxDB to this file.
Begin of error output of Backint for MaxDB (/sapdb/data/wrk/BWA/backint/backint4MAXDB.err)----
Backint for Oracle was unsuccessful.
End of error output of Backint for MaxDB (/sapdb/data/wrk/BWA/backint/backint4MAXDB.err)----
Removed Backint for MaxDB's temporary error output file '/sapdb/data/wrk/BWA/backint/backint4MAXDB.err'.
Removed the Backint for MaxDB input file '/sapdb/data/wrk/BWA/backint/backint4MAXDB.in'.
Have finished clean up successfully.
Please help
Thanks
Andy

Hi Natalia
Thanks for the reply. Below is initBWA.utl file. At this stage The first staging file is successfully written to the tape and the backup fails after that. The problem I guess is the staging file is not getting deleted or over written after it is written to the tape. Thanks   
backint parameters
switch_list: is required and is used as a control file to communicate with
BACKINT and BRBACKUP for online backups.  A switch list file is created
every time BRBACKUP wants to backup a file or when it wants to indicate that
a backup is finished.  The switch_list parameter must be set to a file path
that is located in: $ORACLE_HOME/sapbackup/.switch.lis.
switch_list /sapdb/BWA/backintstage/.switch.lis
switch_sem: is required and is used as a control file which is used between
BACKINT and BRBACKUP to communicate.  After the switch list file has been
created and closed, BACKINT creates the switch semaphore file and waits until
it is deleted by BRBACKUP.  The switch_sem parameter must be set to a file
path that is located in: $ORACLE_HOME/sapbackup/.switch.sem.
switch_sem /sapdb/BWA/backintstage/.switch.sem
switch_log: is required and is used as a control file which is used between
BACKINT and BRBACKUP to communicate.  After the switch semaphore file has
been deleted, BACKINT opens and reads the switch log file to determine if
the process is successful.  The switch log file is created by BRBACKUP.  The
switch_log parameter must be set to a file path that is located in:
$ORACLE_HOME/sapbackup/.switch_log.
switch_log /sapdb/BWA/backintstage/.switch.log
backint_dir: is an optional parameter and must be set to a directory that is
public.  BACKINT uses this directory for work space and to store files called
backint.times, which keeps track of backup information.
#backint_dir /oracle/SAP/sapscript/backint_dir
server: is an optional parameter and is the machine name of the NetBackup
Master server.   The NetBackup Master server is the name of the machine that
provides most of the administration and control for Netbackup operations and
contains the NetBackup database.  If BACKINT finds a $SAP_SERVER environment
variable, the server parameter's value will be overriden by the value of
$SAP_SERVER.  Also, if the server parameter is not specified and there is no
environment variable then the server parameter value will default to the
SERVER option specified in the Netbackkup bp.conf file.
#server jupiter
client: is an optional parameter and must be set to a machine name that has
the NetBackup client software, an Oracle database, and a SAP environment.
In some cases the server and client machine will be the same machine.  If
BACKINT finds a $SAP_CLIENT environment variable, the client parameter value
will be overriden by the assigned environment variable.  If the client
parameter is not specified and there is no environment variable, then the
client parameter value will default to the CLIENT_NAME specified in the
Netbackkup bp.conf file.  If the value is not in bp.conf, BACKINT uses the
value returned by the gethostname() libary function.
#client jupiter
drives: is an optional parameter and should be set to the number of
simultaneous tape drives to kickoff backup. Set NetBackup Server to support
multiple simultaneous client backups and the number of storage units/tape
drives for this backup policy.  Based on the number of drives specified
BACKINT will simultaneously run the same number of bpbackup/bprestore
commands.  So for example, if the drives parameter is set to 5, then 5
bpbackup/bprestore jobs will run at the same time.  The drives parameter
should be set to the following rule:
drives = Number of storage units per policy  X  MPX number
The drives parameter value should not exceed the Set Maxium Jobs per Client
global attribute.  If BACKINT finds a $SAP_DRIVES environment variable, the
drive parameter value will be overriden by the value of the $SAP_DRIVES
variable.  If the drive parameter is not specified and there is no
environment variable, then BACKINT will exit with an error.
#drives 1
policy: is an optionl parameter and should be set to the name of a SAP policy
type that has been defined in Netbackup.  The SAP policy must have a schedule
type of Application Backup defined in order for BACKINT to work.  If BACKINT finds
a $SAP_POLICY environment variable, the policy parameter value will be
overriden by the value of the $SAP_POLICY variable.  If the policy parameter
is not specified and there is no environment variable, then the policy
parameter value will default to the BPBACKUP_POLICY option in the NetBackup
bp.conf file.  By default, BPBACKUP_POLICY is not in any bp.conf file, then
NetBackup uses the first SAP policy type that it finds that has the client
and a user-directed backup schedule.
policy AXON2541766-SAP
schedule: Is optional and must be set to the name of type  Application Backup
schedule that is associates with a SAP policy type.  The schedule can
define aspects of the backup such as how long Netbackup retains images,
maximum MPX per drive, storage unit, and volume pool.  If BACKINT finds a
$SAP_SCHED environment variable, the schedule parameter value will be
overriden by the value of the $SAP_SCHED environment variable.  If the
schedule parameter is not specified and there is no environment variable,
then the schedule parameter value will default to the BPBACKUP_SCHED option
in the NetBackup bp.conf file.  By default BPBACKUP_SCHED is not in any
bp.conf file then, NetBackup uses the first schedule of type Application Backup
that it finds. It is higly recommended to set schedule parameter in *.utl file.
#schedule Default-Application-Backup
policy2: is optional and is the name of a policy to be used for the
secondary SAP backup.  The secondary backup is performed for each SAP
database backup on files that are needed to track SAP backup information.
This option would be used to save the backup information on a different
media.  If policy2 is not specified, then the policy parameter value is used.
#policy2 sap_sec_backup
schedule2: is optional and is the name of a Application Backup schedule to be
used for the secondary SAP  backup.  The secondary backup is performed for
each SAP database backup on files that are needed to track SAP backup
information.  This option would be used to save the backup information on a
different media.  If schedule2 is not specified, then the schedule parameter
value is used.
#schedule2 userbkps
sort_backup_type: [size | custom | device | drive ]
This parameter is optional and is used to specify four different backup
sort option.  If sort_backup_type is not specified it will default to
the size option.
#sort_backup_type size
sort_backup_type: [image | custom | drive ]
This parameter is optional and is used to specify three different restore
sort option.  If sort_restore_type is not specified it will default to
the image option.
#sort_restore_type image
custom_sort_file: is optional and is used in conjunction with the
sort_backup_type and sort_restore_type parameter.  If the custom option is
specified on either the sort_backup_type or sort_restore_type parameter,
then the custom_sort_file parameter needs to be set to a valid file.  The
value for this parameter must be a full path name to a custom sort file and
must have public permissions.
#custom_sort_file /oracle/SAP/sapscripts/custom_sort_file
master_time_offset:  is an option parameter used to restore old backups
if there was a time difference between the master and client machines.
This option should only be used for restoring 3.0 or older backup or if a
backint restore can't find a specified backup.  The master_time_offset is
specified in minutes.  The value will be subtract from the start time and
added to the end time for a restore or inquire.
#master_time_offset 2
#sleep: is optional and is used to specify a sleep time to monitor the
bpbackup or bprestore logs.  The default is 5 seconds.  When BACKINT is
called a number of bpbackup/bprestore commands can be running at the
sametime.  BACKINT monitors each command and display the information to the
-o parameter.  In some cases bpbackup/bprestore information is not displayed
because of the monitoring cycle.  Therefore this option is used mainly for
debug reasons.
#sleep 5
policy_log: is optional and is the name of a policy to be used for
backing up a second copy of an archive log.  If this option is specified
then two backups will be performed on the same archive log.  The first
backup will go to the "policy" name option and the second backup will go
to the "policy_log" name option.
#policy_log sap_archive_logs
sched_log: is optional and is the name of a schedule to create a second
backing up of an archive log.  If this option is specified then two backup
will be performed on the same archive log.  The first backup will go to the
"schedule" option and the second backup will be go to the "sched_log" and
option.  The "sched_log" name must be a valid schedule name under the
"policy_log" name option, otherwise it must be a valid schedule name under
the "policy" name option.
#sched_log Default-Application-Backup
retry_backup: is an optional parameter and should be set to the number of
retries for a failed backup.  If this option is specified BACKINT will
retry a failed bpbackup job.  The number of retries is determine by the
value on the retry_backup parameter.
#retry_backup 2
fail_backup: is optional and is used to stop the backup process immediately
when an error occurs.  The standard behavior of BACKINT is to continue
processing even in the event of an error and then report what files failed
and what files were successful.  If this parameter is specified then BACKINT
will stop process on the first error and report failures for all the
files that were not backed up.
#fail_backup
media_notify_script: is optional and is used to call a script when a
"Waiting mount" is displayed in a bpbackup/bprestore log.  The value for this
option must be the full path name to a script.  The script should also have
the right file permissions and should be tested before implementation.  If
the message is encountered and this optional is specified, then the
following commands will be executed from BACKINT:
  MEDIA_ID=A001;export MEDIA_ID
  NETBACKUP_SERVER=saturn;export NETBACKUP_SERVER
  /oracle/SAP/sapscripts/sap_media_notify
#media_notify_script /oracle/SAP/sapscripts/sap_media_notify
restore_filter: is optional and is used to resolve linked file paths on a
restore.  This parameter should be commented out and should be used only on
rare occassions.  The following are the cases were this parameter is needed:
  1) Oracle table spaces use file paths
  2) The directory paths to the Oracle table spaces are linked paths
  3) The linked directory paths don't exist at restore time
The value for this parmater must be a fully qualified file path name to a
script, which has the right permissions and has been tested before being
implemented.  The script must have an input and output parameter and be able
to modify the contents of a text file which contains file paths.  The script
is responsible for converting linked directory paths into absolute directory
paths. See /usr/openv/netbackup/ext/db_ext/sap/scripts/restore_filter for
an example.
#restore_filter /oracle/SAP/sapscripts/restore_filter.sh
bplist_filter: is optional and is used to resolve linked file passes on an
inquire.  This parameter should be commented out and should be used only on
rare occassions.  Like the restore_filter_script parameter this is needed
for the following cases:
  1) Oracle table spaces use file paths
  2) The directory paths to the Oracle table spaces are linked paths
  3) The linked directory paths don't exist at restore time
The value for this option must be a fully qualified path name to a script,
which has the right file permission and has been tested before being
implemented.  The script must have an input and output parameter and be able
to modify the contents of a text file, which contains file paths.  The script
is responsible for converting absolute directory paths into linked directory
paths.  This is just the opposite of the restore filter script. See
/usr/openv/netbackup/ext/db_ext/sap/scripts/bplist_filter for an example.

Similar Messages

  • Configure MaxDB with Veritas Netbackup

    Hi team,
        When i configure Veritas Netbackup with MaxDB I have the following queries:
    1. should i create a staging file (will it get created automatically) ?
    2. Will all the log, error & History files get created automatically?
    3. Should i use PIPES only to take backup? can't i use FILE backup?
    please help
    Thanks in advance
    Regards,
    Pradeep Chandru.

    Hi,
      I have made the log files to be generated. Now i am getting the following error:
    dbm.prt
    2006-09-04 16:07:15 0x00002624 INF        283 DBMSrv   command backup_save "test01" DATA RECOVERY
    2006-09-04 16:08:22 0x00002624 ERR     -24920 DBMSrv   ERR_BACKUPOP: backup operation was unsuccessful
                        0x00002624 ERR     -24778 DBMSrv   The backup tool failed with 2 as sum of exit codes. The database request was canceled and ended with error -903.
    2006-09-04 16:32:50 0x00002624 INF        226 DBMSrv   DBM Server client disconnect: PID 7012 on computer xxxxxxxx.local
    dbm.ebl
      2006-09-04 16:07:49 The database is working on the request.
        2006-09-04 16:08:09 The database is working on the request.
        2006-09-04 16:08:20 Canceling Utility-task after a timeout of 60 seconds elapsed ... OK.
        2006-09-04 16:08:21 The database has finished work on the request.
        Receiving a reply from the database kernel.
        Got the following reply from db-kernel:
            SQL-Code              :-903
    The backup operation has ended.
    2006-09-04 16:08:21
    Filling reply buffer.
        Have encountered error -24920:
            The backup tool failed with 2 as sum of exit codes. The database request was canceled and ended with error -903.
        Constructed the following reply:
            ERR
            -24920,ERR_BACKUPOP: backup operation was unsuccessful
            The backup tool failed with 2 as sum of exit codes. The database request was canceled and ended with error -903.
    Reply buffer filled.
    2006-09-04 16:08:22
    Cleaning up.
        Copying output of Backint for MaxDB to this file.
    dbm.prt
    (established at 2006-09-04 15:31:14): PID 11028 on computer xxxxxxxx.local
    2006-09-04 15:31:14 0x000026f8 INF        283 DBMSrv   command backup_start BACKt09 DATA
    2006-09-04 15:32:20 0x000026f8 ERR     -24920 DBMSrv   ERR_BACKUPOP: backup operation was unsuccessful
                        0x000026f8 ERR     -24778 DBMSrv   The backup tool failed with 2 as sum of exit codes. The database request was canceled and ended with error -903.
    2006-09-04 15:32:20 0x000026f8 INF        226 DBMSrv   DBM Server client disconnect: PID 11028 on computer xxxxxx.local
    2006-09-04 15:32:53 0x00001900 INF        216 DBMSrv   DBM Server client connection (established at 2006-09-04 15:32:53): PID 7308 on computer xxxxx.local
    2006-09-04 15:32:53 0x00001900 INF        283 DBMSrv   command backup_start BACKt09 DATA
    2006-09-04 15:33:58 0x00001900 ERR     -24920 DBMSrv   ERR_BACKUPOP: backup operation was unsuccessful
                        0x00001900 ERR     -24778 DBMSrv   The backup tool failed with 2 as sum of exit codes. The database request was canceled and ended with error -903.
    2006-09-04 15:33:58 0x00001900 INF        226 DBMSrv   DBM Server client disconnect: PID 7308 on computer xxxxxx.local
    Incase any logs are required then please let me know.

  • Backup using backint fails for maxdb

    Hi All, I have configured backint for backup of maxdb for content server 640. I configured it as per the documents available, created the configuration fiale and the parameter file. Created the backup medium in dbmgui. Now when i try to run the backup using the pipe am getting the above mentioned error. Please find below the dbm.ebp log for the same...
    more dbm.ebp 2009-10-22 02:06:08 Setting environment variable 'TEMP' for the directory for temporary files and pi pes to default ''. Setting environment variable 'TMP' for the directory for temporary files and pip es to default ''. Using connection to Backint for MaxDB Interface. 2009-10-22 02:06:08 Checking existence and configuration of Backint for MaxDB. Using configuration variable 'BSI_ENV' = '/sapdb/CFC/lcbackup/apoatlas.env' as path of the configuration file of Backint for MaxDB. Setting environment variable 'BSI_ENV' for the path of the configuration fil e of Backint for MaxDB to configuration value '/sapdb/CFC/lcbackup/apoatlas.env' . Reading the Backint for MaxDB configuration file '/sapdb/CFC/lcbackup/apoatl as.env'. Found keyword 'BACKINT' with value '/sapdb/CFC/db/bin/backint'. Found keyword 'INPUT' with value '/tmp/backint4sapdbCFC.in'. Found keyword 'OUTPUT' with value '/tmp/backint4sapdbCFC.out'. Found keyword 'ERROROUTPUT' with value '/tmp/backint4sapdbCFC.err'. Found keyword 'PARAMETERFILE' with value '/sapdb/CFC/lcbackup/param.cfg' . Found keyword 'TIMEOUT_SUCCESS' with value '1800'. Found keyword 'TIMEOUT_FAILURE' with value '1800'. Finished reading of the Backint for MaxDB configuration file. Using '/sapdb/CFC/db/bin/backint' as Backint for MaxDB program. Using '/tmp/backint4sapdbCFC.in' as input file for Backint for MaxDB. Using '/tmp/backint4sapdbCFC.out' as output file for Backint for MaxDB. Using '/tmp/backint4sapdbCFC.err' as error output file for Backint for MaxDB . Using '/sapdb/CFC/lcbackup/param.cfg' as parameter file for Backint for MaxD B. Using '1800' seconds as timeout for Backint for MaxDB in the case of success . Using '1800' seconds as timeout for Backint for MaxDB in the case of failure . Using '/sapdb/data/wrk/CFC/dbm.knl' as backup history of a database to migra te. Using '/sapdb/data/wrk/CFC/dbm.ebf' as external backup history of a database to migrate. Checking availability of backups using backint's inquire function. Check passed successful. 2009-10-22 02:06:08 Checking medium. Check passed successfully. 2009-10-22 02:06:08 Preparing backup. Setting environment variable 'BI_CALLER' to value 'DBMSRV'. Setting environment variable 'BI_REQUEST' to value 'NEW'. Setting environment variable 'BI_BACKUP' to value 'FULL'. Constructed Backint for MaxDB call '/sapdb/CFC/db/bin/backint -u CFC -f back up -t file -p /sapdb/CFC/lcbackup/param.cfg -i /tmp/backint4sapdbCFC.in -c'. Created temporary file '/tmp/backint4sapdbCFC.out' as output for Backint for MaxDB. Created temporary file '/tmp/backint4sapdbCFC.err' as error output for Backi nt for MaxDB. Writing '/sapdb/CFC/lcbackup/pipe1 #PIPE' to the input file. Writing '/sapdb/CFC/lcbackup/pipe2 #PIPE' to the input file. Prepare passed successfully. 2009-10-22 02:06:08 Creating pipes for data transfer. Creating pipe '/sapdb/CFC/lcbackup/pipe1' ... Done. Creating pipe '/sapdb/CFC/lcbackup/pipe2' ... Done. All data transfer pipes have been created. 2009-10-22 02:06:08 Starting database action for the backup. Requesting 'SAVE DATA QUICK TO '/sapdb/CFC/lcbackup/pipe1' PIPE,'/sapdb/CFC/ lcbackup/pipe2' PIPE BLOCKSIZE 8 NO CHECKPOINT MEDIANAME 'BACKINT_ONLINE1'' from db-kernel. The database is working on the request. 2009-10-22 02:06:09 Waiting until database has prepared the backup. Asking for state of database. 2009-10-22 02:06:09 Database is still preparing the backup. Waiting 1 second ... Done. Asking for state of database. 2009-10-22 02:06:10 Database is still preparing the backup. Waiting 2 seconds ... Done. Asking for state of database. 2009-10-22 02:06:12 Database has finished preparation of the backup. The database has prepared the backup successfully. 2009-10-22 02:06:12 Starting Backint for MaxDB. Starting Backint for MaxDB process '/sapdb/CFC/db/bin/backint -u CFC -f back up -t file -p /sapdb/CFC/lcbackup/param.cfg -i /tmp/backint4sapdbCFC.in -c >>/tm p/backint4sapdbCFC.out 2>>/tmp/backint4sapdbCFC.err'. Process was started successfully. Backint for MaxDB has been started successfully. 2009-10-22 02:06:12 Waiting for end of the backup operation. 2009-10-22 02:06:12 The backup tool is running. 2009-10-22 02:06:12 The database is working on the request. 2009-10-22 02:06:14 The backup tool process has finished work with return co de 2. 2009-10-22 02:06:17 The database is working on the request. 2009-10-22 02:06:27 The database is working on the request. 2009-10-22 02:06:42 The database is working on the request. 2009-10-22 02:07:02 The database is working on the request. 2009-10-22 02:07:15 Canceling Utility-task after a timeout of 60 seconds ela psed ... OK. 2009-10-22 02:07:17 The database has finished work on the request. Receiving a reply from the database kernel. Got the following reply from db-kernel: SQL-Code :-903 The backup operation has ended. 2009-10-22 02:07:17 Filling reply buffer. Have encountered error -24920: The backup tool failed with 2 as sum of exit codes. The database request was canceled and ended with error -903. Constructed the following reply: ERR -24920,ERR_BACKUPOP: backup operation was unsuccessful The backup tool failed with 2 as sum of exit codes. The database request was canceled and ended with error -903. Reply buffer filled. 2009-10-22 02:07:17 Cleaning up. Removing data transfer pipes. Removing data transfer pipe /sapdb/CFC/lcbackup/pipe2 ... Done. Removing data transfer pipe /sapdb/CFC/lcbackup/pipe1 ... Done. Removed data transfer pipes successfully. Copying output of Backint for MaxDB to this file. -
    Begin of output of Backint for MaxDB (/tmp/backint4sapdbCFC.out)- -
    Data Protection for mySAP(R) Interface between BR*Tools and Tivoli Storage Manager - Version 5, Release 4, Modification 0.0 for Linux x86_64 - Build: 303 compiled on Nov 16 2006 (c) Copyright IBM Corporation, 1996, 2006, All Rights Reserved. BKI0008E: The environment variable BI_CALLER is not set correctely. The current value is "DBMSRV" usage: backint -p  [-u ] [-f ] [-t ] [-i ] [-o ] [-c] where:  backint utility user  backup | restore | inquire | password | delete  file | file_online  parameter file for backup utility  name of a text file that defines the objects default: STDIN  Pool for processing messages and the results of the executed function. default: STOUT BKI0020I: End of program at: Thu 22 Oct 2009 02:06:14 AM EDT . BKI0021I: Elapsed time: 01 sec . BKI0024I: Return code is: 2. -
    End of output of Backint for MaxDB (/tmp/backint4sapdbCFC.out)- - Removed Backint for MaxDB's temporary output file '/tmp/backint4sapdbCFC.out '. Copying error output of Backint for MaxDB to this file. - Begin of error output of Backint for MaxDB (/tmp/backint4sapdbCFC .err) - End of error output of Backint for MaxDB (/tmp/backint4sapdbCFC.e rr)--
    Removed Backint for MaxDB's temporary error output file '/tmp/backint4sapdbC FC.err'. Removed the Backint for MaxDB input file '/tmp/backint4sapdbCFC.in'. Have finished clean up successfully.
    Also, is there any specification about the user permissions and about how the backup should be run?

    Hi Lars,
    I understand that its a clumpsy over here, but i already have raised an OSS message and SAP said, that they cannot support this issue with backint. If you can provide me with an email id, i can send you the log files which would be easy to read.
    My issue is that am not able run backup for maxdb of content server 640 using the backint tool.
    I have created the configuration file and the parameter file as per the specifications from http://maxdb.sap.com/doc/7_7/a9/8a1ef21e4b402bb76ff75bb559a98a/content.htm and http://maxdb.sap.com/doc/7_7/50/075205962843f69b9ec41f34427be7/content.htm.
    THe server is registered to the TSM server. Now when i run the wizard to take the backup using the backint tool, it gives the error "Begin of output of Backint for MaxDB (/tmp/backint4sapdbCFC.out)- -
    Data Protection for mySAP(R) Interface between BR*Tools and Tivoli Storage Manager - Version 5, Release 4, Modification 0.0 for Linux x86_64 - Build: 303 compiled on Nov 16 2006 (c) Copyright IBM Corporation, 1996, 2006, All Rights Reserved. BKI0008E: The environment variable BI_CALLER is not set correctely. The current value is "DBMSRV" usage: backint -p  [-u ] [-f ] [-t ] [-i ] [-o ] [-c] where:  backint utility user  backup | restore | inquire | password | delete  file | file_online  parameter file for backup utility  name of a text file that defines the objects default: STDIN  Pool for processing messages and the results of the executed function. default: STOUT BKI0020I: End of program at: Thu 22 Oct 2009 02:06:14 AM EDT . BKI0021I: Elapsed time: 01 sec . BKI0024I: Return code is: 2. -
    End of output of Backint for MaxDB (/tmp/backint4sapdbCFC.out)- - Removed Backint for MaxDB's temporary output file '/tmp/backint4sapdbCFC.out '. Copying error output of Backint for MaxDB to this file. - Begin of error output of Backint for MaxDB (/tmp/backint4sapdbCFC .err) - End of error output of Backint for MaxDB (/tmp/backint4sapdbCFC.e rr)--
    Removed Backint for MaxDB's temporary error output file '/tmp/backint4sapdbC FC.err'. Removed the Backint for MaxDB input file '/tmp/backint4sapdbCFC.in'. Have finished clean up successfully."
    I think this should be fine to read...
    Krishna KK

  • Backup MaxDB 7.7.06.09 to Veritas Netbackup 6.5 fails

    We want to backup MaxDB to Veritas Netbackup server.
    According documentation found about this topic the backup is configured
    by creating 3 files: bsi.env, initWDO.par (for backint for MaxDB) and
    initWDO.utl (for backint for Oracle). The contents of these files are shown below.
    When running the backup, it seems that backint for MaxDB ends with return code 2,
    the error message received is:
      -24920,ERR_BACKUPOP: backup operation was unsuccessful
      The backup tool failed with 2 as sum of exit codes.
    Unfortunately no further errors/warnings are shown that points in any direction
    what's going wrong here.
    We start the backup via the following dbmcli-command:
    dbmcli -u control,****** -d WDO -uUTL control,****** backup_start BACKData_WDO
    (for the time being without xuser entries, first make sure the backup is ok)
    The files dbm.ebl, dbm.prt and several others do not show any additional details/hints.
    It seems as if the "save data quick" to the named pipe is ok, the sql-code returns "0".
    After this the backint for MaxDB should read the named pipe and write it to stage-files,
    but backint (for MaxDB) ends with return code 2.
    Any idea what might go wrong here?
    With kind regards,
    R. Hoogeveen
    The Netherlands
    File bsi.env:
    =========
    BACKINT                /sapdb/WDO/db/bin/backint
    INPUT                  /tmp/backint4maxdb_WDO.in
    OUTPUT                 /tmp/backint4maxdb_WDO.out
    ERROROUTPUT            /tmp/backint4maxdb_WDO.err
    PARAMETERFILE          /sapdb/data/wrk/WDO/initWDO.par
    TIMEOUT_SUCCESS        600
    TIMEOUT_FAILURE        300
    ORIGINAL_RUNDIRECTORY  /sapdb/data/wrk/WDO
    File initWDO.par:
    =============
    STAGING AREA:                  /tmp/stageWDO 1 GB
    FILES PER BACKINT CALL:        1
    BACKINT:                       /usr/openv/netbackup/bin/backint
    PARAMETERFILE OF BACKINT:      /sapdb/data/wrk/WDO/initWDO.utl
    HISTORY FILE:                  /sapdb/data/wrk/WDO/backint_history_WDO.log
    INPUTFILE FOR BACKINT:         /tmp/backint4ora_WDO.in
    OUTPUTFILE FOR BACKINT:        /tmp/backint4ora_WDO.out
    ERRORFILE FOR BACKINT:         /tmp/backint4ora_WDO.err
    MAXIMAL DELAY OF BACKINT CALL: 30
    File initWDO.utl:
    =============
    switch_list /tmp/.switch_WDO.lis
    switch_sem /tmp/.switch_WDO.sem
    switch_log /tmp/.switch_WDO.log
    drives 1
    client wdocsz01
    server backfire
    policy sap_WDO

    Lars,
    The /tmp/backint4maxdb.err file tells me:
    Backint for Oracle was unsuccessful.
    (Unfortunately that was all information in this file.)
    The backint4ora.in file tells me:
    /tmp/stageWDO.0
    (looks ok to me, also at the time backint4ora was started the stage file was created with non-zero size)
    The backint4ora.out file tells me:
    ERROR: incorrect format or option in .utl file (-p)
    (this seems as if the -p option is not recognized by the backint4ora executable)
    When I run this executable manually as user sdb it shows me the commandline that I should use, including the -p option.
    One strange thing I notice is that the order of the options is different from the commandline that is executed.
    (in the usage it shows -p as almost last parameter, the command executed has -p in the middle; I will see if I can execute the backint4ora command manually, since I have the stage file available, I have copied it during the process)
    The backint4ora.err file is empty.
    The commandline of the dbmcli command I execute shows me another interesting error message,
    this might also be the source of all problems here.
    -24920,ERR_BACKUPOP: backup operation was unsuccessful
    Could not get external backup ID's from the backup tool.
    I tried to retrieve the external backup id's manually for medium BACKDataWDO, it show me OK without any external backup id's.
    I am not sure, but I think this is correct since no successfull backup was created yet with external backup tool.
    Can it also be that the parameter "history file" from the initWDO.par file is set wrong?
    Currently it is set to "/sapdb/data/wrk/WDO/backint_history_WDO.log" (see above also), but I can imagine
    that this should be set to the dbm.knl or dbm.ebf file ??
    With kind regards,
    Roger Hoogeveen

  • OLAP -- ORA-6502: numeric or value error: character string buffer too small

    Hi all,
    We got installed Oracle 9201. After applying the patch #2761332 (to upgrade up to 9203)
    and interim patch #2897078 (9203 Patch 1) we always get OLAP Catalog invalid.
    I've tried to mend this problem by doing all it is said in Notes 23268.1 & 226443.1 but
    my effort was worthless. OLAP catalog is still invalid though BI_Checkconfig says is okay at all.
    Nevertheless, we can create dimensions, cubes and measures well, but other problem arises when
    I try to add a dimension to a cube issuing the following command:
    cwm2_olap_cube.add_dimension_to_cube( owner, NAME, owner, DIM_NAME);
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "OLAPSYS.CWM2_OLAP_MANAGER", line 380
    ORA-06512: at "OLAPSYS.CWM2_OLAP_MANAGER", line 397
    ORA-06512: at "OLAPSYS.CWM2_OLAP_CUBE", line 281
    Paying attention to other metalink/otn threads about this subject we found similar problems with
    Oracle 9203 in Japanese (keeping in mind we use Oracle in Spanish).
    Any patch we can apply? Any ideas? Your comments are welcome ...
    Thanks in advanced !!
    [email protected]

    We have fixed the problem !!! :-DDD
    Thanks to all Oracle analysts who replied this issue.
    aLeX
    [email protected]

  • PL/SQL: numeric or value error (character string buffer too small)

    Hi All,
    Below is the procedure used to send notifications. It was working fine in previous DB version :- 10.1.0.5.0 and there was recent upgrade to 11.2.0.2.0.
    I complies fine, but when executing it throws the error.
    PROCEDURE PROC_STATUS_MAIL_UNADJ IS
           K_BOUNDARY CONSTANT VARCHAR2(1000) := 'a1b2c3d4e3f2g1';
          l_analysis_report  VARCHAR2(32767); --empty_clob; --clob :=
          l_header VARCHAR2(1000);
          l_footer VARCHAR2(200);
          cnxn UTL_SMTP.connection;
          cursor cloc is select location_id from locations order by location_id asc;
          loc_id cloc%rowtype;
    BEGIN
      dbms_output.enable (1000000);
         FOR loc_id in  cloc
         loop
         l_analysis_report := '<style type="text/css">
        <!--.style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; font-style: normal; color: #FF0000}-->
        <!--.sidebar1 { font-family: Arial, Helvetica, sans-serif; font-size: 10px}-->
        <!--.text { font-family: Arial, Helvetica, sans-serif; font-size: 12px}-->
        </style>
        <center><b><font face="Arial">Run Summary Report'
                    || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH:MI AM') || '<br><br></font></b></center>'
                    || ' <div align="center"><table width="95%" border="1" cellspacing="0" cellpadding="1" </div>'
                    || '<span style="font-size: 10pt; font-family: Arial"> </span> '
                    || '<tr bgcolor=b4b4b4><td align="center"> <font size="3"> <b>'
                    || 'Analysis</b></td><td align="center"><font size="3"> <b>'
                    || 'Start Time</b></td><td align="center"><font size="3"> <b>'
                    || 'End Time</b></td><td align="center"><font size="3"> <b>'
                    || 'Run Duration (mins)</b></td><td align="center"><font size="3"> <b>'
                    || 'Status</b></font></td></tr> ' || UTL_TCP.CRLF;
                    FOR curr_refresh IN (SELECT AN.ANALYSIS_ID,AN.NAME ANALYSIS_NAME,TO_CHAR(ARH.RUN_START_TIME,'DD/MM/YYYY HH:MI:SS') START_TIME,
                                         TO_CHAR(ARH.RUN_END_TIME,'DD/MM/YYYY HH:MI:SS')END_TIME,
                                         ROUND(((ARH.RUN_END_TIME-ARH.RUN_START_TIME)*24*60),2) RUN_TIME_SECS,ARH.JOB_STATUS STATUS
                                         FROM
                                         RUN_HISTORY ARH,ANALYSES AN
                                         WHERE
                                         AN.ANALYSIS_ID=ARH.ANALYSIS_ID
                                         AND AN.CYCLE_IND_ID IN (1,3)
                                         AND ARH.RUN_START_TIME>TO_DATE(SYSDATE-30)
                                         AND ARH.JOB_NAME LIKE 'RHS_QU%'                                  
                                         AND AN.LOCATION_ID = loc_id.location_id
                                         AND ARH.JOB_STATUS='Completed'
                                         ORDER BY ARH.RUN_START_TIME DESC)
                           LOOP
                       l_analysis_report  := l_analysis_report ||'<tr><td align="center">'|| curr_refresh.analysis_name
                          || '</td><td align="center">' || curr_refresh.start_time || '</td><td align="center">'
                          || curr_refresh.end_time || '</td><td align="center">'|| curr_refresh.RUN_TIME_SECS ||
                          '</td><td align="center">'|| curr_refresh.status ||
                          '</td> </tr>' || UTL_TCP.CRLF;
                      exit when length (l_analysis_report) > 32500;
                   END LOOP;
                  l_analysis_report := l_analysis_report || '</table><br><br>';
                   l_footer := UTL_TCP.CRLF ||'<b> Note: This is an auto generated email. Please do not reply to it. Contact the IT team for any further information.</b>'||  UTL_TCP.CRLF;
                   FOR curr_email IN (SELECT GLOBAL_NAME INSTANCE_NAME,
                                      EU.EMAIL_USER_LAST_NAME last_name, EU.EMAIL_USER_FIRST_NAME ACNAME,
                                      EU.EMAIL_USER_EMAIL_ID,loc.LOCATION_NAME LOC_NAME,
                                      '[email protected]' MAIL_FROM
                                      FROM
                                      RHS_EMAIL_USER EU,LOCATIONS LOC,GLOBAL_NAME
                                      WHERE EU.LOCATION_ID=LOC.LOCATION_ID
                                      AND EU.LOCATION_ID=loc_id.location_id
                                  ) LOOP
                cnxn := UTL_SMTP.open_connection('smtprelay.inc.com', 25);
                UTL_SMTP.helo(cnxn, 'smtprelay.inc.com');
                UTL_SMTP.mail(cnxn, '[email protected]');
                UTL_SMTP.rcpt(cnxn, curr_email.EMAIL_USER_EMAIL_ID);
                      l_header := 'MIME-Version: 1.0'||'
    To: ' || curr_email.last_name || ' <' || curr_email.EMAIL_USER_EMAIL_ID || '>
    From: ' || curr_email.mail_from || '
    Subject: Un-Adjusted Analysis Report for ' || curr_email.loc_name || ' Location from' || curr_email.instance_name || ' on ' || to_char(sysdate, 'DD-MON-YYYY') || '
    Reply-To: [email protected]
    Content-Type: text/html;' || UTL_TCP.CRLF || UTL_TCP.CRLF;
                UTL_SMTP.data(cnxn, l_header || l_analysis_report || l_footer);
                UTL_SMTP.quit(cnxn);
                END LOOP;
                END LOOP;
    END PROC_STATUS_MAIL_UNADJ;
    Error :-
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "SYS.UTL_SMTP", line 591
    ORA-06512: at "SYS.UTL_SMTP", line 497
    ORA-06512: at "SYS.UTL_SMTP", line 503
    ORA-06512: at "RISK_HISTORY.PKG_RHS_EMAIL_NOTIFY", line 206
    ORA-06512: at "RISK_HISTORY.PKG_RHS_EMAIL_NOTIFY", line 414
    ORA-06512: at line 2Can you please let me know if there is any issue with code or any upgrade issue ?
    Regards,
    Sunny
    Edited by: k_17 on Oct 13, 2011 12:07 PM

    Hi Helios,
    Many thanks for your reply.
    I am able to figure out the issue. In the code we have
    l_analysis_report  := l_analysis_report ||'<tr><td align="center">'|| curr_refresh.analysis_name
                          || '</td><td align="center">' || curr_refresh.start_time || '</td><td align="center">'
                          || curr_refresh.end_time || '</td><td align="center">'|| curr_refresh.RUN_TIME_SECS ||
                          '</td><td align="center">'|| curr_refresh.status ||
                          '</td> </tr>' || UTL_TCP.CRLF;
                      exit when length (l_analysis_report) > 32500;where "l_analysis_report VARCHAR2(32767);"
    The issue is report has more characters, and when executing it throws the error " ORA-06502: PL/SQL: numeric or value error: character string buffer too small ".
    Can you please let me know how to have more characters/data in the report. Will CLOB help if yes, please let me know how to use it.
    Kindly suggest some options.
    Regards,
    Sunny

  • Duplication with Veritas netbackup 4.5

    Alright. This is driving me crazy. How can you clone a database using Veritas? Right now we are using TSM and are switching to Veritas. With TSM, I can run the duplication from either the target or the auxiliary. With Veritas it states you must run it on the auxiliary. One problem with this is if your target does not have a password file. I can't bounce a production db just to create a temp password file.
    Another issue is with the username. I understand you have to restore logged in as the user who created the backup. We have 28 different servers with 28 different oracle users so to do this will be an administrative hastle. With TSM you can pass rman an options file with the username in there.
    If there's any documention other than in Veritas' manual under "Redirected Restore" I'd love to see it. Veritas' documentation doesn't use the RMAN duplicate command. It's almost as if they expect the exact same directory structure and user on the aux server.
    The error that is killing me is the:
    Failed to open for restore
    I know the backup is there on tape, I just can't get permissions to it and don't know how.
    Thanks

    Hi 152124
    Once you have the catalog created you can begin to play with RMAN. You could backup the whole database and backup it partially and so on. I recommend you to look for the manuals for it.
    Regarding Veritas NetBackup , I have not has experienced with that. I have always worked backing up the database directly to file systems for after move them to tapes.
    If you have any doubt during your learning you can ask here in this forum.
    Joel Pérez
    http://otn.oracle.com/experts

  • ORA-06502: PL/SQL: numeric or value error: character string buffer too smal

    Hi Guys I am getting error ORA-06502: PL/SQL: numeric or value error: character string buffer too small as it said i thought it would be issue with length of feild but i tried to change is nothihg work i am posing code here if any one can please help me on this
    PROCEDURE REPORT
    p_rpt_from_dt in varchar2,
    p_rpt_to_dt in varchar2,
    p_apvr_id in tc_wkr.tc_row_id%type default NULL,
    p_rpt_type in varchar2 default NULL,
    p_backto_pg in varchar2 default NULL
    IS
    v_rpt_from_dt date := var_to_date(p_rpt_from_dt);
    v_rpt_to_dt date := var_to_date(p_rpt_to_dt);
    v_time_str varchar2(15);
    cursor period_cur
    cp_from_dt date,
    cp_to_dt date
    is
    select beg_dt, end_dt
    from jmcs_wk_tprd
    where beg_dt <= cp_to_dt -- report end date
    and end_dt >= cp_from_dt -- report start date
    BEGIN
    if sys_security('tcsys', 'tc_reports') != 'GRANTED' then
    apps_main.access_denied;
    return;
    end if;
    if lg_debug_fl then
    v_time_str := to_char(lg_sysdate, 'hh:mi:ss a.m.');
    else
    v_time_str := tc_time(lg_sysdate);
    end if;
    /* get the time card time periods applicable to the report */
    lga_tc_strt_dt := lga_null_date;
    for recs in period_cur(v_rpt_from_dt, v_rpt_to_dt) loop
    lga_tc_strt_dt(lga_tc_strt_dt.count+1) := recs.beg_dt;
    lga_tc_end_dt(lga_tc_end_dt.count+1) := recs.end_dt;
    end loop;
    --if p_apvr_id is NULL then
    if p_rpt_type != 'D' then
    tc_reporting.reports_header
    1,
    'Time Card Status Report',
    'for '||dd_mon_yyyy(v_rpt_from_dt)||' through '||dd_mon_yyyy(v_rpt_to_dt)||'<BR>'||
    'Report Date: '||dd_mon_yyyy(lg_sysdate)||' Time: '||v_time_str,
    NULL,
    NULL,
    NULL,
    'javascript:window.close()', /* Backto */
    'alert(''Reminder! Click on logo when you are ready to return to previous page'')'
    end if;
    if p_apvr_id is NULL then
    sub_STATUS_BD_ALPHA (v_rpt_from_dt, v_rpt_to_dt, TRUE, p_rpt_type, p_apvr_id);
    else
    htp.p('<!-- Selected Approver ('||p_apvr_id||') -->');
    sub_STATUS_BD_APVR (v_rpt_from_dt, v_rpt_to_dt, p_rpt_type, p_apvr_id);
    end if;
    htp.p('</body></html>');
    EXCEPTION
    WHEN OTHERS THEN
    error_proc(SQLERRM, SQLCODE, owa_util.get_cgi_env('PATH_INFO'));
    htp.p('Error Code is :'||SQLERRM);
    END REPORT;
    This package in trun call other procedure like below
    PROCEDURE sub_STATUS_BD_ALPHA
    p_rpt_from_dt in date,
    p_rpt_to_dt in date,
    p_display_hdr in boolean,
    p_rpt_type in varchar2 default 'B',
    p_apvr_id in tc_wkr.tc_row_id%type default NULL,
    p_tcs_user_id in tc_wkr.tc_row_id%type default NULL
    IS
    v_time_str varchar2(15);
    v_apvr_id tc_wkr.tc_row_id%type := 0;
    v_a_user_id tc_wkr.tc_row_id%type; -- approver tcs_user_id
    v_cnt integer := 0;
    v_people_cnt integer := 0;
    v_stat_cd varchar2(2000);
    v_display_fl boolean := FALSE;
    /*===========================================================================*/
    cursor people_cur
    cp_from_dt in date,
    cp_to_dt in date
    is
    select
    d_full_nm_lfm as name,
    tc_row_id as tcs_user_id,
    tcw_typ as pay_typ,
    tcw_id as pay_id,
    sys_strt_date as sys_strt_dt,
    sys_end_dt
    from tc_wkr
    where sys_strt_date <= cp_to_dt
    and nvl(sys_end_dt, cp_to_dt) >= cp_from_dt
    order by upper(d_full_nm_lfm);
    /* find the current or the most recent (if no current) approver */
    cursor apvr_cur
    cp_tcs_user_id in tc_wkr.tc_row_id%type
    is
    select
    a.f_tc_apvr_id as fk_tcs_apvr_id,
    w.d_full_nm_lfm as apvr_name,
    w.tcw_typ as apvr_pay_typ,
    w.tcw_id as apvr_pay_id,
    a.strt_dt,
    a.end_dt
    from tc_wkr w, tc_ap_asmt a
    where a.f_tc_wkr_id = cp_tcs_user_id
    and w.tc_row_id = a.f_tc_apvr_id
    order by a.strt_dt desc;
    /* list of existing time cards UNION required time cards */
    cursor tc_cur
    cp_tcs_user_id in tc_wkr.tc_row_id%type, /* who's time cards */
    cp_from_dt in date, /* report period from date */
    cp_to_dt in date /* report period to date */
    is
    select
    stat_cd,
    strt_dt,
    end_dt
    from tc
    where strt_dt <= cp_to_dt
    and end_dt >= cp_from_dt
    and fk_tc_wkrtcw_id = cp_tcs_user_id
    UNION
    select
    'Required' as stat_cd,
    beg_dt as strt_dt,
    end_dt
    from jmcs_wk_tprd
    where beg_dt <= cp_to_dt
    and end_dt >= cp_from_dt
    and beg_dt not in (
    select strt_dt
    from tc
    where strt_dt <= cp_to_dt
    and end_dt >= cp_from_dt
    and fk_tc_wkrtcw_id = cp_tcs_user_id
    order by strt_dt;
    BEGIN
    if lg_debug_fl then
    v_time_str := to_char(lg_sysdate, 'hh:mi:ss a.m.');
    else
    v_time_str := tc_time(lg_sysdate);
    end if;
    if p_apvr_id > 0 then
    lga_report_out := lga_report_out_null;
    v_apvr_id := p_apvr_id;
    lga_apvr := lga_apvr_null;
    select
    d_full_nm_lfm,
    tc_row_id,
    tcw_id,
    tcw_typ
    into
    lga_apvr(1).apvr_name,
    lga_apvr(1).apvr_tcs_id,
    lga_apvr(1).apvr_pay_id,
    lga_apvr(1).apvr_pay_typ
    from tc_wkr
    where tc_row_id = v_apvr_id;
    if lga_apvr(1).apvr_pay_typ != 'S' then
    select decode(bend_empl_fl, 'Y', 'E', 'W')
    into lga_apvr(1).apvr_pay_typ
    from empl
    where empl_id = lga_apvr(1).apvr_pay_id;
    end if;
    end if;
    if p_display_hdr then
    if lga_tc_strt_dt.count > 6 then /* more than 6 time periods (1 month) */
    lga_width(1) := to_char(.15 * lg_page_width_standard);
    lga_width(2) := to_char(.08 * lg_page_width_standard);
    for i in 1..lga_tc_strt_dt.count loop
    lga_width(lga_width.count+1) := to_char(.09 * lg_page_width_standard);
    end loop;
    lg_page_width_standard := to_number(lga_width(1)) + to_number(lga_width(2));
    if nvl(p_apvr_id, 0) = 0 then
    lg_page_width_standard := lg_page_width_standard * 2;
    end if;
    htp.p('<!-- page width = '||lg_page_width_standard||'-->');
    for i in 3..lga_width.count loop
    lg_page_width_standard := lg_page_width_standard + to_number(lga_width(i));
    htp.p('<!-- page width = '||lg_page_width_standard||'-->');
    end loop;
    lg_page_width := to_char(lg_page_width_standard);
    else
    lga_width(1) := '15%';
    lga_width(2) := '8%';
    lga_width(3) := '9%';
    lga_width(4) := '9%';
    lga_width(5) := '9%';
    lga_width(6) := '9%';
    lga_width(7) := '9%';
    lga_width(8) := '9%';
    end if;
    sub_DETAIL_PAGE_HD(p_apvr_id);
    end if;
    /* cursor loop */
    for p in people_cur(p_rpt_from_dt, p_rpt_to_dt) loop
    /* is/was this person assigned to the selected approver for the report period */
    v_display_fl := FALSE;
    if nvl(p_tcs_user_id, 0) > 0 then
    if p_tcs_user_id = p.tcs_user_id then
    htp.p('<br>Selected User');
    v_display_fl := TRUE;
    end if;
    elsif nvl(p_apvr_id, 0) = 0 then
    if nvl(p_apvr_id, 0) = 0 then
    v_display_fl := TRUE;
    elsif p_apvr_id > 0 or p_apvr_id = -1 then
    v_display_fl := fct_ASSIGNED_APVR(p.tcs_user_id, p_apvr_id, p_rpt_from_dt, p_rpt_to_dt);
    end if;
    if v_display_fl then
    v_people_cnt := v_people_cnt + 1;
    lg_tcs_owner_info.USER_ID := p.tcs_user_id;
    lg_tcs_owner_info.PAY_ID := p.pay_id;
    lg_tcs_owner_info.PAY_TYPE := p.pay_typ;
    lg_tcs_owner_info.SYS_STRT_DT := p.sys_strt_dt;
    lg_tcs_owner_info.TERM_DT := p.sys_end_dt;
    if p.pay_typ = 'S' then
    begin
    select wrk_hire_dt
    into lg_tcs_owner_info.hire_dt
    from subcntr
    where sub_id = p.pay_id;
    exception
    when no_data_found then
    tc_debug.html_message('subcntr.pay_id('||p.pay_id||')');
    end;
    else
    select
    wrk_hire_dt,
    decode(bend_empl_fl, 'Y', 'E', 'W')
    into
    lg_tcs_owner_info.hire_dt,
    lg_tcs_owner_info.pay_type
    from empl
    where empl_id = lg_tcs_owner_info.PAY_ID;
    end if;
    if lga_report_out.count = 0 then
    lga_report_out(lga_report_out.count+1) := '<table border="1" cellpadding="3" width="'||lg_page_width||'">';
    end if;
    if mod(v_people_cnt,2) = 1 then
    lga_report_out(lga_report_out.count+1) := ('<tr bgcolor="'||lg_odd_bgcolor||'">');
    else
    lga_report_out(lga_report_out.count+1) := ('<tr bgcolor="'||lg_even_bgcolor||'">');
    end if;
    lga_report_out(lga_report_out.count+1) := ('<td valign="top"><font size=-2>'||p.name||'</font></td >');
    lga_report_out(lga_report_out.count+1) := ('<td valign="top"><font size=-2>'||p.pay_typ||'-'||lpad(p.pay_id,4,'0')||'</font></td >');
    if nvl(p_apvr_id, 0) > 0 then /* Single Approver */
    /* need approver ID for time card "status" */
    lga_apvr := lga_apvr_null; /* clear the approver id array */
    lga_apvr(1).apvr_tcs_id := p_apvr_id;
    elsif nvl(p_apvr_id, 0) = 0 then /* ALL Approvers */
    lga_apvr := lga_apvr_null; /* clear the approver id array */
    v_cnt := 0;
    for ap in apvr_cur (p.tcs_user_id) loop
    if v_cnt = 0 then
    /* most recent approver may not be the applicable approver */
    v_cnt := 1;
    lga_apvr(v_cnt).apvr_name := ap.apvr_name; -- identify multiple approvers for the "status"
    lga_apvr(v_cnt).apvr_tcs_id := ap.fk_tcs_apvr_id; -- identify multiple approvers for the "status"
    lga_apvr(v_cnt).apvr_pay_id := ap.apvr_pay_id; -- identify multiple approvers for the "status"
    v_apvr_id := ap.fk_tcs_apvr_id;
    if ap.apvr_pay_typ = 'S' then
    lga_apvr(v_cnt).apvr_pay_typ := ap.apvr_pay_typ; -- identify multiple approvers for the "status"
    else
    select decode(bend_empl_fl, 'Y', 'E', 'W')
    into lga_apvr(1).apvr_pay_typ
    from empl
    where empl_id = lga_apvr(1).apvr_pay_id;
    end if;
    end if;
    if ap.strt_dt <= p_rpt_to_dt and nvl(ap.end_dt, p_rpt_to_dt) >= p_rpt_from_dt then
    /* approver record */
    lg_tcs_owner_info.APVR_ID := ap.fk_tcs_apvr_id;
    lg_tcs_owner_info.APVR_STRT_DT := ap.strt_dt;
    lg_tcs_owner_info.APVR_END_DT := ap.end_dt;
    don't enter same approver name multiple times
    when same approver has been assigned more than once
    Example: approver1, approver_2, approver_1 (change back to approver 1)
    for i in 1..lga_apvr.count loop
    v_apvr_id := ap.fk_tcs_apvr_id;
    if lga_apvr(i).apvr_tcs_id = ap.fk_tcs_apvr_id then
    /* don't add again */
    v_apvr_id := NULL;
    exit;
    end if;
    end loop;
    if v_apvr_id is not NULL then
    v_cnt := v_cnt + 1;
    lga_apvr(v_cnt).apvr_name := ap.apvr_name; -- identify multiple approvers for the "status"
    lga_apvr(v_cnt).apvr_tcs_id := ap.fk_tcs_apvr_id; -- identify multiple approvers for the "status"
    lga_apvr(v_cnt).apvr_pay_id := ap.apvr_pay_id; -- identify multiple approvers for the "status"
    lga_apvr(v_cnt).apvr_pay_typ := ap.apvr_pay_typ; -- identify multiple approvers for the "status"
    end if;
    end if;
    end loop;
    /* list approver pay IDs */
    lga_report_out(lga_report_out.count+1) := ('<td valign="top"><font size=-2>');
    if lga_apvr.count = 0 then
    lga_report_out(lga_report_out.count+1) := 'Approver Unassigned';
    else
    for i in 1..lga_apvr.count loop
    if i > 1 then
    lga_report_out(lga_report_out.count+1) := '<br>';
    end if;
    lga_report_out(lga_report_out.count+1) := (lga_apvr(i).apvr_name);
    end loop;
    end if;
    lga_report_out(lga_report_out.count+1) := ('<td valign="top"><font size=-2>');
    if lga_apvr.count = 0 then
    lga_report_out(lga_report_out.count+1) := 'N/A';
    else
    for i in 1..lga_apvr.count loop
    if i > 1 then
    lga_report_out(lga_report_out.count+1) := '<br>';
    end if;
    lga_report_out(lga_report_out.count+1) := (lga_apvr(i).apvr_pay_typ)||'-'||lpad(lga_apvr(i).apvr_pay_id,4,'0');
    end loop;
    end if;
    lga_report_out(lga_report_out.count+1) := ('</font></td >');
    end if;
    for t in tc_cur(p.tcs_user_id, p_rpt_from_dt, p_rpt_to_dt) loop
    htp.p('<! '||t.strt_dt||', '||t.end_dt||', '||t.stat_cd||' -->');
    --lga_report_out(lga_report_out.count+1) := ('<td valign="top"><font size=-2>');
    --lga_report_out(lga_report_out.count+1) := (t.stat_cd);
    --lga_report_out(lga_report_out.count+1) := ('</font></td >');
    /* has the selected approver has completed processing */
    if p_apvr_id > 0
    and v_apvr_id = p_apvr_id
    and v_a_user_id != p_apvr_id
    then
    exit;
    end if;
    for ap in apvr_cur (p.tcs_user_id) loop
    if apvr_cur%rowcount = 1 then
    /* most recent approver assigned */
    lg_tcs_owner_info.apvr_id := ap.fk_tcs_apvr_id;
    end if;
    if ap.strt_dt <= t.end_dt and nvl(ap.end_dt, t.end_dt) >= t.strt_dt then
    /* approver assigned during time card period */
    lg_tcs_owner_info.apvr_id := ap.fk_tcs_apvr_id;
    exit;
    end if;
    end loop;
    lg_tc_status.strt_dt := t.strt_dt;
    lg_tc_status.end_dt := t.end_dt;
    lg_tc_status.stat_cd := t.stat_cd;
    v_stat_cd := fct_TC_STATUS(nvl(p_apvr_id, 0));
    lga_report_out(lga_report_out.count+1) := ('<td align="center" valign="top" bgcolor="'||lg_tc_status.bg_color||'">');
    lga_report_out(lga_report_out.count+1) := ('<font size=-2 color='||lg_tc_status.font_color||'>');
    lga_report_out(lga_report_out.count+1) := v_stat_cd;
    lga_report_out(lga_report_out.count+1) := ('</font></td >');
    end loop;
    lga_report_out(lga_report_out.count+1) := '</tr>';
    end if; /* v_display_fl */
    end loop;
    if p_rpt_type in ('B', 'S') then
    lg_page_cnt := lg_page_cnt + 1;
    sub_DISPLAY_STATUS_SUMMARY;
    end if;
    if lga_report_out.count > 0 then
    lga_report_out(lga_report_out.count+1) := '</table>';
    end if;
    if lga_report_out.count > 0 then
    if p_rpt_type = 'B' or p_apvr_id > 0 then
    if p_display_hdr then
    if lg_page_cnt > 0 then
    if p_apvr_id > 0 then /* selected individual approver */
    htp.p('</table>');
    end if;
    htp.p('<br style="page-break-after:always">');
                        htp.p('<!-- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& -->');
                        htp.p('<!-- &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& -->');
    end if;
    lg_page_cnt := lg_page_cnt + 1;
    tc_reporting.reports_header
    1,
    'Time Card Status Report',
    'for '||dd_mon_yyyy(p_rpt_from_dt)||' through '||dd_mon_yyyy(p_rpt_to_dt)||'<BR>'||
    'Report Date: '||dd_mon_yyyy(lg_sysdate)||' Time: '||v_time_str,
    NULL,
    NULL,
    NULL,
    NULL, -- p_backto_pg, /* Backto */
    'focus()',
    lg_page_cnt
    end if;
    end if;
    if p_rpt_type in ('B', 'D') then
    for i in 1..lga_report_out.count loop
    htp.p(lga_report_out(i));
    end loop;
    end if;
    end if;
    END sub_STATUS_BD_ALPHA;
    Some veriable
    type report_tc_rec is record
    tc_owner_name tc_wkr.d_full_nm_lfm%type,
    o_user_id tc_wkr.tc_row_id%type,
    o_pay_id varchar2(10),
    o_sys_strt_dt date,
    o_sys_end_dt date,
    tc_apvr_name tc_wkr.d_full_nm_lfm%type,
    a_pay_id varchar2(10),
    a_user_id tc_wkr.tc_row_id%type,
    tc_strt_dt date,
    tc_end_dt date,
    tc_stat_cd varchar2(50),
    ap_strt_dt date,
    ap_end_dt date
    /* time card owner information */
    TYPE tcs_owner_info_rec IS RECORD
    USER_ID tc_wkr.tc_row_id%type,
    PAY_ID tc_wkr.tcw_id%type,
    PAY_TYPE tc_wkr.tcw_typ%type,
    HIRE_DT date,
    SYS_STRT_DT date,
    TERM_DT date,
    APVR_ID tc_wkr.tc_row_id%type,
    APVR_STRT_DT date,
    APVR_END_DT date
    /* status code determines report cell font and background colors */
    TYPE tc_status_rec IS RECORD
    STRT_DT date,
    END_DT date,
    STAT_CD tc.stat_cd%type,
    FONT_COLOR varchar2(16),
    BG_COLOR varchar2(16)
    /* count of all time card status for report summary */
    TYPE tc_status_summary_rec IS RECORD
    APPROVED_CNT integer := 0,
    REJECTED_CNT integer := 0,
    SUBMITTED_CNT integer := 0,
    POSTED_CNT integer := 0,
    VERIFIED_CNT integer := 0,
    OPEN_CNT integer := 0,
    NEW_CNT integer := 0,
    REQUIRED_CNT integer := 0,
    TOTAL_CNT integer := 0
    /* determine multiple approvers for individual for selected report period */
    TYPE apvr_rec IS RECORD
    apvr_name tc_wkr.d_full_nm_lfm%type,
    apvr_tcs_id tc_wkr.tc_row_id%type,
    apvr_pay_id tc_wkr.tcw_id%type,
    apvr_pay_typ tc_wkr.tcw_typ%type
    TYPE apvr_id_array_table IS TABLE OF apvr_rec
    index by binary_integer;
    type output_array is table of varchar2(1000)
    index by binary_integer;
    type date_array is table of date
    index by binary_integer;
    type status_array is table of varchar2(1000)
    index by binary_integer;
    type apvr_array is table of number(8)
    index by binary_integer;
    lga_report_out output_array; /* array of HTML code to be output to browser */
    lga_report_out_null output_array; /* null array of HTML code */
    lga_tc_status status_array;
    lga_null_status status_array;
    lga_tc_strt_dt date_array;
    lga_tc_end_dt date_array;
    lga_tc_disp date_array; /* start dates of displayed TC for selected user */
    lga_null_date date_array; /* null array used to clear other date arrays */
    /* LOCAL GLOBAL VARIABLES */
    lg_tcs_owner_info tcs_owner_info_rec; /* time card owner information */
    lg_tc_status tc_status_rec; /* time card status information */
    lg_tc_status_summary tc_status_summary_rec; /* time card count by status */
    lg_tc_rec report_tc_rec; /* time card */
    lga_apvr apvr_id_array_table; /* array of approver Names and Payroll IDs */
    lga_apvr_null apvr_id_array_table; /* clear the lga_apvr array for each user */
    lg_sysdate date := sysdate;
    lg_debug_fl boolean := FALSE;
    lg_debug_owner_id tc_wkr.tc_row_id%type := 9905;
    lg_debug_apvr_id tc_wkr.tc_row_id%type := 1000;
    The chnages i have done its in bold
    Please Advice
    Thanks
    Edited by: Purvik on Aug 25, 2009 11:59 AM

    There is not a chance in the world, especially not knowing column definitions that I, and I suspect most anyone else, is going to wade through this much unformated code looking for an error you couldn't bother to copy in full.
    Either tell us, specifically, the line on which the error is occurring or, better yet, start whacking stuff out of your code until you find the offending definition. That is certainly what I would do. Commenting out sections is a marvelous way to quickly find an issue.
    Before you post again please read the FAQ. It will explain to you how to properly post and use the tags.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • BI Publisher Report Query Error: "character string buffer too small"

    Using apex.oracle.com, I am trying to make a Report Query (Shared Components > Report Queries) based on many columns (around 60).
    When I enter my SQL in the "Source Query" Text Area and then click Test Report I get the following error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small In order to try to make the simplest test case possible for this, I then tried entering SQL selecting just from DUAL.
    The following SQL fails with the error mentioned above.
    SELECT
    'wibble' as a
    ,'wibble' as b
    ,'wibble' as c
    ,'wibble' as d
    ,'wibble' as e
    ,'wibble' as f
    ,'wibble' as g
    ,'wibble' as h
    ,'wibble' as i
    ,'wibble' as j
    ,'wibble' as k
    ,'wibble' as l
    ,'wibble' as m
    ,'wibble' as n
    ,'wibble' as o
    ,'wibble' as p
    ,'wibble' as q
    ,'wibble' as r
    ,'wibble' as s
    ,'wibble' as t
    ,'wibble' as u
    ,'wibble' as v
    ,'wibble' as w
    ,'wibble' as x
    ,'wibble' as y
    ,'wibble' as z
    ,'wibble' as ab
    ,'wibble' as ac
    ,'wibble' as ad
    ,'wibble' as ae
    ,'wibble' as af
    ,'wibble' as ag
    ,'wibble' as ah
    ,'wibble' as ai
    ,'wibble' as aj
    ,'wibble' as ak
    ,'wibble' as al
    ,'wibble' as am
    ,'wibble' as an
    ,'wibble' as ao
    ,'wibble' as ap
    ,'wibble' as aq
    ,'wibble' as ar
    ,'wibble' as at
    ,'wibble' as au
    ,'wibble' as av
    FROM dualRemoving the last column from this SQL query (bringing the total number of columns down to 45) as follows and then clicking "Test Report" works successfully.
    SELECT
    'wibble' as a
    ,'wibble' as b
    ,'wibble' as c
    ,'wibble' as d
    ,'wibble' as e
    ,'wibble' as f
    ,'wibble' as g
    ,'wibble' as h
    ,'wibble' as i
    ,'wibble' as j
    ,'wibble' as k
    ,'wibble' as l
    ,'wibble' as m
    ,'wibble' as n
    ,'wibble' as o
    ,'wibble' as p
    ,'wibble' as q
    ,'wibble' as r
    ,'wibble' as s
    ,'wibble' as t
    ,'wibble' as u
    ,'wibble' as v
    ,'wibble' as w
    ,'wibble' as x
    ,'wibble' as y
    ,'wibble' as z
    ,'wibble' as ab
    ,'wibble' as ac
    ,'wibble' as ad
    ,'wibble' as ae
    ,'wibble' as af
    ,'wibble' as ag
    ,'wibble' as ah
    ,'wibble' as ai
    ,'wibble' as aj
    ,'wibble' as ak
    ,'wibble' as al
    ,'wibble' as am
    ,'wibble' as an
    ,'wibble' as ao
    ,'wibble' as ap
    ,'wibble' as aq
    ,'wibble' as ar
    ,'wibble' as at
    ,'wibble' as au
    FROM dualSo the question is: Is there a hard-coded limit of 45 columns for a Source Query? Or is there something else causing this error message?
    (For information in the above example I have "Use Generic Report Layout" selected and the output format set to "PDF")
    Thanks very much in advance for any comments or suggestions,
    Andy

    Thanks for the suggestion Simon.
    I just created a view based on the 46-column SELECT statement from dual above and then set "SELECT * FROM myview" as the Source Query.
    Unfortunately I get exactly the same error.
    Thanks,
    Andy

  • Error PL/SQL: numeric or value error: character string buffer too small

    HI oracle gurus,
    I am new to PL/SQL,
    my oracle version is oracle 11g.
    i have create a procedure to insert data from flat file  to a table using UTL_FILE.
    Table is
    CREATE TABLE EXT_PERSON_INFO
      ID_PERSON              NUMBER(38),
      ID_BATCH             NUMBER(38),
      ID_PERSON_NBR        VARCHAR2(3 BYTE),
      ID_AREA              VARCHAR2(5 BYTE),
      NM_FINAL              VARCHAR2(20 BYTE),
      NM_START             VARCHAR2(20 BYTE),
      DT_DOB             DATE,
      ID_SERIAL               VARCHAR2(9 BYTE),
      DT_RESPONSE          DATE,
      TRANS_TYPE  VARCHAR2(2 BYTE),
      REG_RESPONSE  VARCHAR2(1 BYTE),
      TM_RX          TIMESTAMP(6)
    my procedure is
    CREATE OR REPLACE PROCEDURE PROC_PERSON
    IS
      f_line VARCHAR2(2000);
      f utl_file.file_type;
      f_dir  VARCHAR2(250);
      fname  VARCHAR2(50);
      F_ID_PERSON EXT_PERSON_INFO.ID_PERSON%type :=1;
      F_ID_BATCH EXT_PERSON_INFO.ID_BATCH%type :=1;
      F_ID_PERSON_NBR EXT_PERSON_INFO.ID_PERSON_NBR%type;
      F_ID_AREA EXT_PERSON_INFO.ID_AREA%type;
      F_NM_FINAL EXT_PERSON_INFO.NM_FINAL%type;
      F_NM_START EXT_PERSON_INFO.NM_START%type;
      F_DT_DOB EXT_PERSON_INFO.DT_DOB%type;
      F_ID_SERIAL EXT_PERSON_INFO.ID_SERIAL%type;
      F_DT_RESPONSE EXT_PERSON_INFO.DT_RESPONSE%type;
      F_TRANS_TYPE EXT_PERSON_INFO.TRANS_TYPE%type;
      F_REG_RESPONSE EXT_PERSON_INFO.REG_RESPONSE%type;
    BEGIN
      fname := 'D:\raj\raj.txt';
      f:= utl_file.fopen('RAJ',fname,'r'); 
    loop
    begin
    utl_file.get_line(f,f_line);
    exception
    when no_data_found then
    exit;
    end;
    F_ID_PERSON := 1;
    F_ID_BATCH := 1;
    F_ID_PERSON_NBR :=substr(f_line,1,3);
    F_NM_FINAL := substr(f_line,4,22);
    F_NM_START := substr(f_line,23,34);
    F_DT_DOB := substr(f_line,35,44);
    F_ID_SERIAL := substr(f_line,45,48);
    F_DT_RESPONSE := substr(f_line,49,58);
    F_TRANS_TYPE := substr(f_line,59,60);
    F_REG_RESPONSE := substr(f_line,61,61);
    F_ID_AREA := substr(f_line,62,64);
    insert into EXT_PERSON_INFO VALUES (F_ID_PERSON,F_ID_BATCH,F_ID_PERSON_NBR,F_ID_AREA,F_NM_FINAL,F_NM_START,F_DT_DOB,F_ID_SERIAL,F_DT_RESPONSE,F_TRANS_TYPE,F_REG_RESPONSE);
    end loop;
    utl_file.fclose(f);
    commit;
    end;
    am getting error
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    please help me in this regard. unable to trace the issue.
    Thanks in advance
    Regards,
    raj

    The error message should have included a line number for you to reference back to your code to know what line the error was occurring on.
    That said, look at the documentation for SUBSTR as you are using the third parm incorrectly.  It is length, not end position.  That's your issue.

  • ORA-6502: PL/SQL: numeric or value error: character string buffer too small WWV-11230

    Hi,
    I'm trying to create an UI Template. I've generated the html using Frontpage and am successfully able to see in a browser.
    I've copied the html to the UI form, but when I try to preview or execute the UI template, I get the following error:
    Error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small (WWV-11230)
    null

    I AM FACING SIMILAR PROBLEM, THE EXACT ERROR IS:
    Error: Excepcisn de wwv_generate_component.build_procedure (WWV-01821)
    No se ha podido generar la pantalla de interfaz de usuario: ORA-06502: PL/SQL: numeric or value error: character string buffer too small (WWV-16409)
    (SORRY , PART OF THE ERROR IS IN SPANISH!)
    I CREATED A FORM , WORKED WITH IT A LOT WITHOUT PROBLEMS. NOW I NEED TO DO SOME CHANGES ON CERTAIN FIELDS AND WHEN I TRY TO SAVE IT I GET THE ABOVE ERROR.
    THEN I GO BACK TO AN OLDER VERSION, COPY AND TRY TO DO CHANGES AND AGAIN THE ERROR COMES UP.
    THE CHANGES I AM TRYING TO DO ARE TO SOME OF THE EXISTING FIELDS IN THE FORM WHICH NEED TO BE PUT AS "INSERTABLE".
    THE SCREEN LAYOUT IS DISPLAYED WITHOUT PROBLEM.
    (THE FORM IS BASED ON A TABLE WITH APROX 80 FIELDS).
    I NEED SOME URGENT HELP. PLS LET ME KNOW ANY OTHER INFO YOU MAY NEED TO HELP ME SOLVE THIS PROBLEM.
    FYI I AM WORKING ON PORTAL VERSION 3.0.9 / ON Windows 2000 (DATABASE 8.1.7.0 AND iAS ARE ON DIFFERENT MACHINES).
    TKS IN ADVANCE

  • Error by AI Buffer Read.vi

    Hello!
    I have problem with the PCI-Card(Modell CB-68LP) PCI-MIO-16XE-50 .
    I think the settings for the card are right, because it can get the
    datas by the AI Sample Channels.vi with AI Read one Scan.vi. But I need
    at least 1000 times
    to measure in one second, so I use the Data Reader.vi to do it. For
    test I set:
    buffer size:2000
    # of Scans to Write at a time :5000
    Max # of cans to write to file:4000
    scan rate: 2000
    and the Channels are same as they by AI Samle Channels.
    I could not get any datas but the date and actuell time, so I checked
    the
    sub-VIs and found the error is " AI Buffer Read" and the code is 10800.
    By this sub-VI it showed the same error too even when I input 1 to the
    control number to read.
    I don't understand it and
    I can not see any more
    details by the sub-VI either. I have tried what I know, but there is
    still the same
    problem, could someone give me some help? And where can I find some
    LabView
    samples for the PCI Card?
    Thanks a lot!
    Le

    Le Wang;
    The better approach for you is to open one of the Labview examples named "Continuous Acquisition and Chart Buffered.vi" to see if your board is doing buffered operation properly.
    You can find that example at: Search Examples->I/O Interfaces->Data Acquisition->Analog Input->Continuous Analog Input.
    If you are interested in reading one channel only, just set the Scan Rate to 1000 Scans/sec; in case you have more than one channel, your Scan Rate must be 1000 x Number of channels.
    That should take care of you.
    Hope this helps.
    Filipe

  • Veritas Netbackup Client Installed on Solaris 10 Zone Unable to Work

    Hi
    I am having problems with Veritas Netbackup client which had been installed on a Solaris 10 zone only. We are using Veritas Netbackup server which is installed on a Windows 2000 server and the NBU server is unable to add the new client for backup.
    The way I installed the NBU client was using the manual method where I installed directly on the zone. The zone I've created is a full root zone and the installation seems to be successful.
    Somehow the NBU server just can't see the new client. Do I need to install the client in the global zone to make it work? Is there any checks I can do to make sure I have installed the client correctly and that the services are running in the solaris 10 zone side? Any kind of help would be much appreciated.
    Thanks
    Xavier

    Hi mcbrune1
    I've check on the services in the client and all 4 services were up and running. Than I realized that this client was hardened a few weeks back. So I checked on the /etc/hosts.allow file and added an entry to allow the Master server to communicate using bpcd.
    Now the Master server is able to see the client and everything seems to be working. Thanks for your help.
    Cheers

  • Veritas Netbackup Client 6 for Solaris 10

    Hi
    Can anyone tell me where I can download Veritas Netbackup client for Solaris 10. We had the netbackup client for solaris 9 running but then we did a clean install of Solaris 10.
    The netbackup server is running on an AIX server and I want to push the solaris client from there. We have separate license for all our clients running the netbackup agent but the netbackup server does not have the latest solaris 10 client. The AIX server do not have internet access, so I want to download the solaris 10 netback agent and put on the netbackup server.
    Need to know the URL where I can download the netbackup agent for Solaris 10.
    Many Thanks
    Pioneer

    Hi mcbrune1
    I've check on the services in the client and all 4 services were up and running. Than I realized that this client was hardened a few weeks back. So I checked on the /etc/hosts.allow file and added an entry to allow the Master server to communicate using bpcd.
    Now the Master server is able to see the client and everything seems to be working. Thanks for your help.
    Cheers

  • Listener Error - character string buffer too small (ORA-06502)

    I am running into a very strange problem with the APEX listener on seemingly random pages. I can hit every page in my application just fine, but as soon as I hit this specific one, Glassfish throws an HTTP 500 error. If I click Debug, the page seems to load fine with no indications of trouble, but as soon as I turn debug back off, it goes back to the HTTP 500 error. I don't see anything special about the page that makes this happen. It is pretty simple and has 4 regions. I have noticed that if I set any 1 of the 4 regions to "Never display", the page loads fine. It's like having all 4 of them enabled at once are causing some overload, even though it's actually a smaller amount of data than most of my other pages.
    **Update: I just discovered this only happens if I'm logged into the workspace first and then try to run the page! If I log out of APEX and then hit the application as a normal user, page loads error-free. This is still an annoying problem, but at least it seems I have a decent workaround since regular users never see it.
    After a couple days, I noticed the exact same problem on a second APEX application I'm using. Again, it is on some random page whereas all the other pages work fine.
    Both applications and pages in question worked without issue in APEX 3.x. I am trying to get an APEX application up and running on the latest version.
    I have tried both Glassfish server and simply downloading the latest listener (version 1.1.1) and running it in standalone mode. I get the problem both ways, which is why it seems it's a listener issue.
    I have seen a few other threads of people having this problem, but I never did find anyone with a solution, and most of the posts stopped back in December.
    Some details on my environment:
    Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    APEX version: 4.0.2
    Webserver: Glassfish 3.1
    Here is the log entry from Glassfish when the HTTP 500 error displays as I try to load one of the bugged pages.
    [#|2011-05-10T21:14:22.967-0500|INFO|oracle-glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=111;_ThreadName=Thread-1;|MaxConnectionReuseCount=50000|#]
    [#|2011-05-10T21:14:46.431-0500|SEVERE|oracle-glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=112;_ThreadName=Thread-1;|
    ***********ERROR***********
    init: # headers=46
    declare nm owa.vc_arr := ?;
    vl owa.vc_arr := ?;
    begin
    owa.init_cgi_env( ?, nm, vl );
    htp.init; htp.HTBUF_LEN := 63;
    ? := sys_context('USERENV','SID');
    end;
    SID:1242
    CALL:
    begin
    f(p=>?);
    commit;
    end;
    BINDS
    p:100:2:220529248574492::NOPAGE CALL:
    declare
    nlns number := 999999;
    l_clob CLOB;
    lines htp.htbuf_arr;
    l_buff varchar2(32767);
    l_clob_init boolean:= false;
    l_file varchar2(5);
    l_doc_info varchar2(1000);
    begin
    OWA.GET_PAGE(lines, nlns);
    if (nlns > 1) then
    for i in 1..nlns loop
    if ( length(lines(i)) > 0 ) then
    if ( ( lengthb(l_buff) + lengthb(lines(i))) > 32767) then
    if (NOT l_clob_init) then
    dbms_lob.createtemporary(l_clob, TRUE);
    dbms_lob.open(l_clob, dbms_lob.lob_readwrite);
    l_clob_init:=true;
    end if;
    dbms_lob.writeappend(l_clob,length(l_buff),l_buff);
    l_buff := lines(i);
    else
    l_buff := l_buff || lines(i);
    end if;
    end if;
    end loop;
    end if;
    if (l_clob_init) then
    dbms_lob.writeappend(l_clob,length(l_buff),l_buff);
    l_buff := '';
    end if;
    ? := l_clob;
    ? := l_buff;
    if (wpg_docload.is_file_download) then l_file:='TRUE'; wpg_docload.get_download_file(l_doc_info); else l_file := 'FALSE'; end if; ? := l_file;
    ? := l_doc_info;
    end;
    get_page FAILED:ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 33
    Edited by: BrianB on May 11, 2011 7:50 AM
    Edited by: BrianB on May 11, 2011 8:01 AM

    Brian,
    this post is going to get a bit longer, so the summary comes first.
    h6. Summary
    1. I could reproduce the problem on my system using the APEX Listener in standalone mode.
    2. I don't think the problem is content-related in the sense that you have any issue in your page or database contents.
    3. I have a workaround for your problem.
    h6. Error message
    Having that error in my environment made me start to think. I not only disabled some item and got it work, but I could also add something to achieve this effect.
    So I came to think, this really is somewhere deep down. The error message doesn't seem very helpful on first sight, but when starting to follow on what's happening there, things get clearer:
    APEX generates pages dynamically, replacing substitution strings and other tokens to get the actual page definition. This has to be read by a requesting client. The use of VARCHAR2 as buffer introduces a limit of 32767 bytes, after which the contents is handled as CLOB instead.
    h6. Analysis
    Obviously, there are cases where the "estimation" fails. Of course, this is may only be relevant in rare cases, because:
    1. If a page would exceed the maximum without some charset interpretation problem, the buffer would be switched to clob.
    2. If a page stays small enough to stay below 32767 even with some characters that are acutally larger then expected, the buffer isn't busted.
    To find out, if your could be one of these rare cases, I investigated the HTTP headers, focussing on X-DB-Content-length and made an odd observation.
    Test case 1: "Go" button disabled, so the page runs fine with APEX Listener
    1. It has *31968 bytes* when coming from APEX Listener with a Go button disabled.
    2. It has *31938 bytes* according to the header set by EPG - for exactly the same page.
    That makes a difference of 30 bytes for what is expected to be the same contents.
    Test case 2: The button is enabled again
    1. This causes the page load to crash in APEX Listener.
    2. EPG transports *32341 bytes* according to that header.
    So we are pretty close to the hard limit for the VARCHAR2 buffer.
    For some reason, APEX Listener seems to cause a false calculation of the actual page size. Whether this is due to some charset problem or due to some other problem with response handling, I don't know. The 30 bytes difference may result from the odd header "X-ORACLE-IGNORE" with value "IGNORE, IGNORE, IGNORE, IGNORE" sent by the APEX Listener. This value has exactly 30 bytes in length, but this could be coincidence, as there are more differences in headers. If I add the size of all headers, we are even closer to the buffer limit and probably exceed it when some items need more bytes than expected.
    This could even be as simple as a line break, as your page has about 424 lines when I disabled the button... Adding 1 byte per line to the 32341 bytes of the EPG, I get 32765 bytes. Now add that button (403 bytes difference on EPG) and you exceeed the limit. Reduce that value by the line count again and you are still below.
    Could be coincidence as well, but makes me wonder.
    h6. Workaround
    To make sure that we were actually hitting that limit, I now introduce my suggestion for a workaround.
    Test case 3: Add a hidden item
    1. APEX Listener loads the page, stating the size to be *32876 bytes*
    2. EPG sees 30 bytes less and transmits the header with *32846 bytes*
    h6. Conclusion
    I can't give you a real solution for that problem, nor do I have a definitive answer on what is the root cause for it. It seems, only one of the developers may find it. But I can offer you a workaround, which is to just add some hidden item to your page so it exceeds the limit for the VARCHAR2 buffer and gets handled as clob.
    Note that this may occur outside the app builder as well. The app builder just renders some additional items when starting that page, so it has a different size from its productive representation. On the other hand, I may start counting the size of that additional page section - I wouldn't wonder if that results in a value around 400 bytes, and this is the forgotten part...
    Unfortunately, if it actually is happening outside of the app builder, this workaround isn't very handy: Dynamic contents can't be calculated that easy all the time, so you may have cases where you just don't know in advance if you are close to the limit and have to add some item to exceed it or if you've already exceeded it or if you are far below, or close enough to actually hit it when adding just one byte...
    -Udo

Maybe you are looking for

  • M115-S3094 Restore without DVD Drive.

    Hello, I have a M115-S3094 laptop and the DVD Drive does not read disc. It does not show to have any problems with the drive in Device Manager. I have tried everything I can find to correct the problem if it is a software issue (Microsoft FIx-It, Rei

  • After upgrading to Firefox 4.0, Flash pages including youtube started freezing.

    Hi, just like everyone else, today I upgraded to Firefox 4.0 from 3.6. I had many addons like: # addblock # zonealarm (disabled) # free download manager plugin (disabled) # java # Shockwave Flash Although everything was working fine with 3.6 (I had c

  • Change text "link" color only in Spry Tab content area

    I need to have multiple text link colors in my site for light and dark background colors. The only regions in my site that have a white background are in the Spry Tab Panel content area. I can't figure out how to change the text color for text links

  • Error when opening word doc

    When opening a word doc in pages 08 I get a pop-up saying "couldn't contact spell checker" The only option is to click "ok", but when I do the message immediately reappears! The only way out of the loop is to force quit. Has anyone else had this prob

  • Jdk1.6.0_13 64 bit : Has java DB dissaperead ?

    Hi, Just installed jdk1.6.0_13 64 bit after a clean format. The install did not ask where to install Java DB. Has it dissapeared? 32 bit still seems to have Java DB included Stéphane