troubleshooting Question

Routine - From txt file to SQL (with parse)

Avatar of usslindstrom
usslindstromFlag for Japan asked on
Microsoft SQL Server 2008Microsoft SQL Server 2005Databases
5 Comments2 Solutions341 ViewsLast Modified:

As usual, I'm in need of some serious help that's probably extremely easy for all of you.  :)

Background:  In our enterprise, we have a vbscript that adds printers to user's workstations.  This script is run against a computer and reads a text file with a list of printers and associated room numbers, and based on the variable %computer% installs printers that are assigned to itself.

I've attached a copy of the text file that gets scanned by vb below.

Well...  I've taken this business logic to the next level, and designed a SQL database /vb script pair that mimics the original behavior of this script.  It's actually very slick, and I'm quite proud of myself.  :)  In saying that, I've normalized the crap out of the database, and split the text file you see below into 8 individual tables, including 2 lookup tables and a ton of 'views'.  (I've included screenshots of the new table layout).

So now comes my "I have NO idea how I'm going to do this" question that I need help with.

We have approx 45 sites that are doing business currently using the original vbscript / textfile solution.  I need to develop a "transitory" solution that will migrate everyone from the text file into the SQL database.

How would I write a script that could read the contents of what you see below, located at each one of the sites...  Into the SQL instance?  As they're ALL doing business the old way with the text files, I'm guessing I need to periodically read the file and inject any changes into SQL.

ANY ideas on this topic are more than welcome, and I appreciate any help that you guys can give.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros