#134896 - 2005-03-03 09:01 PM
Re: Generating SQL from a text file
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I do not see why you couldn't build SQL text statement from whatever source data you want. For me to comment further I would have to understand what SQL statement(s) you want to construct. Knowing the end result we could engineer backward to provide the proper data constructs to be used in making the SQL.
|
|
Top
|
|
|
|
#134899 - 2005-03-03 11:06 PM
Re: Generating SQL from a text file
|
jtokach
Seasoned Scripter
   
Registered: 2001-11-15
Posts: 513
Loc: PA, USA
|
Quote:
If i have to guess any loginscript can fast and esaily write ini files in a public folder and then pick it up with a scheduled process from the server to the database.
Jose, that's the general idea. Based on current design, Client attaches to MySQL server via ODBC and updates via ADO. Given the frequency, accuracy and data we're collecting, this scaled well for about 600 clients per server. (Which is not dedicated solely to MySQL). So, we're redesigning with an Asset Insight model in mind. Client writes data to a file, encrypts it, sends to a store and forward server which sends to the DB server. The DB server serially imports the files.
So I'm mulling over the options of having the server import the data via ADO or by using the DB utilities to import SQL directly. I'm thinking that the SQL method will lack the required flexibility without poking into the DB.
However, it might be a lot faster for the tables that don't require recordset results, which make up the bulk of the data.
Not sure which method would make implementing several server import processes easier.
_________________________
-Jim
...the sort of general malaise that only the genius possess and the insane lament.
|
|
Top
|
|
|
|
#134901 - 2005-03-04 10:17 PM
Re: Generating SQL from a text file
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I do this now. My logon script collect data that I want and writes it to a file to a hidden share on the @lserver server.
A scheduled server -based program then enumerates all the DCs and collects the files from each domain controller, parses the data, and write the data to an Oracle DB using SQL.
My program is a Perl EXE. Every time it runs it enums the DCs, creates the directory/share if necessary, then processes the files. It deletes the remote file if it is successfully written ot he DB.
My data file is a single line of text (~) tilde delimited.
|
|
Top
|
|
|
|
#134905 - 2005-03-08 07:43 PM
Re: Generating SQL from a text file
|
Jose
Seasoned Scripter
   
Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
|
|
|
Top
|
|
|
|
#134906 - 2005-03-08 11:33 PM
Re: Generating SQL from a text file
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
My KiXtart code gather data and presents it in a flat format. If the database is in the third normal form, the DBloader progrma parses the incoming data and hold the inteligence of what goes where.
I use Perl specific DB modules for accessing Oracle.
I have yet to see any "~" show up in any of the data I collect from the workstation.
|
|
Top
|
|
|
|
#134908 - 2005-03-09 03:30 AM
Re: Generating SQL from a text file
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I only collect basic info about user, computer, Virus software, SMS, etc. I do not collect any path related data at all. But If you did I can see the DOS short directory and filenames names could be a problem.
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1058 anonymous users online.
|
|
|