Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
Since I migrated the server from 10 to 11, I got some things pretty weird that happened . we schedule the reloading tasks with $universe that you may all probably know.
After the migration, we did the necessery to keep that kind of architecture :
$universe ---->Reload.vbs----->EDX.exe
I created QlikViewEDX group with full rights.
Finally, here's the issue :
Case 1 : I launched the reload in command line (Reload.vbs----->EDX.exe) , that works.
Case 2 : launched the EDX.exe alone , that works too.
Case 3 : $universe ---->Reload.vbs , according to $universe response, that works.
Case 4 : $universe ---->Reload.vbs----->EDX.exe . that doesn't work
I tried many things ( w/ or w/o password,restart services,...) but I can't figure out why Case4 ( what I want) doesn't work at all.
Do the EDX files have to be in the same folder of Reload.vbs?
I humbly request help for a ghosty case.
Thanks to you all, have a nice day
Hi,
Did you include the $universe account, used to trigger the Reload.vbs, in the QlikView EDX group?
In cases 1, 2 and 3, are you using the same user account as the $universe's?
Can you post the Reload.vbs file?
Good morning !!
I execute the tasks in the cases 1 to 3 in local client (where the server is) .
Here's the .vbs file :
On Error Resume Next
' ***********************************************************************************************************************
' ***********************************************************************************************************************
' Deux paramètres en entrée :
' - Type application : TDB ou SOURCE
' - Nom application QV sans l'extension .qvw
'
' ***********************************************************************************************************************
' Modif JD 18/06/2010 Ajout code erreur à wscript.quit(no_erreur) en cas de sortie anormale pour $u
' Modif BP 22/06/2010 Modification paramètre Env
' Modif YSance 14/12/2011 Transformation pour controle par declenchement EDX de la Tache.
'-----------------------------------------------------------------------------
'- Constantes Global
'-----------------------------------------------------------------------------
'Valeurs des Codes Retours du Déclencheur.
CONST SUCCESS = 0 'Tache terminée avec succes.
CONST TASKNOTFOUND = 1 'Impossible de trouver la tache.
CONST TASKISALREADYRUNNING = 2 'Tache déja en cours d'execution.
CONST NOEDXTRIGGERFOUND = 3 'Pas de trigger EDX pour la tache.
CONST OTHERERROR = 9 'Erreur Inconnue.
'Valeurs Retournées par QVS durant le rechargement.
CONST WAITING = 0
CONST RUNNING = 90
CONST FINISHEDWITHWARNINGS = 91
CONST FINISHEDWITHERRORS = 92
CONST FATALERROR = 100
'Paramètres d'execution de l'edx.
CONST WAIT = True 'Attends la fin du reload pour passer a la suite.
CONST ITERATIONS = 28800 'Nombre de Raffraichissement avant Time-Out du Reload.
CONST DELAY = 5 'Délai en seconde entre 2 rafraichissements
CONST DEFAULT_QDS = "http://srv-qv-vmpr:4720/qtxs.asmx"
' Le compte qui appel l'EDX doit etre membre du groupe "QlikView Administrators"
CONST USERNAME = "GPM\SVC-QV" ' "Domaine\Utilisateur"
CONST PASSWORD = "qlikview2011" ' "Mot de passe du compte entre double quote"
'-----------------------------------------------------------------------------
'- Variables Globales
'-----------------------------------------------------------------------------
DIM xmlHttp 'Objet utilisé pour la connection au QDS
DIM xml 'Objet contenant la réponse XML pour le QDS
DIM xmlObj 'Objet contenant la réponse XML du QDS
DIM EDXTASK 'Nom de la tache à declencher
DIM EDXPSWD 'Mot de passe de la Tache a déclencher of Task
DIM node 'Compteur utilisé pour itérer sur les réponses XML
DIM i 'Compteur utilisé pour itérer sur la fonction GetTaskStatus()
DIM TaskStartResult 'Chaine retourné initialement par la fonction RequestEDX()
DIM TaskStartResultCode 'Entier retourné initialement par la fonction RequestEDX()
DIM GetTaskStatus 'Waiting/Running/etc
DIM Finished 'Booléen de Tache Terminé.
DIM RetourCode 'Code Retour produisant le %ErrorLevel%
Dim Env, strQVW, strCmd, Err, strRep, typReload,QVEnv
'-----------------------------------------------------------------------------
'- Debut de Script
'-----------------------------------------------------------------------------
set shell = wscript.createobject("wscript.shell")
set fso = CreateObject("Scripting.FileSystemObject")
Env = left(wscript.ScriptFullName,len(wscript.ScriptFullName)-len(wscript.ScriptName)) 'Chemin Complet du fichier VBS
QVEnv= mid(Env,InStrRev(Env, "\",InStrRev(Env, "\")-1)+1,InstrRev(Env,"\")-InStrRev(Env, "\",InStrRev(Env, "\")-1)-1) 'Répertoire parent (PRODUCTION OU RECETTE)
IF WScript.Arguments.count <> 2 then 'Contrôle et récupération des Paramètres passés
wscript.echo "Nombre de paramètres incorrects"
wscript.echo "Syntaxe : Cscript ScriptName.vbs [TDB/SOURCE] ApplicationNameWithoutExtention"
wscript.quit(1)
ELSE
typReload=WScript.Arguments(0)
strQVW = WScript.Arguments(1)
END IF
EDXTASK = QVEnv & typReload & "/" & strQVW&".qvw"
'Script de la RECETTE
EDXPSWD = "" 'Password Vide pour l'EDX
wscript.echo "D:\QV\RECETTE\Program\QMSEDX_CommandLine\QMSEDX.exe -task=" & EDXTASK
'RetourCode = shell.run("D:\Program\QMSEDX_CommandLine\QMSEDX.exe -task=" & EDXTASK &" -password=qlikview2011",0,True)
'RetourCode = shell.run("cmd /C echo test exec > d:\qv\recette\test.txt",0,True)
RetourCode = shell.run("D:\QV\RECETTE\Program\QMSEDX_CommandLine\QMSEDX.exe -task=" & EDXTASK & " -timeout=20000",0,True)
wscript.echo RetourCode
WScript.Quit RetourCode
Is the $universe program running in the same server? If not, this may be the problem. It will run the vbs and when it reaches the line shell.run(), it will try to run the QMSEDX.exe that is in the $universe's server's D drive, not the QV's server's D drive... So you'll have to change the folder from "D:\QV\RECETTE\Program\QMSEDX_CommandLine\QMSEDX.exe" to something like "\\qvservername\QV\RECETTE\Program\QMSEDX_CommandLine\QMSEDX.exe".
Well,
$universe is not installed on the same server. But if you look @ case 3, you can see that the relation between $Universe and reload.vbs is functionnal
But I'll consider your suggestion, and try.