Invoke-Command and $using:ACL problem

Hi,
Can anyone point me in the right direction.
I want to modify and ACL on a remote server, but i cannot assign a variable inside the invoke-command where i'm also refferencing an local variable.
When the first invoke-command is ran i get an error:
A Using variable cannot be retrieved. A Using variable can be used only with Invoke-Command, Start-Job, or InlineScript
in the script workflow. When it is used with Invoke-Command, the Using variable is valid only
if the script block is invoked on a remote computer.
$DriveFunctionDirectoryStructure="z:\projects\1"
Invoke-Command
-Session$s-ScriptBlock{$acl=get-acl$using:DriveFunctionDirectoryStructure}
Invoke-Command
-Session$s-ScriptBlock{$acl.SetAccessRuleProtection($using:True,$using:ToggleAccessRuleFlag)}
Invoke-Command
-Session$s-ScriptBlock{Start-Sleep-Seconds5}
Invoke-Command
-Session$s-ScriptBlock{$rule=New-ObjectSystem.Security.AccessControl.FileSystemAccessRule("localdomain\$using:groupName","$using:AccessOption","ContainerInherit,
ObjectInherit","None","Allow")}
Invoke-Command
-Session$s-ScriptBlock{$acl.AddAccessRule($rule)}
Invoke-Command
-Session$s-ScriptBlock{Set-Acl$using:DriveFunctionDirectoryStructure$acl}

Hi RFalken,
you can use the -ArgumentList parameter of Invoke-Command like this:
$script = {
Param (
$Parameter1,
$Parameter2
Invoke-Command -ScriptBlock $script -ArgumentList @(2,42)
Cheers,
Fred
There's no place like 127.0.0.1

Similar Messages

  • Invoke-Command and ShellId Issues

    Hi all,
    I'm struggling to figure out what is going on here.
    I'm trying to add a domain user to a VM's local administrators group via this:
    $localAdminBlock = `
    $objUser = [ADSI]("WinNT://domain/domainaccount")
    $objGroup = [ADSI]("WinNT://$vm/Administrators")
    $objGroup.PSBase.Invoke("Add",$objUser.PSBase.Path)
    Invoke-Command -ComputerName $vm -Scriptblock $localAdminBlock -Credential $adminCreds
    I receive an error:
    "Processing data from remote server TestServer failed with the following error message: The request for the Windows Remote Shell with ShellId <id here> failed because the shell was not found on the server.  Possible causes are: the specified
    ShellId is incorrect or the shell no longer exists on the server.  Provide the correct ShellId or create a new shell and retry the operation..."
    Any idea what's going on?
    Thanks.

    You need to use $using:vm instead of $vm since you are passing a value from a local variable into the scriptblock which
    is executed remotely. If you don't do this then the $vm will be $null in the remote session. If you use $using:vm then Invoke-Command will evaluate the local $vm variable and use this value in the remote session.
    $localAdminBlock = `
    $objUser = [ADSI]("WinNT://domain/domainaccount")
    $objGroup = [ADSI]("WinNT://$using:vm/Administrators")
    $objGroup.PSBase.Invoke("Add",$objUser.PSBase.Path)
    Invoke-Command -ComputerName $vm -Scriptblock $localAdminBlock -Credential $adminCreds
    --Neptune
    That was the issue, thanks a lot!

  • File path from find command and using POSIX

    Hi,
    I have a find command in do shell script returning output files of the form ./xyz/abc/.../...
    instead of the full path.
    I am guessing that this is the problem when I use POSIX path of one of those files. Can Applescript understand the "./" or does it need a full Unix path to convert it back?
    In that case, how do I ask find command to return the full path?
    Thanks in advance!

    >I am guessing that this is the problem when I use POSIX path of one of those files. Can Applescript understand the "./" or does it need a full Unix path to convert it back?
    You're right - AppleScript won't be able to use those paths because AppleScript has no idea of the current directory used by the shell.
    The problem is that you're defining '.' a the start point of your search.
    For each matching file find will print this start point in front of the relative path, assuming that you know where you're starting from. So the solution is to provide that path as the search start point rather than .
    For example, if your current script says:
    <pre class=command>cd /some/directory
    find . -name "*.mp3"</pre>
    You could/should rewrite this as:
    <pre class=command>find /some/directory -name "*.mp3"</pre>
    in the second case all matches would include the full path including the /some/directory part.
    If you can't predict what your search directory will be you can write your find like this:
    <pre class=command>find `pwd` -name "*.mp3"</pre>
    which will fill in the current directory (via pwd at the time the search is executed and will output full paths that AppleScript can work with.

  • Crystal report SQL Command and using IN

    Post Author: geozuh
    CA Forum: Crystal Reports
    Does any one know how to get a multiple value prompts to work in Crystal report SQL Commands? I have an extremely large database and do not want to pull back all the records to the report. I know I can do the filtering in the report, but due to the size of the database, I am restricked from doing do.
    I would like to set the State as a multiple value parameter/prompt to be used in the SQL Command.
    Ex.
    Select CustID, FirstName, LastName
    from Customer
    where State in ('WI', 'IL', 'MN') --this would be turned into a parameter

    Post Author: yangster
    CA Forum: Crystal Reports
    you are over thinking the problemsimply create a parameter within crystal for your state and change it to allow multiple valuesthen in the select expert put in state = ?stateif you do show sql query you will see that the values are pushed down to the sql level thus no performance hit vs putting the parameter directly in the command itself

  • Sudo command and root user Problems.

    Hi all,
    I am new to macs but am fairly good with windows computers. In the terminal on my mac if i type in any command with sudo on the front i get a:
    Whats more i also cannot log into the root user of my mac i just get a wrong password error. I know its the right password and i have tried to change it but it doesn't work!
    Please help me!
    Thanks in advance
    Ed

    yes, it was nailed for gutbunny, but this did not nail it for me. situation: new 32 GB USB flash drive that was allowed to go to sleep with mac book pro 15" 2.33 using mac os 10.4.11. it woke up with no permissions to write to owner or admin user or root. did the following:
    GeoG5-2:/Volumes/DiskGO george$ sudo chflags nouchg .
    chflags: .: Read-only file system
    chflags: .: Read-only file system
    GeoG5-2:/Volumes/DiskGO george$ pwd
    /Volumes/DiskGO
    GeoG5-2:/Volumes/DiskGO george$ ls -l
    total 128
    drwxrwxrwx 1 george george 16384 Feb 14 21:43 !DrawingLT
    drwxrwxrwx 1 george george 16384 Feb 14 19:14 !TeachingLT
    drwxrwxrwx 1 george george 16384 Jan 19 08:54 !Words(new)
    drwxrwxrwx 1 george george 16384 Feb 15 08:26 DiskGO stuff
    short answer is that neither admin george nor root can unlock this thumb drive. and i've tried this with lock/unlock in both positions. should i send it back to the mfgr for replacement?
    thanks
    george

  • Cower command and use

    Hi,
    I have been trying out different AUR helpers, and have now downloaded cower.   I was wondering if someone could verify that this is the correct way to use (so that I don't break something )
    For example, if I wanted to download Abiword-light and it's dependencies and then build it?  Would I do the following:
    cower -dd abiword-light
    and then makepkg in each folder that is downloaded?  How would i know in which order to build the various dependencies, etc.  Essentially, I would like to learn how to do the equivalent of yaourt -S abiword-light.  Thank you very much for the help.

    Thank you for your response.  I am fairly new to linux, so what exactly would be the benefit of performing these steps manually versus simply yaourt -S abiword-light? (wouldn't it be a huge hassle for a large file with 15+ dependencies, for example).
    Last edited by Tripsun (2011-02-26 08:04:02)

  • Exporting to blu ray and using episode problem

    I have a 60 min HDV time line of which I would like to export to Blu Ray ready for the future so I can then delete the master files and clear some space of the main hard drive.
    I bought a program by flip 4 mac called Episode Pro which plugs in to compressor and you can use it to export files apparently quicker and better.
    Episode has a drop down box with Blu Ray settings for Video and Audio which I choose. so far so good.
    When I tell it to export and then bring up the batch monitor it tells me that it take 3 or 4 days and the first try took 3 days and then a message failed came up.
    After that I had to reboot because it messed up FCP too
    Am I doing something wrong in episode and if I was to use normal compressor for Blu Ray exporting what settings should I use, I only see HD DVD?
    Thank you in advance,
    Regards
    Darren

    These are settings for compressor that I use.
    I use bootcamp, windows, and DVDitPro HD to burn blu ray disc.
    These settings are what DVDitPro likes ( no re-encoding)
    Name: blu ray video
    Description: No description
    File Extension: m2v
    Estimated file size: 7.91 GB/hour of source
    Type: MPEG-2 video elementary stream
    Usage:Blu-ray
    Video Encoder
    Format: M2V
    Width: 1920
    Height: 1080
    Pixel aspect ratio: Square
    Crop: None
    Padding: None
    Frame rate: 29.97
    Frame Controls: Automatically selected: Off
    Start timecode from source
    Aspect ratio: 16:9
    Field dominance: Automatic
    Average data rate: 18 (Mbps)
    1 Pass VBR enabled
    Maximum data rate: 27 (Mbps)
    High quality
    Best motion estimation
    Closed GOP Size: 1/2 second, Structure: IBBP
    Name: blu ray audio
    Description: No description
    File Extension: ac3
    Estimated file size: 82.4 MB/hour of source
    Audio Encoder
    Format: AC3
    Sample Rate: 48.000kHz
    Channels: 2
    Bits Per Sample: 16
    Target System: Generic
    Data Rate: 192 kbps
    Compression Preset: Film Standard
    Audio Coding Mode: 2/0 (L, R)
    BitStream Mode: Complete Main
    Center Mix Level: -3dB
    Surround Mix Level: -3dB
    Dolby Surround Mode: None
    LFE Exists: No
    Dialog Normalization: -27 dbFS
    Copyright Exists: Yes
    Original Content: Yes
    Audio Production Information Exists: No
    RF Overmodulation Protection: Off
    Channel Bandwidth Lowpass Filter: On
    DC Highpass Filter: On
    LFE Channel Lowpass Filter: On
    3dB Attenuation: Off
    phase 90: On
    Deemphasis: Off

  • Logging Invoke-Command

    Hello,
    I have a problem with logging on multiple servers at the same time. I would like to have a single file with every log formated like this :
    "yyyyMMdd HH:mm:ss - $Env:ComputerName - result of the command"
    To know what computer is doing what, I am currently logging in separate files on each server running the following code :
    $ExecDate = Get-Date -Format yyyy-MM-dd_HH-mm
    $TroncateLocalLogFileName = "C:\Temp\$ExecDate"
    $ScriptBlock= {
    Param ($TroncateLocalLOgFileName)
    Get-Date
    Echo *****************
    Write-Host "Blablabla is running on" $Env:ComputerName ", please wait..."
    Echo "Blablabla is running, please wait..."
    & "C:\Program Files\firstscript.ps1"
    Echo *****************
    Echo "Enabling BLABLABLA for $env:computername..."
    Set-ItemProperty -Path HKLM:\MyRegistryPath -name MyRegistryKey -Value 1
    Echo *****************
    Echo "End of procedure"
    Write-Host "BALBALBLA for" $env:computername "is done"
    Echo *****************
    Get-Date
    } > $TroncateLocalLOgFileName"_$Env:ComputerName.log" 2>&1
    invoke-command -ComputerName $ListOfServers -ArgumentList $TroncateLocalLogFileName -ScriptBlock $ScriptBlockforeach ($Computer in $ListOfServers) {
    robocopy \\$Computer\$LogSource $LogDestination\ $Execdate"_*" /MOV
    Does anyone knows how to add some string to output inside an Invoke-Command to get the required result ?
    I tried everything I could think of without anything getting near...
    Thanks in advance for your help.

    Hi Pierre,
    If you want to export the result to a single log file instead of mutiple log files located on every remote computers, please try to export the log file outside the scriptblock of the the cmdlet "Invoke-Command", and use the cmdlet "Out-File"
    to append every result from remote computers to a single file:
    $ExecDate = Get-Date -Format yyyy-MM-dd_HH-mm
    $TroncateLocalLogFileName = "C:\Temp\$ExecDate"
    $ScriptBlock= {
    Param ($TroncateLocalLOgFileName)
    Get-Date
    Echo *****************
    Write-Host "Blablabla is running on" $Env:ComputerName ", please wait..."
    Echo "Blablabla is running, please wait..."
    & "C:\Program Files\firstscript.ps1"
    Echo *****************
    Echo "Enabling BLABLABLA for $env:computername..."
    Set-ItemProperty -Path HKLM:\MyRegistryPath -name MyRegistryKey -Value 1
    Echo *****************
    Echo "End of procedure"
    Write-Host "BALBALBLA for" $env:computername "is done"
    Echo *****************
    Get-Date
    invoke-command -ComputerName $ListOfServers -ArgumentList $TroncateLocalLogFileName -ScriptBlock $ScriptBlock | out-file $TroncateLocalLOgFileName"_$Env:ComputerName.log" -append
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang

  • Installing SQL Server 2012 remotely via Powershell using Invoke-Command

    I am trying to perform a SQL Server 2012 command line installation using Powershell Invoke-Command on Windows 2012 Datacenter.
    The code I am using is as follows:
     $ret = Invoke-Command -ComputerName $COMPUTER -ArgumentList $MEDIA,$ACTION,$FEATURES,$INSTALLDIR,$INSTANCEID,$INSTANCENAME,$SQLDATADRIVE,$SQLLOGDRIVE,$DOMAIN,$SQLSERVERSERVICEUSER,$SQLSERVICEPASSWORD,$PRODUCTKEY,$SQLSERVERSA,$username,$ADMINPASSWD
    -Credential $cred -ScriptBlock {
      param($MEDIA,
         $ACTION,
         $FEATURES,
         $INSTALLDIR,
         $INSTANCEID,
         $INSTANCENAME,
         $SQLDATADRIVE,
         $SQLLOGDRIVE,
         $DOMAIN,
         $SQLSERVERSERVICEUSER,
         $SQLSERVICEPASSWORD,
         $PRODUCTKEY,
         $SQLSERVERSA,
         $USERNAME,
         $PASSWD)
      Set-Location $MEDIA
      Import-Module ServerManager
      if (-not [IO.Directory]::Exists($MEDIA)){
       $hn = hostname
       return 0,"Failed to find SQL Server Installer at $MEDIA on $hn"
      $tran = ""
      Try{
       & $MEDIA\setup.exe /ACTION=$ACTION /Q /FEATURES=$FEATURES /IACCEPTSQLSERVERLICENSETERMS /UPDATEENABLED=False /INSTALLSHAREDDIR="$INSTALLDIR\Program Files\Microsoft SQL Server" /INSTALLSHAREDWOWDIR="$INSTALLDIR\Program Files
    (x86)\Microsoft SQL Server" /RSINSTALLMODE="FilesOnlyMode" /INSTANCEID="$INSTANCEID" /INSTANCENAME="$INSTANCENAME" /INSTANCEDIR="$INSTALLDIR\Program Files\Microsoft SQL Server" /ENU="True" /AGTSVCSTARTUPTYPE="Automatic"
    /SQLSVCSTARTUPTYPE="Automatic" /NPENABLED=1 /TCPENABLED=1 /RSSVCStartupType="Automatic" /ERRORREPORTING=0 /SQMREPORTING=0 /INDICATEPROGRESS /INSTALLSQLDATADIR="$SQLDATADRIVE\DATA" /SQLUSERDBDIR="$SQLDATADRIVE\DATA" /SQLUSERDBLOGDIR="$SQLLOGDRIVE\LOG"
    /ASDATADIR="$SQLDATADRIVE\OLAP\DATA" /ASLOGDIR="$SQLLOGDRIVE\OLAP\Log" \ASBACKUPDIR="$SQLDATADRIVE\OLAP\Backup" \ASTEMPDIR="$SQLDATADRIVE\OLAP\Temp" /ASCONFIGDIR="$SQLDATADRIVE\OLAP\Config" /ASCOLLATION="Latin1_General_CI_AS"
    /SQLCOLLATION="SQL_Latin1_General_CP1_CS_AS" /SQLSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /SQLSVCPASSWORD="$SQLSERVICEPASSWORD" /AGTSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /AGTSVCPASSWORD="$SQLSERVICEPASSWORD"
    /ASSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /ASSVCPASSWORD="$SQLSERVICEPASSWORD" /RSSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /RSSVCPASSWORD="$SQLSERVICEPASSWORD" /FTSVCACCOUNT="NT AUTHORITY\LOCAL SERVICE"
    /INDICATEPROGRESS > $out
      } Catch [System.Exception] {
       return 0,$_.Exception.ToString()
      if ($tran -ne ""){
       $out += $tran
      return 1,$out
    The media resides on the server that I am remoting to in powershell and the server is on the same domain. The credentials I pass are for a Domain Admin, but SQL Server fails to validate the credentials for the passed parameter for the sql service user with
    a Access Denied.
    If I run the same command with the same user directly on the server it works fine.
    My guess is that the elavated privs for Administrator are not being set when using Invoke-Command? Is there a way to utilize powershell to install SQL Server 2012 with command line option using the invoke-command and passing credentials? Or is this a limitation
    to the SQL Server installer. If there is can a example be provided?

    Ok, so with the help of some friends, we found a fix that works!
    Prior to running the Invoke-Command I now run:
    # enable CredSSP on a client computer; this command allows the client credentials to be delegated to the server01 computer.:
    Enable-WsManCredSSP -Role Client -DelefateComputer server.some.domain.com
    Then I add the -Authentication option to my Invoke-Command with option Credssp.
    The install the works fine. Hope this helpes all.

  • Is there a way to make invoke-command interactive?

    Hello,
    I have a script that runs an invoke-command with multiple arguments and performs operation on a remote workstation.
    I want to add some additional confirmations and dialogue choices depending on how the script block executes on the remove PC.
    Is there a way to do that?

    I'm afraid it's not possible in my scenario.
    I'm using invoke-command with Credssp authentication because I need to execute a number of commandlets that are only installed on a specific remote server. Those powershell commandlets from Microsoft do not work if installed on the client.
    Those commandlets use network share resources too, that's why Credssp is used.
    During the execution of invoke-command I wanted to make an additional confirmation for overwriting of some resources.
    The other option is to run several invoke-commands and get output from the queries, construct the dialogue options based on those queries and  gather input locally and then run the final execute invoke-command last, but it seems just like too much of
    hassle for now, so i'll leave things as they are.

  • Is it possible to pass a multi line PowerShell code block to the Invoke-Command ScriptBlock option?

    Hello,
    In my code I am trying to start a windows service on an Azure VM via Azure Automation.  My code fragment is:
    $vm = Get-AzureVM -Name $VMName -ServiceName $VMServiceName
    $uri = Get-AzureWinRMUri -ServiceName $vm.ServiceName -Name $vm.Name
    # Run a command on the Azure VM
    $PSCommandResult = InlineScript {
    $options = New-PSSessionOption -SkipCACheck
    $output = Invoke-Command -ConnectionUri $Using:uri `
    -Credential $Using:Credential `
    -SessionOption $options `
    -ScriptBlock { stop-service -DisplayName <ServiceName> -Force }
    My issue is: Is it possible to pass in a multiple line PS block as the ScriptBlock option?
    After looking around online, there appeared to be two options:
    $psblock = {
    line1
    line2
    line3
    Or
    $PSCommand = @"
    Line1
    Line2
    Line3
    But I have not been able to get either of these to work. (I was trying to end up with something like below)
    $output = Invoke-Command -ConnectionUri $Using:uri `
    -Credential $Using:Credential `
    -SessionOption $options `
    -ScriptBlock { $psCommand }
    Can someone offer a suggestion? Putting a few lines of PS code directly into the ScriptBlock parameter does work but it looks ugly!
    Thanks!

    Thanks for getting back to me!
    I have tried as you suggested but when I attempt to publish the runbook I get this error:
    Runbook definition is invalid. Cannot store the results of this type of expression into a variable. Only the results of commands, pipelines, constant expressions, foreach statements, parallel and sequence statements can be stored in variables.
     However if I just cut and paste the same code inside the ScriptBlock { CODE HERE } it works.
    Perhaps I am breaking the rule as listed above in bold? Would variable declarations in the code block not be allowed?

  • Could not complete the command because of a problem using the Adobe Color Engine

    Hi all
    This bizarrely started this morning - completely out of the blue - and I've no idea why.
    Setup: Mac 10.8.2 / Creative Suite Premium PhotoShop CS5 extended (patched to 12.04)
    Am working on images exported from LightRoom 4 (16bit A3 Pro Photo RGB PSDs) in PhotoShop CS5.
    As part of my image grading process I have a PhotoShop Action that does the following: copy layer to new document (document respects all of copied layer settings) > Image > Adjustments > HDR toning > apply a certain HDR preset > copy to resultant image back to original doc > set opacity as 40%.
    Totally out of the blue, after having this action for about 2 months, this morning I start getting a warning dialog of "Could not complete the command because of a problem using the Adobe Color Engine" and the action fails. The failure seems to take place at the 'make document' part of the action and seems to somehow be related to the contents of the clipboard.
    I've tried trashing and re-creating the action. It works first time out fine and then - on the next image - errors again.
    At present I can only safely carry out the work 'manually' by completing all the actions myself.
    I can think of no settings that have changed and the OS hasn't been updated in a while.
    I have found one other thread on a similar problem in PhotoShop Elements, but no definitive solution.
    Any help appreciated as I have a shedload of stuff to process.
    Best wishes
    TP

    OK: trash of prefs didn't work. Tried thrice. Re-created orig action. same problem.
    BUT!
    Your 'Image > Duplicate' suggestion does seem to work. If I use that in a new action as the method for creating the HDR version doc (instead of 'Select > Copy > New > Paste), it seems to work.
    Will try that out this afternoon, but for now: WIN!
    Many thanks for the suggestion!
    TP

  • Problem with OCI call  and  how to install and use 'DEBUG_EXTPROC' on Linux

    Hi,
    Can any one let me know how I can install and use this debug_extproc package. I have installed oracle XE server on Linux machine(32-bit).
    When I use : DEBUG_EXTPROC.STARTUP_EXTPROC_AGENT' ... i get an error saying that : it is not declared.
    I tried looking in all the directories but did not find the dbgextp.sql(which is required in order to install that package).And tried searching on google but could not get any relevant information.
    Also I am newbie to OCI call interface and also to C programming too: I have coded a external procedure or custom user aggregate in C. But since I was using C++ : 'set' STL. I have compiled my program using g++ instead of gcc and I have correspondingly modified the make file in public/demo directory.
    So, is it fine to do it that way: using OCI (instead of OCCI(C++)) but again compiling the pgm as a regular C++ using g++ instead of gcc.(But rest of the pgm including printf statements : everything is in C).
    Also I have created the library from my : custagg.so library:
    SQL> create or replace library custagg is '$ORACLE_HOME/lib/custagg.so'
    But my aggregate function implemented as external C function using OCI is either not recognised or else : if recognized then there is some error because of which i am getting the following errors : ORA-06522
    SQL> select MinDistance(TT) from egg1;
    select MinDistance(TT) from egg1
    ERROR at line 1:
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/custagg.so:
    cannot dynamically load executable
    Please kindly answers my queries and trying to resolve this for almost 4 days now and could not find any clue on how to get this done.
    Thanks,
    -NN

    #/bin/make
    # Make file for OCI,OCCI and ODBC demos
    # Usage :
    # For compiling & linking the cdemo81.c file
    # make -f demo_xe.mk buildoci CDEMOEXE=cdemo81 CDEMOOBJS=cdemo81.o
    .SUFFIXES: .o .c .cpp
    ICINCHOME=$(ORACLE_HOME)/rdbms/public/
    ICLIBHOME=$(ORACLE_HOME)/lib
    ICLIBPATH=-L$(ICLIBHOME)
    THREADLIBS=-lthread
    CCLIB=$(ICLIBPATH) -lclntsh $(THREADLIBS)
    OCCILIB=$(ICLIBPATH) -locci -lclntsh $(THREADLIBS)
    CCINCLUDES = -I$(ICINCHOME)
    CCFLAGS=$(CCINCLUDES) -D_REENTRANT -g -xs
    LDFLAGS=
    SO_EXT=.so
    EXTLDFLAGS=$(LDFLAGS) -shared
    REMOVE=rm -rf
    MKLINK=ln
    MAKE=make
    MAKEFILE=demo_xe.mk
    CDEMOEXE=custagg.so
    CDEMOOBJS=custagg.o
    OCCIDEMO=occidml
    OCCIOBJDEMO=occiobj
    OTT=$(ORACLE_HOME)/bin/ott
    OCCIOTTUSR=hr
    OCCIOTTPWD=hr
    ODBCDEMOEXE=odbcdemo
    ODBCDEMOOBJS=odbcdemo.o
    AQDEMOEXE=ociaqdemo00
    AQDEMOOBJS=ociaqdemo00.o
    EXTDEMO=extdemo2.so
    CC=/usr/bin/g++
    echo "LIBCLNT value is :" $(LIBCLNT)
    echo "CC value is :" $(CC)
    .c.o:
    g++ -c -I$(ICINCHOME) $(CCFLAGS) $<
    all: clean buildoci
    echo "LIBCLNT value is :" $(LIBCLNT)
    buildoci: $(LIBCLNT) $(CDEMOOBJS)
    g++ -o $(CDEMOEXE) $(LDFLAGS) $(CDEMOOBJS) $(CCLIB)
    echo "CC value is :" $(CC)
    echo "LIBCLNT value is :" $(LIBCLNT)
    clean:
    $(REMOVE) $(CDEMOOBJS) $(CDEMOEXE)
    # This port-specific file is currently empty on Solaris. Product
    # lines may use this file to override compiler definitions and
    # flags used in occi.mk.
    # Linux compiler definitions
    CC=/usr/bin/gcc
    cc=/usr/bin/gcc
    CCFLAGS=$(CCINCLUDES) -DLINUX -D_GNU_SOURCE -D_REENTRANT -g
    LDFLAGS=-g
    # This macro CCINCLUDES has to be redefined on Linux because of
    # the existence of the 'new' directory in t_work. The name new
    # clashes with a system header file.
    CCINCLUDES = -idirafter .
    THREADLIBS=-lpthread
    ifdef BUILD_CCC296
    CC=/usr/bin/g++296
    endif
    And I am executing the make file using the command :
    make -f demo12.mk buildoci CDEMOEXE=custagg.so CDEMOOBJS=custagg.o
    I am not getting any error while running this make file.
    Can you please tell me whether PLSQL/Oracle is able to locate the file or not. Incase, if it is locating the file but due to some error in the custagg.so it is throwing that error. If this is the case, is there any way that i can debug the C program .....how can i install the debug_extproc package.. I am really new to C & OCI ... if the custagg.so is being located then there might be some problem with the way I am dynamically allocating memory to some variables.
    Please kindly reply to this Post/response.
    Please let me know if you also want to see my program code.
    Thanks & Regards,
    -NN

  • I am having mac book air 2012model i had installed mavericks and use it, i long press command and power button at a same time and i saw the command prompt, from that i had formated the total hard disk. how to i want to install the OS again ?

    I am having mac book air 2012model i had installed mavericks and use it, i long press command and power button at a same time and i saw the command prompt, from that i had formated the total hard disk. how to i want to install the OS again ?
    i tryed with download mavericks but finally its saying a error message like cant conect to istore like that its saying and every thing is clear like internet and other stuf i tryed with 3times no progress same error pls help.. i bought this lap for my bro with his apple id only we use it now he got a new mac book pro so he gave to me so i formated and use it i use my apple id is that problem come because of changing apple id ? pls eplain

    Firstly, what is the source of the 10.6.4 disc? Is it the original installation disc for your MacBook, or one 'borrowed' from another computer?
    It isn't the retail version, because that's 10.6.3.
    Assuming it's the correct disc (i.e. the one that shipped with your Mac), you need to boot from it again.
    OK the language page.
    From the installer screen, ignore the continue button, go to the menu bar and choose Disk Utility from the Utilities menu.
    In DU, select your internal drive in the sidebar (the top item with the makers name and serial no.).
    Run Repair Disk. If that comes up as disk OK, click the partition tab. Select the partiton from the drop-down above the graphic; 1 partiton is all you need.
    Go to the options button and ensure that the partition scheme is GUID and the file system to Mac OS Extended (Journalled). Name the partiton (usually Macintosh HD), click Apply.
    When the Macintosh HD volume appears below the drive name, quit DU and see if you can then install.
    If the screen after the language screen doesn't show the menu bar, it may be necessary to use another Mac to do the job with the MB in Firewire Target Disc Mode. If it won't boot in TDM, or the MB doesn't have FireWire then it's getting very difficult.

  • ACL problem in 6 and 5.1 sp9? Bug?!

    Hi all gurus:
    I got this problem for several days, and still cannot solve it. Can
    anyone help me?
    My design is to put all my beans and connection pool under one "kbf"
    acl. And "guest" servlet/jsp accesses these beans by using this "kbf"
    account. And it works in 5.1 sp8.
    Then i tried to use sp9. The very first time when jsp is compiling
    by WLS, all the jsps work correctly! After that, immediately click the
    link again, it throws jndi exception. Saying "guest" no permission to
    access "kbf" jndi. But my "guest" actually is a servlet/jsp running
    inside the server.
    So then we tried to use 6 sp2, to see whether we can solve the
    problem. And the funny things come out as follows.
    I just click my URL link in browser, first time everything is fine,
    my data is shown correctly. second time it throws ACL exception ,saying
    guest no right to look up my JDBC pool. Click again, the data comes out
    again. Clieck again throws same exception. It is a "toggle".
    And, for another jsp page/link, (it gets data from two tables),
    first time both two tables data are shown. Click some other link, then
    come back to click this link, only one table data is shown, then click
    this link again, both are shown. It is also a "toggle", slightly
    different.
    Something really funny going on for this ACL!
    Can anyone in BEA tell me more about this ACL issue? Why always
    nobody cares to answer these ACL questions? Both in ejb group and
    security group?
    Or simply nobody is using ACL in their project?
    Or i missed out something important? or i am abusing ACL?
    Or is it a bug?
    Since we are going to production very soon, i need the solution
    ASAP. Right now i only have two solutions:
    1. stick to 5.1 sp8.
    2. grant "guest" permission to all my beans, connection pool, which
    means no use for the ACL at all.
    Hope someone at least give me an hint. And sorry for the crossing
    post.
    Thanks.
    minjiang

    Thanks a lot!
    The problem is that i cached the ejb homes and connection pool. So now i use
    your first solution, create context everytime, although the performance may be
    slow down.
    But strange, it works in 5.1 sp6-8.
    Thanks again, Dimitri!
    minjiang
    Dimitri Rakitine wrote:
    The security context is associated with thread so, for example:
    in a servlet, you create InitialContext as "user" and save it.
    Next request which will be "guest" anyway.
    So, if you want authentication, you can either
    - create InitialContext everytime
    - use j2ee security so container will do this automatically:
    http://e-docs.bea.com/wls/docs61/webapp/security.html
    Dimitri
    On Fri, 13 Jul 2001, minjiang wrote:
    Hi Dimitri:
    Sorry to mail you directly.
    I have this question for quite some time. And not receive any
    response for my posting, cross posting.
    Do you have any idea why my deployment works on 5.1 sp8, but not on
    sp9 and 6 sp2?
    I noticed bea changed the weblogic.ejb.interal.StatefulEJBObejct,
    and StatefulEJBCache in sp9, and this is part of why my application
    cannot work. (for one facade session bean looking up other beans in
    another acl)
    Another part is i described in the forward posting, for my "guest"
    jsp/servelt cannot access other acl?
    For my understanding, since my facade bean and jsp/servlet only run
    inside the WLS server, so as long as the correct credential is supplied
    while constructing the jndi context, they should be allowed, right? It
    shoud not be only one credential in one thread, which seems WLS is doing
    now.
    Thanks for help, and any hint or document is appreciated.
    minjiang

Maybe you are looking for

  • If I restore using Time Machine, will I restore permissions also?

    Here is the deal. We have a MacPro and I would like to use Time Machine to backup the computer, then wipe the hard drive and the restore only the software and media. What we DO NOT WANT is for any of the problems (like the permissions that are messed

  • Frame 8 crashes when showing all conditional text

    When I try to Show ALL conditions in my Frame 8 file, Frame crashes. I just recently installed CS4 on my system, but other than that, nothing has changed. I have had no problems with conditional text and this file before. Wondering if anyone has had

  • Variable (optional) and exclude value(#) for single characteristic

    Hi, In the reporting i want to apply variable and also fixed value restriction for one characteristic. Example: I want to apply variable(single and optional) for plant  and also restrict not assigned values(#) I created variable (given single and opt

  • Help for PowerPoint 2007 crash when running embedded SWF file with latest Flash Player?

    I have developed in Xcelsius 2008 SP4 a dashboard with only Excel as the source. I output to PowerPoint and then save it as a PowerPoint 2003 PPS file. On more than a few machines that have PowerPoint 2007, PowerPoint crashes when I attempt to run th

  • Why is My iphone 4s Locked?

    Hi Can anyone help with this please. I bought my iphone 4s outright, brand new, 2 years ago from the Apple Store, not as part of a contract. I've been on a Sim only contract from "3" network from the outset. I now want to change my network provider,