'Name OraLoader.vbs ' 'Purpose: Run multiple sqlplus sessions concurrently ' 'Description: Run n instances of a named script simultaneously. ' 'Notes: dim oShell dim sqlScript dim cmdLine dim strUsage dim iInstances dim dbUser,dbPwd strUsage = "Usage: cscript n scriptname username password" strUsage = strUsage & vbCRLF & vbTab & "n = No of instances " strUsage = strUsage & vbCRLF & vbTab & "scriptname = path to sql script" strUsage = strUsage & vbCRLF & vbTab & "username = database username" strUsage = strUsage & vbCRLF & vbTab & "password = database password" if (Wscript.Arguments.count <> 4) then Wscript.stdout.write strUsage Wscript.Quit(1) end if ' assign variables iInstances = Wscript.Arguments(0) sqlScript = Wscript.Arguments(1) dbUser = Wscript.Arguments(2) dbPwd = Wscript.Arguments(3) cmdLine = "sqlplus " & dbUser & "/" & dbPwd & " @" & sqlScript set oShell = CreateObject("wscript.shell") wscript.stdout.write cmdline runCommand iInstances,cmdLine set oShell= nothing sub runCommand(iload,strCommand) for i = 1 to iload oShell.exec(strCommand) next end sub