Sponsored Content
Top Forums Shell Programming and Scripting Records not dropped from UNIX Script Post 302999373 by suresh_target on Monday 19th of June 2017 03:55:47 AM
Old 06-19-2017
Records not dropped from UNIX Script

Hi All,
As per my biz requirement, I need to drop the partition from our PROD table based on the retention period.

Hence I have written the script and called the drop partition procedure within the script.

The procedure is working fine and droped the partition from the table when I execute alone but when I call the procdure from the script itself, paritions are not dropped and throwing error. I really don't have any idea what is the reason for records are not dropped from the script.

Kindly provide your update on this.

Scriptname:drop_part_w56.sh

Code:
#!/bin/ksh

#Batchdate=20170616
#retn=$2
freq='W'
instance=DPHK0
dbuser=etl
dbpass=dummy

path=/CBS/HK/Temp

BatchDate=20170616

logfile=STATUS_w286_tmp_tab_$BatchDate.log

rm -f $path/$logfile

set +x

db2 connect to DPHK0 user etl using dummy

db2cmd=CALL HPPDWSG0.PARTITION_CLEANUP_PROC('SG','$BatchDate','W',?)";
echo ${db2cmd}
db2 +c -tv "${db2cmd}" >> $path/$logfile

db2 terminate

Error:

Code:
 Database Connection Information

 Database server        = DB2/AIX64 9.7.8
 SQL authorization ID   = ETL
 Local database alias   = DPHK0

/pdw/Singapore/simco/sit/pdwds_drop_part_w286.sh[38]: CALL HPPDWSG0.PARTITION_CLEANUP_PROC('SG','20170616','W',?):  not found

DB20000I  The TERMINATE command completed successfully.

Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 06-19-2017 at 05:03 AM.. Reason: Changed HTML to CODE tags.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

are dropped packets a sign of network problem?

in a xen environment , i see a lot op dropped packets via netstat -i Is this a sign of network problems, or is it normal to see this kind of numbers? i'm not sure how to interprete the data. is this normal, bad, critical. What are your stats on this? I guess i have a xen issue of some sort,... (1 Reply)
Discussion started by: progressdll
1 Replies

2. UNIX for Advanced & Expert Users

unix script for update or insert records from a file to a oracle table

Hi, I have delimited file(|). Sample data: 1|name|50009|DS24|0|12 2|name|30009|DS24|0|13 3|name|20409|DS24|0|14 4|name|20009|DS24|0|15 5|name|10009|DS24|0|16 I want to load this data into a oracle table (update and insert) Please help me the commands and also... (1 Reply)
Discussion started by: unihp1
1 Replies

3. Shell Programming and Scripting

unix shell script which inserts some records into a file located in remote servers...

All, I need to write an unix shell script which inserts some records into a file located in remote servers. * Get the input from the user and insert according the first row. It should be in ascending order. 123451,XA,ABA 123452,XB,ABB 123453,XC,ABC 123455,XE,ABE 123456,XF,ABF 123458,XG,ABG... (2 Replies)
Discussion started by: techychap
2 Replies

4. SuSE

Recover dropped database

I have deleted a database. I restored it again with a backup. Now we lost some data of two days. Is it possible to restore this lost data? (5 Replies)
Discussion started by: Eastme
5 Replies

5. Ubuntu

System chrashe , dropped into Busybox

This is the mistake that i've done : First of all go to /etc/apt/sources.list folder from terminal or using file manager ... than copy the content of sources.list in to your adequate source.list. Create a file named sources.list.bt and paste the same content In the end open the... (0 Replies)
Discussion started by: dud3
0 Replies

6. News, Links, Events and Announcements

MySQL dropped in favor of MariaDB

Fedora and openSUSE will replace MySQL with MariaDB: Oracle who? Fedora & openSUSE will replace MySQL with MariaDB | ZDNet The article also has a comment that Chakra is planning on doing the same. No doubt the Fedora based distributions are planning to do the same. (7 Replies)
Discussion started by: figaro
7 Replies

7. Shell Programming and Scripting

UNIX Script required for count the records in table

Hi Friends, I looking for the script for the count of the records in table. and then it's containg the zero records then should get abort. and should notify us through mail. Can you please help me out in this area i am lacking. (5 Replies)
Discussion started by: victory
5 Replies

8. UNIX for Advanced & Expert Users

Find User who dropped table in teradata DB

HI Team Is there a way to track which user dropped the table in Teradata ? Please share the query or approach . Thanks (0 Replies)
Discussion started by: Perlbaby
0 Replies

9. Shell Programming and Scripting

Looping through records in db and processing them in UNIX

Hi, I want to read multiple records from oracle database table and then based on each record I need to do some file modifications in UNIX. I'm not sure how do I process each record from DB in UNIX.Below is the code snippet. sqlplus user/pwd@DEV for i IN (select * from table) loop -- for... (2 Replies)
Discussion started by: prats_7678
2 Replies
FDISK(8)						    BSD System Manager's Manual 						  FDISK(8)

NAME
acorn-fdisk -- partition editor for Acorn/RISC OS machines SYNOPSIS
acorn-fdisk -h | --help | -v | --version acorn-fdisk [-t scheme | --type scheme] -l | --list [device ...] acorn-fdisk [-t scheme | --type scheme] -s | --size partition acorn-fdisk [-t scheme | --type scheme] [device] DESCRIPTION
The acorn-fdisk utility allows one to display or interactively edit partition tables for Acorn/RISC OS machines in various formats. Using the PC/BIOS format, standard IBM PC (i386) partition tables can also be accessed. When no optional device is given, it defaults to /dev/hda or /dev/sda. The options are as follows: -h | --help Display a short usage and exit immediately. -l | --list Display the partition table(s) of all devices. -s | --size Display the size of partition. -t | --type Select the partitioning scheme to use. Valid schemes are: EESOX Eesox SCSI on the Acorn machines. ICSIDEFS ICS IDE. Filecore/Linux Linux on Filecore. This uses the non-ADFS descriptor to point to the start of the disc to be partitioned. The first two sectors contain a partition table to identify the Linux partitions contained within. PC/BIOS PC/BIOS partitioning scheme. This consists of a partition table in the first sector of the disk which contains both CHS and LBA values for the partitions. There can be up to four entries in the primary partition table. One of these can be an extended partition containing up to four extra partitions. PowerTec PowerTec SCSI on the Acorn machines. Filecore/RISCiX RiscIX on Filecore. -v | --version Display the version of acorn-fdisk and exit immediately. If neither -l | --list or -s | --size are given, the partition table of the given device will be edited interactively. EXAMPLES
Display the default device's partition table on a PC: acorn-fdisk --type PC/BIOS -l Display the PC partition table of /dev/sda: acorn-fdisk --type PC/BIOS --list /dev/sda Display the size in blocks of the partition /dev/sda1: acorn-fdisk --type PC/BIOS --size /dev/sda1 Edit the MBR partition table interactively: acorn-fdisk --type PC/BIOS Display the partition table of an MBR backed up to a file: acorn-fdisk -t PC/BIOS -l mbrdump.bin Display the size of the first partition on a device where the MBR would be restored from the backup file mbrdump.bin: acorn-fdisk -t PC/BIOS -s mbrdump.bin1 AUTHORS
arm-fdisk was written by Russell King <rmk@arm.uk.linux.org> based on util-linux fdisk, which was written at least partially by A. V. Le Blanc <LeBlanc@mcc.ac.uk>. This manual page was written for the Debian system by Thorsten Glaser <tg@debian.org> but may be used by others. BSD
October 2, 2010 BSD
All times are GMT -4. The time now is 03:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy