SQL Server Performance

vbscript code execute with stored proc

Discussion in 'Non-Transact SQL Developer Performance Tuning' started by ranjandba, Jun 1, 2006.

  1. ranjandba New Member

    I have some vb script code
    set OFSO=createobject("scripting.filesystemobject")
    set ofile=ofso.createtextfile(outputfile,true)
    set objwmiservice=getobject("winmgmts:\" & strcomputer & "
    set colfolders=objwmiservice.execquery("select * from win32_directory")
    set filesys=createobjects("scripting.filesystemobject")
    for each objfolder in colfolders
    ofile.writeline "name is: " & objfilefolder.name
    set folder=filesys.getfolder(objfolder.name)
    ofile.writeline "size is: " & folder.name


    but i want to execute this code with sql server 2000 stoted procedure code
    is it possible or not
    pls provide me some info.
  2. ranjitjain New Member

    i know one way to do this in 2000.
    Create a DTS and include ur vbscript in activex script task.
    then call that dts from stored procedure which will load all folder names in text file with size.

    Anyways you can wait for others reply till then.
  3. satya Moderator

    Why not you run the same steps using TSQL?
    That way you can call the SP using VB script from your application.

    Satya SKJ
    Microsoft SQL Server MVP
    Contributing Editor & Forums Moderator
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.

Share This Page