Problem with script Test-ExchangeServerHealth

Have been using Paul Cunningham's most excellent Test-ExchangeServerHealth script.  It has been running flawlessly on Exchange 2010 for sometime.  I moved it to 2013 and immediately encountered errors.  The error occurs down in the DAG test
routine.  The error I get:
Get-DatabaseAvailabilityGroup : Could not load file or assembly 'Microsoft.Exchange.Data, Version=14.0.0.0, Culture=neutral,PublicKeyToken=xxxxxxxxx' or one of its dependencies. The system cannot find the file specified. At C:\Scripts\TestExchangeServerHealth\Test-ExchangeServerHealth.ps1:1159
char:15
+     $tmpdags = @(Get-DatabaseAvailabilityGroup -Status)
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-DatabaseAvailabilityGroup], FileNotFoundException
    + FullyQualifiedErrorId : [Server=CAS2,RequestId=xxxxx,TimeStamp=4/30/2014 1:04:38 PM] [FailureCategory=Cmdlet-FileNotFoundException] CB830B58, Microsoft.Exchange.Management.SystemConfigurationTasks.GetDatabaseAvailabilityGroup
Hoping this is an easy fix.  Also making sure SP1 is supported with the script?
Skip
Skippy

So it seems if I start Exchange Management Shell as administrator and call the script from the shell it works perfectly fine.  I now have another script with the same exact problem.  I'm trying to run this from a batch file via Task Scheduler...
Here is the syntax that isn't working (exchange 2013)
Inside BAT file:
PowerShell.exe -PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\V15\Bin\ExShell.psc1" -Command "C:\Scripts\TestExchangeServerHealth\Test-ExchangeServerHealth.ps1" -sendemail -log
Executing the BAT file from task scheduler.
Is there something I need to do different with 2013 in order to execute a script via task scheduler?
Skippy

Similar Messages

  • Lately and i dont know why i see a pop up about a problem with script. can some1 help me?

    there is a pop up about a problem with script. it ask me end and contuniue the script. i didnt have that problem before. plz help me it gets really irritating. it asks a lot

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Having multiple problems with script - NTFS Permissions and AD Groups

    Hi, all!  I'm having multiple problems with my first script I've written with Powershell.  The script below does the following:
    1. Prompts the user for a corporate division under which a shared folder will be created, and adjusts variables accordingly.
    2. Prompts if the folder will be a global folder or an office/location-specific folder, and makes appropriate adjustments to variables.
    3.  If a global folder, prompts for the name.  If an office/location-specific folder, prompts for each component of the street address, city and state and an optional modifier.  I've prompted for this information in this way because the information
    is used differently later on in the script.
    4.  Verifies the entered information and requests confirmation to proceed.
    5.  Creates the folder.
    6.  Creates an AD OU and/or security group(s).
    7.  Applies appropriate security groups to the new folder and removes undesired permissions.
    Import-Module ActiveDirectory
    $Division = ""
    $DivAbbr = ""
    $OU = ""
    $OUDrive = "AD:\"
    $FolderName = ""
    $OUName = ""
    $GroupName = ""
    $OURoot = "ou=DFS Restructure Testing OU,ou=Pennsylvania Camp Hill 4410 Industrial Park Rd,ou=Locations,ou=Camp Hill,dc=jacobsonco,DC=com"
    $FSRoot = "E:\"
    $FolderPath = ""
    $DefaultFolders = "Archive","Customer Service","Equipment","Inbounds","Management","Outbounds","Processes","Projects","Quality","Reports","Returns","Safety","Schedules","Time Keeping","Training"
    [bool]$Location = 0
    do {
    $userInput = Read-Host "Enter CLS Division: (W)arehousing, (S)taffing, or (P)ackaging"
    Switch ($userInput)
    W {$Division = "Warehousing"; $DivAbbr = "WHSE"; $OU = "ou=Warehousing,"; break}
    S {"Staffing is not yet implemented."; break}
    P {"Packaging is not yet implemented."; break}
    default {"Invalid choice. Please re-enter."; break}
    while ($DivAbbr -eq "")
    write-host ""
    write-host ($Division + " was selected.")
    $FolderPath = $Division + "\"
    write-host ""
    $choice = ""
    do {
    $choice = Read-Host "Will this be a (G)lobal folder or (L)ocation folder?"
    Switch ($choice)
    G {$Location = $false; break}
    L {$Location = $true; $FolderPath = $FolderPath + "Locations\"; $OU = "ou=Locations," + $OU; break}
    default {"Invalid choice. Please re-enter."; $choice = ""; break}
    while ($choice -eq "")
    write-host ""
    write-host ("Location is set to: " + $Location)
    write-host ""
    if ($Location -eq $false) {
    $FolderName = Read-Host "Please enter folder name:"
    $GroupName = $DivAbbr + " " + $FolderName
    } else {
    $input = Read-Host "Please enter two-letter state abbreviation:"
    $FolderName = $FolderName + $input + " "
    $input = Read-Host "Please enter city:"
    $FolderName = $FolderName + $input + " "
    $input = Read-Host "Please enter street address number only:"
    $FolderName = $FolderName + $input
    $GroupName = $DivAbbr + " " + $FolderName
    $FolderName = $FolderName + " "
    $input = Read-Host "Please enter street name:"
    $FolderName = $FolderName + $input
    $input = Read-Host "Please enter any optional information to appear in folder name:"
    if ($input -ne "") {
    $FolderName = $FolderName + " " + $input
    $OUName = $FolderName
    write-host
    write-host "Path for folder: "$FSRoot$FolderPath$FolderName
    write-host "AD Path: "$OUDrive$OU$OURoot
    write-host "New OU Name: "$OUName
    write-host -NoNewLine "New Security Group names: "$GroupName
    if ($Location -eq $true) { write-host " and "$GroupName" MGMT" }
    write-host
    $input = Read-Host "Please confirm creation of new site/folder: (Y/N) "
    if ($input -ne "Y") { Exit }
    write-host
    write-host -NoNewLine "Folder exists: "; Test-Path ($FSRoot + $FolderPath + $FolderName)
    if (Test-Path ($FSRoot + $FolderPath + $FolderName)) {
    Write-Host "Folder already exists! Skipping folder creation..."
    } else {
    write-host "Folder does not exist. Creating..."
    new-item -path ($FSRoot + $FolderPath) -name $FolderName -itemtype directory
    Set-Location ($FSRoot + $FolderPath + $FolderName)
    if ($Location -eq $true) {
    $tempOUName = "ou=" + $OUName + ","
    write-host
    write-host $OUDrive$tempOUName$OU$OURoot
    write-host
    write-host -NoNewLine "OU exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
    if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
    Write-Host "OU already exists! Skipping OU creation..."
    } else {
    write-host "OU does not exist. Creating..."
    New-ADOrganizationalUnit -Name $OUName -Path ($OU + $OURoot) -ProtectedFromAccidentalDeletion $false
    $GroupNameMGMT = $GroupName + " MGMT"
    if (!(Test-Path ($OUDrive + "CN=" + $GroupName + "," + $tempOUName + $OU + $OURoot))) { write-host "Normal user group does not exist. Creating..."; New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
    if (!(Test-Path ($OUDrive + "CN=" + $GroupNameMGMT + "," + $tempOUName + $OU + $OURoot))) { write-host "Management user group does not exist. Creating..."; New-ADGroup -Name $GroupNameMGMT -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    # $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    $BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
    $BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
    write-host $BIUsersSID.Value
    # out-string -inputObject $BIUsers
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.RemoveAccessRuleAll($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    get-acl ($FSRoot + $FolderPath + $FolderName) | fl
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $ADGroupName = "JACOBSON\" + $GroupName
    $objUser = New-Object System.Security.Principal.NTAccount($ADGroupName)
    $objUser.Translate([System.Security.Principal.SecurityIdentifier]).Value
    write-host $ADGroupName
    write-host $objUser.Value
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
    Out-String -InputObject $ar
    $FolderACL.AddAccessRule($Ar)
    $ADGroupName = "JACOBSON\" + $GroupNameMGMT
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
    Out-String -InputObject $ar
    $FolderACL.AddAccessRule($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    } else {
    $tempOUName = "cn=" + $GroupName + ","
    write-host
    write-host $OUDrive$tempOUName$OU$OURoot
    write-host
    write-host -NoNewLine "Group exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
    if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
    Write-Host "Security group already exists! Skipping new security group creation..."
    } else {
    write-host "Security group does not exist. Creating..."
    New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ($OU + $OURoot)
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $ADGroupName = "JACOBSON\" + $GroupName
    $FolderACL.SetAccessRuleProtection($True,$True)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"Modify","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    My problems right now are in the assignment/removal of security groups on the newly-created folder, and the problems are two-fold.  Yes, I am running this script as an Administrator.
    First, I am unable to remove the BUILTIN\Users group from the folder when this is an office/location-specific folder.  I've tried to remove the group in several different ways, and none are having any effect.  Oddly, if I type in the lines directly
    into Powershell, they work as expected.  I've tried the following methods:
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    $BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
    $BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.RemoveAccessRuleAll($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    In the first case, the script goes through and has no apparent effect because afterwards, I do a get-acl and the BUILTIN\Users group is still there, although when looking through the GUI, inheritance appears to have been broken from the parent folder.
    In the second case, I get the following error message:
    Exception calling "RemoveAccessRuleAll" with "1" argument(s): "Some or all identity references could not be translated."
    At C:\Users\tesdallb\Documents\FileServerBuild.ps1:110 char:5
    +     $FolderACL.RemoveAccessRuleAll($Ar)
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : IdentityNotMappedException
    This seems strange that the local server is unable to translate the SID of a BUILTIN account.  I've also tried explicitly putting in the BUILTIN\Users SID in place of the variable in the New-Object line, but that gives me the same error.  I've
    also tried the solutions given in this thread:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/ad59dc58-1360-4652-ae09-2cd4273cbd4f/remove-acl-issue?forum=winserverpowershell and at this URL:
    http://technet.microsoft.com/en-us/library/ff730951.aspx but these solutions also failed to have any effect.
    My second problem is when I try to apply the newly-created security groups, I also will get the "Some or all identity references could not be translated."  I thought I had found a workaround to the problem by adding the -PassThru option to
    the New-ADGroup commands, because it would output the SID of the group after creation, however a few lines later, the server is unable to translate the account to apply the security groups to the folder.
    My first Powershell script has been working well up to this point and now I seem to have hit a showstopper.  Any help is appreciated.
    Thanks!

    I was hoping to stay with strictly Powershell, but unless I can find a Powershell solution, I may resort to ICACLS.
    As for the problems with my groups not being translatable right after creating them, I think I have solved this problem by using the -Server parameter on all my New-ADGroup commands and this example code seems to have gotten around the translation problem,
    again utilizing the -Server parameter on the Get-ADGroup command:
    get-acl ($FSRoot + $FolderPath + $FolderName) | fl
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    # Add the new normal users group to the folder with Read and Execute permissions
    $GroupSID = Get-ADGroup -Identity $GroupName -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
    $SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupSID)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    # Add the management users group to the folder with Modify permissions
    $GroupMGMTSID = Get-ADGroup -Identity $GroupNameMGMT -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
    $SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupMGMTSID)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    Going this route seems to ensure that the Domain Controller I'm creating my groups on is the same one that I'm querying for the group's SID to use in the FileSystemAccessRule.  It's been working fairly consistently.
    Still having issues with the translation of the BUILTIN\Users group, though. 

  • Problem with Script Events Manager buttons not showing up

    Hi,
    First off let me say that the latest release of Adobe products is a steaming pile of @#$#$.
    Countless software issues, it's slow, buggy, you name it.
    That being said, has anyone had this problem and know how to fix it.
    My Script Events Manager is broken. Yes broken. The only buttons I see are "Done" and "Remove". There is no "Add" button so that I can actually add events. Someone please tell me this is user error and that I don't need to reinstall PS.

    My system has 8 Gb of Ram and 4 processors. I doubt it's the system. I've had problems with CS Master Collection since day one. My main complaint is the ******* tabs and interface. Everything is so chunky. CS2 was smooth as butter. They keep making their products use more RAM and it's ridiculous. The tabs don't help, they only make life harder.
    Thanks for the suggestions, I was hoping not to have to reinstall PS, but looks like it's the only option.

  • Problems with script

    hello to all
    i have a little problem with my script
    I ask you if there is the possibility to activate randomize order in a text animator with script
    i have a check box and i try with this function that is
    function make_random(random){
            if(random){
                var animator1 = layer.Text.Animators.addProperty("ADBE Text Animator");
                var selector1 = animator1.Selectors.addProperty("ADBE Text Selector");
                animator1 = animator1.Properties;
                animator1.addProperty("ADBE Text Randomize Order").setValue([on]);
            }else{
    but do not work
    can someone halp me please?
    sorry for my english

    See my reply on your other post:
    http://forums.adobe.com/thread/1312888?tstart=0

  • Problem with script when downloading

    Hi,
    I have a problem with downloading Flash Player to my XP, Internet Explorer computer.
    All of the time I get the message saying that a problem has occured with the script on this page. I have tried several times and at the end of the download procedure this happens all the time. I have enabled scripting and it has been working for all years until now. Here you can see the message I get (in swedish):
    Is there anyone who can give me a tips on how to get Flash Player?

    Hello,
    Welcome to Adobe Forums.
    You can download Adobe Flash Player offline installer, links on this document :
    http://helpx.adobe.com/flash-player/kb/installation-problems-flash-player-windows.html
    Thanks,
    Vikram

  • Problem with Script in Adium

    Greetings,
    I'm having a problem with a Script. In Adium, I'm trying to use a Script called "quoteDB" that basically picks up a random quote from a file and shows it. Since I'd like to use it to change my display name from time to time, my problem is that the script runs every 20 seconds, so my name also changes..
    My question is: does anyone knows how to configure the script "delay", I mean, how to introduce some kind of "wait" ou "idle"..
    Here's the script:
    on substitute(filePath)
    set filePath to (filePath as alias)
    open for access filePath
    set raw to read filePath using delimiter "
    close access filePath
    set quotes to {""} as list
    set j to 1
    repeat with i from 1 to number of items in raw
    set this_item to (text item i of raw)
    if (this_item is "-") then
    set quotes to quotes & ("" as item)
    set j to j + 1
    else
    set item j of quotes to (item j of quotes & (this_item & ""))
    end if
    end repeat
    return some item of quotes
    end substitute
    Thanks a lot.
    rc

    The statement for a delay is:
    delay 60
    where the time is the number of seconds (60, or one minute in my example). There is also an idle handler in a stay-open script, that uses the number of seconds returned for the interval until the next time the handler is run:
    on idle
       return 60
    end idle
    I don't know what you are using to run the script every 20 seconds (or why your name is changing), so there may be a conflict with the various timings.

  • Problem with Hardware Test on Quad G5

    I have just set up my new Quad G5 and tried to run a big render task on Final Cut Pro. The task quits every time after a few minutes with no explanation.
    I decided to try the Hardware Test to see if I was having memory problems with the 2 1GB modules that I had installed.
    I removed everything connected to the computer except the display (20" Studio). The tests seem to load OK but as soon as the opening "Test choice" window comes up I get an error in the bottom left corner of the screen which says:
    Warning! Memory leaks numMalloc before 49 numMalloc after 812
    Reboot to reinitialize the heap
    Standalone Diagnostics v24.1.2
    So I thought there must be a memory problem, so I removed the 2 new DIMMs and tried again - same problem!
    Do I have a bad test disk?

    Hi everyone!
    Many thanks for all the helpful suggestions. Here's where I am now.
    I reset the PMU
    I downloaded Hardware Monitor (and paid the $8!) and it tells me that everything is normal. For the Quad, this gidget monitors all the fan speeds (7 fans and 2 pumps), all the temperatures (i.e. of all 4 CPU's, logic board, memory controller, HDD, inlet and outlet temps, graphics chip - 11 monitors in all) and CPU voltages and currents.
    All fans are running normally, all temps are normal, everything looks fine!
    I also did an extensive memory test (using Memtest) to make sure that my extra 2GB did not have a problem.
    So...... all I can deduce is that I have a weird error on the hardware test DVD!
    I did also solve the other problem with my FCP rendering. I had been using a non-self-contained NTSC HDV movie in the timeline for my down-conversion/standards conversion to PAL SD standard. I found that if I made the movie self-contained it worked fine. I actually think that I might have had some bum references in the non-self-contained version (it makes use of a whole lot of previous render files) because I had transferred all the info from my old G4 and something was probably missing!!!
    That's how this whole thing started - the file wouldn't render properly - always stopped after about 10 minutes. It is a very big render - it's a 1 hour 20 min HDV video and will take 45 hours to render on the Quad (over 3 days on the dual G4). I suspected bad memory so tried the hardware test, found the fan error .....etc, etc!
    Now I know that everything is good so I can concentrate on my FCP projects.
    Quad G5 Mac OS X (10.4.3) Standard non-upgraded G5 except 2.5G RAM,

  • Problem with Script Alignment for new printer

    Hi All,
       I'm printing SAP checks to LOCAL printer. Currently we are using Dell W5300n to print checks and the printer has a lot of maintenance problems.  Therefore we purchase a new printer Dell 3110cn  and would like to have it set up to print checks.  We would still keep old printer ( Dell W5300n ) for back up.We changed the printer to new as there is some problem with old printer.
    Problem is , if we print a check from using old printer, the check alignment is good.  But if we print a check from  new printer, the check alignment is off.
    I'm using DINA4 Page format.
    Can you please tell me what is the problem here?
    Thanks,
    Subha

    Hi Subhashini Kuntala,
    For your issue there are few things to check ...
    1. We need to find exact Printer (new) drivers which matches exactly the (old)  Printer.
    2. Is your cheque is in A4 size or Customised size.
    3. If it is A4 try to print in Other Printer.
    If these senerio's does't work, as a ABAPer You can't do anything else .. So, best to pass this issue to BASIS.
    That could resolve your Problem.
    Regards,
    sg

  • Problems with concurrency tests using Crystal Reports for VS 2005

    Post Author: condeagustin
    CA Forum: General Feedback
    Hi
    My name is Agustin and Im using Crystal Reports for VS 2005
    and NET 2.0 to generate pdf files. This is the scenario:
    I created a COM+ object in c# and everytime the
    COM+ creates an instance of this object, the following flow is executed:
    it reads an xml file from a database, then it feeds the report with this
    xml file, afterwards it generates a pdf file and finally this pdf file is
    inserted into the database. Both fields (xml and pdf fields) are varbinary in the
    same table in sql server 2005. All the flow from reading the xml to inserting
    the pdf into the database is executed in memory, it never goes to the hard
    disk. In other words both the xml and the pdf file are stored in memory (the
    RAM). That is the only function of that COM+ object and I already have it in a
    production server and it works GREAT!!
    The PROBLEM is the concurrency tests. I made the following tests
    in the same production server:
    1. First I went to the registry and I set the PrintJobLimit to
    100 in HKEY_LOCAL_MACHINESOFTWARECrystal Decisions10.2Report Application
    ServerServer
    2. I shut down the object in the COM+ and I executed 100
    threads all at the same time. Each thread created one instance of the object in
    the COM+ and the 100 pdfs were generated SUCCESFULLY in 5 minutes!!
    3. Then I executed again 100 threads (WITHOUT shutting down the
    object in the com+). 10 pdfs were generated succesfully but the rest were
    never generated and there was no exception because my object was NEVER
    INSTANTIADED in the COM+, I mean, the 90 instances were never created in the
    COM+, so my object was never executed, THAT IS MY PROBLEM!! Do I have to
    modify something in the registry files of crystal reports to fix this? What can
    I do? I have revised the code in that object a LOT OF TIMES and believe me,
    everything is being closed and disposed at the end (the memory streams, the
    ReportClass objects, the connection to the database, even the dataset used to
    store the data of the xml file!
    So to sum up the problem is not with the execution of my object
    (cause once is created the object works great and the pdf is generated
    perfectly!), the problem is with the com+ TRYING to create another instance
    of my object given that test scenario. Help me please, What do you
    suggest?
    The production server has this specifications:
    Operative System: Windows Server 2003 Enterprise Edition with Service Pack 2
    Processor: Dual Core AMD Opteron 2212 2.00GHz
    RAM: 820MB
    Hard drive: It is partitioned in 2 drives --> C
    drive has 20GB and D has 60GB
    Note: Each generated pdf has only one page and if you bring it
    to disk its maximum size is 56KB
    I hope your answer and thank you
    Agustín Conde Martí

    Post Author: John Werner Enoksen
    CA Forum: General Feedback
    Hi, im about to write a simular solution where I will use VS2008/Com+ to be in compliance to an existing solition written in VB6.0, so I was googling to look for bumps. Did you figure this one out?
    Best regards,
    John Werner

  • Problems with the testing of querys in view objects

    I am working whih view object and i like to do one query with parameters for it(all with the wizard).
    The help of wizard no help me, because i write the clause where similar to the clause of the help.
    the error is:
    ORA-00904
    Exception:java.jql.SQLException
    Thank you for the attention.

    Hi Lynn
    Excuse me, i don't well explain my problem.
    I do the query of view object with the wizard of JDeveloper 3.2. i push the 'expert mode' and 'use ? style parameters' selection, and i build the query:
    SELECT EntVariable.COD,
    EntVariable.NOMBRE,
    EntVariable.DESCRIPCION,
    EntVariable.RANGO_INFERIOR,
    EntVariable.RANGO_SUPERIOR,
    FROM VARIABLE EntVariable
    WHERE :1 = EntVariable.NOMBRE
    When i push the button of 'Test' the query appear the error:
    java.sql.SQLException: ORA-00904: nombre de columna no valido
    void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)
    void oracle.jdbc.ttc7.TTIoer.processError()
    void oracle.jdbc.ttc7.Oall7.receive()
    void oracle.jdbc.ttc7.TTC7Protocol.doOall7(byte, byte, int, byte[], oracle.jdbc.dbaccess.DBType[], oracle.jdbc.dbaccess.DBData[], int, oracle.jdbc.dbaccess.DBType[], oracle.jdbc.dbaccess.DBData[], int)
    oracle.jdbc.dbaccess.DBColumn[] oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(oracle.jdbc.dbaccess.DBStatement, byte[], oracle.jdbc.dbaccess.DBDataSet)
    void oracle.jdbc.driver.OracleStatement.doExecuteQuery()
    void oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout()
    int oracle.jdbc.driver.OraclePreparedStatement.executeUpdate()
    java.sql.ResultSet oracle.jdbc.driver.OraclePreparedStatement.executeQuery()
    java.lang.Exception oracle.jbo.dt.ui.view.VOClausePanel.testSQL()
    java.lang.Exception oracle.jbo.dt.ui.view.VOClausePanel.testAction()
    void oracle.jbo.dt.ui.view.VOClausePanel.actionPerformed(java.awt.event.ActionEvent)
    void javax.swing.AbstractButton.fireActionPerformed(java.awt.event.ActionEvent)
    void javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(java.awt.event.ActionEvent)
    void javax.swing.DefaultButtonModel.fireActionPerformed(java.awt.event.ActionEvent)
    void javax.swing.DefaultButtonModel.setPressed(boolean)
    void javax.swing.plaf.basic.BasicButtonListener.mouseReleased(java.awt.event.MouseEvent)
    void java.awt.Component.processMouseEvent(java.awt.event.MouseEvent)
    void java.awt.Component.processEvent(java.awt.AWTEvent)
    void java.awt.Container.processEvent(java.awt.AWTEvent)
    void java.awt.Component.dispatchEventImpl(java.awt.AWTEvent)
    void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
    void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
    void java.awt.LightweightDispatcher.retargetMouseEvent(java.awt.Component, int, java.awt.event.MouseEvent)
    boolean java.awt.LightweightDispatcher.processMouseEvent(java.awt.event.MouseEvent)
    boolean java.awt.LightweightDispatcher.dispatchEvent(java.awt.AWTEvent)
    void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
    void java.awt.Window.dispatchEventImpl(java.awt.AWTEvent)
    void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
    void java.awt.EventQueue.dispatchEvent(java.awt.AWTEvent)
    boolean java.awt.EventDispatchThread.pumpOneEvent()
    void java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
    void java.awt.EventDispatchThread.run()
    so i haven't code because the code not generate it,
    I know that i must to ask to the Oracle service tecnical because the view object i think that is well build it, but now i can't.
    sorry my english.
    If you think a good idea, it is will fantastic, because i need it this 'where' on this view object.
    Thank you for all.

  • Problem with scripts

    Certain sites, most recently The Daily Show, will not load for me. I get a box that says:
    "Warning: unresponsive script
    A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
    Script: resource://gre/modules/ConsoleAPIStorage.jsm:157
    [Continue] [Stop script]"
    Whether I click to continue or stop the script, nothing happens except that the box goes away and then comes up again. If I try to close the tab, it just hangs and then finally shows the box again.
    Finally, Firefox just gets completely hung up, and I have to close it out with the task manager.
    Meanwhile, everything runs fine in Internet Explorer.
    Can anyone please help me solve this problem?
    Thanks,
    Ellen

    Is DOM storage enabled?
    You can check the value of the dom.storage.enabled pref on the about:config page.
    *http://kb.mozillazine.org/about:config
    You can also try to delete the webappsstore.sqlite file in the Firefox Profile Folder to remove all data (cookies) stored in DOM storage.
    You can use this button to go to the Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    You can try to reset Firefox and create a new profile.
    *https://support.mozilla.org/kb/reset-firefox-easily-fix-most-problems

  • Problem with Script logic logs

    Hi Experts,
    I am using BPC 7.5M with SQL Server 2008, I am looking into script logic log but found one very strange statement "(More than 300,000 records. Details are not being logged)", Earlier it was not showing this statement and was showing all the entries to be posted, Is there any setting we need to do for having all the entries in the log file.
    Status log file showing as of now:
    App: HEADCOUNT - Records to be posted are 310875  (calc diff = 0)
    (More than 300,000 records. Details are not being logged)
    Time to validate records: 100.3 sec.
    Post Record Status
    Submit count : 100001
    Accept count : 100001
    Reject count : 0
    Post Record Status
    Submit count : 200002
    Accept count : 200002
    Reject count : 0
    Post Record Status
    Submit count : 300003
    Accept count : 300003
    Reject count : 0
    Post Record Status
    Submit count : 310875
    Accept count : 310875
    Reject count : 0
    Posting ok
    Time to post records:325.4 sec.
    Please Advice
    Thanks & Regards,
    Rohit

    Hi Rohit,
    This is not a problem.
    If the resultant number of records is more than 300,000, then the records are not logged.
    This can be controlled by the UNLIMIT_PRINT_LOG appset parameter. By default, this is set as NO. This will allow only 300k records to be logged.
    You can set the above parameter as YES to log all the records for the execution of all logics across the appset in all applications.
    Warning:
    Of course, it will add slow down the logic execution. Logging the records will always slow down the execution. The system has to open the file and keep writing all the records in the flatfile, which is a slow process. You can increase the speed of your logics by disabling this logging completely by using the CALCULATE_DIFFERENCE statement in your script logic for each commit section. You can reduce the logic execution time by disabling this logging.
    Karthik AJ

  • Problem with Script Task formatting excel

    Hi Experts,
    I am creating a package and using Script task to format one excel dimension file, now the problem is if I execute the package from BIDS designer with static values then the package executes fine with excel file formatted perfectly fine but if I execute same package in BPC via Data manager with values used from variables it gives error on script task message:
    "Description = System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot access the file 'E:\PC_MS\Data\Webfolders\CDNPLAN\AdminApp\Stage\Employee.xls'. There are several possible reasons:
    u2022 The file name or path does not exist.
    u2022 The file is being used by another program.
    u2022 The workbook you are trying to save has the same name as a currently open workbook.
    at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
    at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
    at ScriptTask_2921447fa19c44dfae73d5370828ba94.vbproj.ScriptMain.Main()
    Now to crosscheck I commented the dynamic variables from the code and used same static values with Data manager as they are in BIDS but it didn't help, please find the code below and help me in solving this problem or just give me some clue to come out if this:
    Thanks & Regards,
    Rohit
    Code
    Public Sub Main()
              ' Add your code here
            'Dim FileName As String = Dts.Variables("MYWEBFOLDERS").Value & Dts.Variables("MYAPPSET").Value & "\AdminApp\Stage\" & Dts.Variables("MYDIMNAME").Value & ".xls" This I commented as it was using dynamic variables
            Dim FileName As String = "E:\PC_MS\Data\Webfolders\CDNPLAN\AdminApp\Stage\Employee.xls"
        Dim WB As Object ' Workbook
        Dim WS As Object 'Worksheet
        Dim W As Object 'Window
        Dim XL As Object 'Application
        XL = CreateObject("Excel.Application")
        XL.DisplayAlerts = False
        ' Open the workbook
        WB = XL.Workbooks.Open(FileName)
        ' WB = GetObject(FileName)
        '    XL = WB.Parent
        '    XL.DisplayAlerts = False
        WS = WB.Worksheets(1)
        W = WB.Windows(WB.Name)
        ' Change the name of the worksheet to MEMBERS
        WS.Name = "MEMBERS"
        ' Set up the split and freeze the panes
        W.SplitRow = 1
        W.SplitColumn = 1
        W.Split = True
        W.FreezePanes = True
        ' Make it visible
        W.Visible = True
        ' Replace *ID column header with ID
        Dim Row1 As Object
        Row1 = WS.UsedRange.Rows("1:1")
        Dim I As Integer
        For I = 1 To Row1.Columns.Count
          If Row1.Cells(I, 1).Value = "*ID" Then
            Row1.Cells(I, 1).value = "ID"
            Exit For
          End If
        Next
        ' Paste Values
        WS.UsedRange.NumberFormat = "@"
        WS.UsedRange.Value = WS.UsedRange.Value
        ' Change the font of everything to Arial,9
        With WS.Cells.Font
          .Name = "Arial"
          .Size = 9
        End With
        ' Format the top row to be bold and orange
        With WS.Rows("1:1")
          .Font.Bold = True
          .Interior.ColorIndex = 44 'orange
        End With
        ' Auto-fit all the columns
        WS.Cells.EntireColumn.AutoFit()
        ' Convert to Excel format
        Const xlNormal = -4143
        WB.Parent.DisplayAlerts = False
        WB.SaveAs(FileName:=FileName, FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False)
            ' Close and save changes
            WS = Nothing
            WB.Close()
            W = Nothing
        ' Quit Excel
            XL.Quit()
            XL = Nothing
        Dts.TaskResult = ScriptResults.Success
         End Sub

    Hi,
    If you do not define GLOBAL VARIABLE in your BPC package and BIDS, why don't you try to have it? you should specify the webfolder and file name in advanced script, then you also need to create global variable as text type in BIDS.
    I saw many cases BPC does not pass the dynamic variable to BIDS, therefore I changed the type of variable as the Global variable and it works for me.
    Regards,
    YH Seo

  • Smart Title Case - problem with script

    Having a problem here.
    When multiple paragraphs are selected the start of a paragraph is set to a lowercase
    how can I fix this?
    //DESCRIPTION: Converts selected text to title case smartly
    var ignoreWords = ["a", "an", "and", "the", "to", "with", "in", "on", "as", "of", "or", "at", "into", "that",
             "by", "from", "their", "then", "for", "are", "not","cannot", "be", "is", "which", "can"];
    var intCaps = ["PineRidge","InDesign","NJ","UMC", "FCCLA", "SkillsUSA", "d’Oeuvres", "VAT", "VIES",];
    // or by creating text files named ignoreWords.txt and intCaps.txt in the same folder as the script
    ignoreWords = getIgnoreFile(ignoreWords);
    intCaps = getIntCaps(intCaps);
    try {
        myText = app.selection[0].texts[0].contents;
    } catch(e) {
        exit();
    theWordRanges = myText.split("/");
    for (var i = theWordRanges.length - 1; i >= 0; i--) {
        theWords = theWordRanges[i].toLowerCase().split(" ");
        //First word must have a cap, but might have an internal cap
        myNewText = "";
        for (var j = 0; theWords.length > j; j++) {
            k = isIn(intCaps,theWords[j])
            if (k > -1) {
                myNewText = myNewText + intCaps[k] + " ";
                continue;
            } else {
                if ((isIn(ignoreWords,theWords[j]) > -1) && (j != 0)) {
                    myNewText = myNewText + theWords[j] + " ";
                } else {
                    myNewText = myNewText + InitCap(theWords[j]) + " ";
        theWordRanges[i] = myNewText.substring(0,myNewText.length - 1)
    app.selection[0].texts[0].contents = theWordRanges.join("/");
    // +++++++ Functions Start Here +++++++++++++++++++++++
    function getIgnoreFile(theWords) {
        var myFile = File(File(getScriptPath()).parent.fsName + "/ignoreWords.txt");
        if (!myFile.exists) { return theWords }
        // File exists, so use it instead
        myFile.open("r");
        var importedWords = myFile.read();
        myFile.close();
        return importedWords.split("\n"); // Could filter these, but what's the point?
    function getIntCaps(theWords) {
        var myFile = File(File(getScriptPath()).parent.fsName + "/intCaps.txt");
        if (!myFile.exists) { return theWords }
        // File exists, so use it instead
        myFile.open("r");
        var importedWords = myFile.read();
        myFile.close();
        return importedWords.split("\n"); // Could filter these, but what's the point?
    function getScriptPath() {
        // This function returns the path to the active script, even when running ESTK
        try {
            return app.activeScript;
        } catch(e) {
            return e.fileName;
    function isIn(aList,aWord) {
        for (var i = 0; aList.length > i; i++) {
            if (aList[i].toLowerCase() == aWord) {
                return i;
        return -1;
    function InitCap(aWord) {
        if (aWord.length == 1) {
            return (aWord.toUpperCase());
        return (aWord.substr(0,1).toUpperCase() + aWord.substring(1,aWord.length))

    Hi,
    Looks like it is a 'paragraph mark' problem which can be seen as 1st char in some strings.
    modify these two lines:
         theWordRanges = myText.split("\r");
         app.selection[0].texts[0].contents = theWordRanges.join("\r");
    Jarek

Maybe you are looking for