Good friends.
I come to you, since I have been given a task at work that far exceeds the little knowledge I have about Batch.
The point is that you need to verify if the serials of some hardware components (obtained by CMD) are the ones in the database.
For example: I obtain through the Batch the serial of the equipment, of the memories, of the hdd, of the processor, etc.
Then the equipment serial is searched in a database, and when matching, the rest of the serials must be validated.
If everything is fine, it does not show any alert, if there is a discrepancy, it shows an alert based on the changes.
The million dollar question, is it possible to do this with batch?
If it is possible, could you give me some light on how to do it, an example, or at least some links to read.
Grateful more than ever for the help you can give me
Find data in an external database with Batch
Moderator: DosItHelp
-
- Posts: 43
- Joined: 12 Dec 2021 06:45
Re: Find data in an external database with Batch
I'm sure it is possible, however, i'd advise that you do not, especially when you are not experienced with batch files.
I'd advise that you do not use your multiple secret, WMIC commands in cmd, to output in UTF-16 LE many pieces of data, then try to validate one or more using its poor implementation of 32-bit signed integers, and pattern matching within a database, then attempting to send notifications.
All of these things would be better performed using the built in PowerShell executable.
I'd advise that you do not use your multiple secret, WMIC commands in cmd, to output in UTF-16 LE many pieces of data, then try to validate one or more using its poor implementation of 32-bit signed integers, and pattern matching within a database, then attempting to send notifications.
All of these things would be better performed using the built in PowerShell executable.
Re: Find data in an external database with Batch
Three quarters of your problem is not even batch file related. The majority of your knowledge deficit is making the DB queries to verify the data. This forum is not a DB forum. If you need help with the DB queries you will need to ask on another site.
-
- Expert
- Posts: 960
- Joined: 15 Jun 2012 13:16
- Location: Italy, Rome
Re: Find data in an external database with Batch
I am a former database administrator, I used Oracle DB, I have not practiced for a long time but I can direct you. Let's try.
What database do you need to use?
What database do you need to use?