SQL Server Performance

WMI to SQL Server

Discussion in 'General DBA Questions' started by Raj1979, May 10, 2005.

  1. Raj1979 New Member

    I want to know if there is any way we can redirect all the outputs from WMI script/ VB Script into SQL Server database. Can any one please comment how this can be achieved.

    Or is there any way we can run WMI Scripts from SQL Server

    Feel free to post any questions on this.
  2. Madhivanan Moderator

    If you store the result of WMI script/ VB Script as Text file, then you can try

    bulk insert table from 'FilePath'
    WITH (
    DATAFILETYPE = 'char',
    FIELDTERMINATOR = ' ',
    TABLOCK
    )



    Madhivanan

    Failing to plan is Planning to fail
  3. Raj1979 New Member

    Isn't there any other direct way of connecting to SQL Server instad of saving it into a notepad and running a DTS.

    Thanks
  4. Argyle New Member

    Create a standard ADO connection in your vbscript to connec to to sql server. Google for Server.CreateObject("ADODB.Connection")

Share This Page