SQL Script for looking up files

Some examples running with Control-M and Control-EM database.
Post Reply
User avatar
dirizhor
Nouveau
Nouveau
Posts: 3
Joined: 03 Aug 2009 12:00
Location: India

SQL Script for looking up files

Post by dirizhor » 18 Sep 2009 12:57

Am not a SQL person, but am tryin to learn and write scripts
This is my scenario:

A bunch of files get FTPd into "server A" at a certain time. These file names are alpha numeric and to understand the names, an application is used. This application links to a SQL DB that helps understand the file name i am looking for. i.e. I know a file name 123. But that is actually stored in a different name in the folder. The sql db helps relate the filename and the actual file..

Now, am trying to automate this using sql queries in control-m.

What i am trying to accomplish:
the control-m job uses the sql queries, finds if the files are there are not and gives me a shout message.
The problem i think here is that the files come in random. A file may come today, may not tomorrow.regardless, i have to check for the files

My plan:
write a script with the sql queries ( donno how- may be vb.. the sql server is on a windows box) for the files (40 files per script, per control-m job)
hope that the sysout would give me a return code if the file is present or not..
shout with ended ok and email of the sysout to a mail id (not sure if this can happen)

is this possible ? what are the problems i might run into ?

User avatar
Dilbert
Nouveau
Nouveau
Posts: 185
Joined: 10 Jan 2007 12:00
Location: Zagreb, Croatia

Post by Dilbert » 21 Sep 2009 9:05

Well, you can use CONTROL-M FIlewatcher module for achieving this.
Look at BMC site, documentation.

User avatar
markf
Nouveau
Nouveau
Posts: 134
Joined: 13 Jul 2006 12:00
Location: Switzerland
Contact:

Post by markf » 21 Sep 2009 5:36

I have just uploaded "Control-M File Watcher Utility.doc" - a quick guide to FW. Note that it was written at the time of 6.0.1 and there are some new options with more recent releases. However the guide will get you started and will be enough for what you describe.

User avatar
sjjoseph
Nouveau
Nouveau
Posts: 3
Joined: 12 Jan 2010 12:00

Post by sjjoseph » 18 Jan 2010 5:59

Hi all,
I am using sql 2005 .
It works nicely, but I am unable to create local server for SQL authentication.
Has anyone faced this problem before?
Thanks in advance

Post Reply