Page 1 of 1

SQL Script for looking up files

Posted: 18 Sep 2009 12:57
by dirizhor
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 ?

Posted: 21 Sep 2009 9:05
by Dilbert
Well, you can use CONTROL-M FIlewatcher module for achieving this.
Look at BMC site, documentation.

Posted: 21 Sep 2009 5:36
by markf
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.

Posted: 18 Jan 2010 5:59
by sjjoseph
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