1.

Solve : Help needed in making a batch file?

Answer»

Hi All, I am new to making batch files.

Situation is that we have a word file of 7 lacs rows. In the file, simple commands of dropping indexes and then recreating them again is there. Most of the indexes are getting recreated. I need to find such indexes which are getting dropped but not getting recreated. sample of the concerned word file is as follows -

---------------------------------------------------------
DROP INDEX DATABASE.PS_SCON_ATT_LNG
;
COMMIT
;
CREATE UNIQUE INDEX DATABASE.PS_SCON_ATT_LNG ON PFPRGP.PS_SCON_ATT_LNG
(SETID,
CNTRCT_ID,
LINE_NBR,
SCHED_LINE_NBR,
FILE_EXTENSION,
DOCUMENT,
LANGUAGE_CD) USING STOGROUP PRDGROUP PRIQTY 48 SECQTY 720 CLUSTER
BUFFERPOOL BP2 CLOSE NO
;
COMMIT
;
DROP INDEX DATABASE.PS_SCON_COMPTTRS
;
COMMIT
;
CREATE INDEX DATABASE.PS_SCON_COMPTTRS ON PFPRGP.PS_SCON_COMPTTRS
(SETID,
CNTRCT_ID,
LINE_NBR,
SCHED_LINE_NBR,
COMPETITOR_CD) USING STOGROUP PRDGROUP PRIQTY 48 SECQTY 720 CLUSTER
BUFFERPOOL BP2 CLOSE NO
;
COMMIT
;
DROP INDEX DATABASE.PSASCON_CUST_CGRP
;
DROP INDEX DATABASE.PS_SCON_CUST_CGRP
;
COMMIT
;
CREATE UNIQUE INDEX DATABASE.PS_SCON_CUST_CGRP ON
PFPRGP.PS_SCON_CUST_CGRP (SETID,
CNTRCT_ID,
SOLD_TO_CUST_ID,
CUSTOMER_GROUP) USING STOGROUP PRDGROUP PRIQTY 48 SECQTY 720
CLUSTER BUFFERPOOL BP2 CLOSE NO
;
CREATE INDEX DATABASE.PSASCON_CUST_CGRP ON PFPRGP.PS_SCON_CUST_CGRP
(SETID,
SOLD_TO_CUST_ID) USING STOGROUP PRDGROUP PRIQTY 48 SECQTY 720
BUFFERPOOL BP2 CLOSE NO
;
COMMIT
;

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

Can anyone help me with any batch file which can find such indexes which are getting dropped and not getting recreated
Or any way to create such batch file ??

Kindly help...

Thanks in advance.

Anshu.No that I know the ANSWER to this post, but you shouldn't double post your question (actually, I think you triple POSTED). Just wait for replies to come in.If that is some kind of programming language, it isn't batch. Or does he want us to make a batch file that does.....that?Well, he has also posted this on Web Design and Programming (I think), and in Programming he said something about C++ and C. I'm not GOING to do anything like converting that into batch, only to find out I didn't need to (and I;m not that good at it, so it wouldn't even work...)

anshu, are you there? What do you mean? What language is that?

And Carbon, are you like watching my posts or something, because whenever I look at New replies to my posts, you're always there.I'm just clicking the 'show new replies to your posts' and 'show unread posts since last visit' link every few minutes/when i get the chance/soemtimes...

I don't see the reason for triple posting, its hard to maintain for the OP and it can get confusing.Probably too early in the morning, but can you please explain Quote

Situation is that we have a word file of 7 lacs rows
Why are SQL statements in a Word document and what are Quote
lacs rows

Best I can suggest is to take an inventory of the existing indexes using the database catalog before dropping and recreating the indexes. After recreating the indexes, take another inventory. From there it should be a simple matter to see what is missing.



This probably should be on the Programming board but I see other members have already noticed that it has been multi-posted. I think the given sql code is of Oracle-PLSQL.
Why u dont SPOOL list of index from oracle to excel which u have drop and simply by adding the DROP or completing the syntax of drop command. U can copy to word or notepad and will run the QUERY sql editor by only filename.



Discussion

No Comment Found