Directory Objects exists twice after converting a NON-CDB to a PDB

After converting a NON-CDB to a PDB (originally Oracle 11g Database) I've encountered that the default directory objects like ORACLE_OCM_CONFIG_DIR exists twice. One with ORIGIN_CON_ID 1 and one with ORIGIN_CON_ID 3. That's not a real issue here except for the DATA_PUMP_DIR. The same directory name is used for two different Directory path (a new one with the path of the CDB and an old one with the path of the origin NON-CDB). With some tests I found that the "old" one is going to be used within the PDB but I don't know how to clean up the structure. Within the CDB$ROOT I can only drop the new directory and in the pdb I get the error message "ORA-65040: operation not allowed from within a pluggable database"
Any idea?

After converting a NON-CDB to a PDB (originally Oracle 11g Database) I've encountered that the default directory objects like ORACLE_OCM_CONFIG_DIR exists twice. One with ORIGIN_CON_ID 1 and one with ORIGIN_CON_ID 3. That's not a real issue here except for the DATA_PUMP_DIR. The same directory name is used for two different Directory path (a new one with the path of the CDB and an old one with the path of the origin NON-CDB). With some tests I found that the "old" one is going to be used within the PDB but I don't know how to clean up the structure. Within the CDB$ROOT I can only drop the new directory and in the pdb I get the error message "ORA-65040: operation not allowed from within a pluggable database"
Any idea?

Similar Messages

  • [Forum FAQ] Using PowerShell to assign permissions on Active Directory objects

    As we all know, the
    ActiveDirectoryAccessRule class is used to represent an access control entry (ACE) in the discretionary access control list (DACL) of an Active Directory Domain Services object.
    To set the permissions on Active Directory objects, the relevant classes and their enumerations are listed as below:
    System.DirectoryServices.ActiveDirectoryAccessRule class:
    http://msdn.microsoft.com/en-us/library/system.directoryservices.activedirectoryaccessrule(v=vs.110).aspx
    System.DirectoryServices.ActiveDirectoryRights
    class:
    http://msdn.microsoft.com/en-us/library/system.directoryservices.activedirectoryrights(v=vs.110).aspx
    System.Security.AccessControl.AccessControlType class:
    http://msdn.microsoft.com/en-us/library/w4ds5h86(v=vs.110).aspx
    System.DirectoryServices.ActiveDirectorySecurityInheritance class:
    http://msdn.microsoft.com/en-us/library/system.directoryservices.activedirectorysecurityinheritance(v=vs.110).aspx
    In this article, we introduce three ways to get and set the ACE on an Active Directory object. In general,
    we use Active Directory Service Interfaces (ADSI) or
    Active Directory module cmdlets
    with the Get-Acl and Set-Acl cmdlets to assign simple permissions on Active Directory objects. In addition, we can use the extended rights and GUID settings to execute
    more complex permission settings.
    Method 1: Using ADSI
      1. Get current permissions of an organization unit (OU)
    We can use the PowerShell script below to get current permissions of an organization unit and you just need to define the name of the OU.
    $Name = "OU=xxx,DC=com"
    $ADObject = [ADSI]"LDAP://$Name"
    $aclObject = $ADObject.psbase.ObjectSecurity
    $aclList = $aclObject.GetAccessRules($true,$true,[System.Security.Principal.SecurityIdentifier])
    $output=@()
    foreach($acl in $aclList)
    $objSID = New-Object System.Security.Principal.SecurityIdentifier($acl.IdentityReference)
         $info = @{
    'ActiveDirectoryRights' = $acl.ActiveDirectoryRights;
    'InheritanceType' = $acl.InheritanceType;
    'ObjectType' = $acl.ObjectType;
    'InheritedObjectType' = $acl.InheritedObjectType;
    'ObjectFlags' = $acl.ObjectFlags;
    'AccessControlType' = $acl.AccessControlType;
    'IdentityReference' = $acl.IdentityReference;
    'NTAccount' = $objSID.Translate( [System.Security.Principal.NTAccount] );
    'IsInherited' = $acl.IsInherited;
    'InheritanceFlags' = $acl.InheritanceFlags;
    'PropagationFlags' = $acl.PropagationFlags;
    $obj = New-Object -TypeName PSObject -Property $info
    $output+=$obj}
    $output
    In the figure below, you can see the results of running the script above:
    Figure 1.
    2. Assign a computer object with Full Control permission on an OU
    We can use the script below to delegate Full Control permission to the computer objects within an OU:
    $SysManObj = [ADSI]("LDAP://OU=test….,DC=com") #get the OU object
    $computer = get-adcomputer "COMPUTERNAME" #get the computer object which will be assigned with Full Control permission within an OU
    $sid = [System.Security.Principal.SecurityIdentifier] $computer.SID
    $identity = [System.Security.Principal.IdentityReference] $SID
    $adRights = [System.DirectoryServices.ActiveDirectoryRights] "GenericAll"
    $type = [System.Security.AccessControl.AccessControlType] "Allow"
    $inheritanceType = [System.DirectoryServices.ActiveDirectorySecurityInheritance] "All"
    $ACE = New-Object System.DirectoryServices.ActiveDirectoryAccessRule $identity,$adRights,$type,$inheritanceType #set permission
    $SysManObj.psbase.ObjectSecurity.AddAccessRule($ACE)
    $SysManObj.psbase.commitchanges()
    After running the script above, you can check the computer object in Active Directory Users and Computers (ADUC) and it is under the Security tab in OU Properties.
    Method 2: Using Active Directory module with the Get-Acl and Set-Acl cmdlets
    You can use the script below to get and assign Full Control permission to a computer object on an OU:
    $acl = get-acl "ad:OU=xxx,DC=com"
    $acl.access #to get access right of the OU
    $computer = get-adcomputer "COMPUTERNAME"
    $sid = [System.Security.Principal.SecurityIdentifier] $computer.SID
    # Create a new access control entry to allow access to the OU
    $identity = [System.Security.Principal.IdentityReference] $SID
    $adRights = [System.DirectoryServices.ActiveDirectoryRights] "GenericAll"
    $type = [System.Security.AccessControl.AccessControlType] "Allow"
    $inheritanceType = [System.DirectoryServices.ActiveDirectorySecurityInheritance] "All"
    $ACE = New-Object System.DirectoryServices.ActiveDirectoryAccessRule $identity,$adRights,$type,$inheritanceType
    # Add the ACE to the ACL, then set the ACL to save the changes
    $acl.AddAccessRule($ace)
    Set-acl -aclobject $acl "ad:OU=xxx,DC=com"
    Method 3: Using GUID setting
    The scripts above can only help us to complete simple tasks, however, we may want to execute more complex permission settings. In this scenario, we can use GUID settings to achieve
    that.
    The specific ACEs allow an administrator to delegate Active Directory specific rights (i.e. extended rights) or read/write access to a property set (i.e. a named collection of attributes) by
    setting ObjectType field in an object specific ACE to the
    rightsGuid of the extended right or property set. The delegation can also be created to target child objects of a specific class by setting the
    InheritedObjectType field to the schemaIDGuid of the class.
    We choose to use this pattern: ActiveDirectoryAccessRule(IdentityReference, ActiveDirectoryRights, AccessControlType, Guid, ActiveDirectorySecurityInheritance, Guid)
    You can use the script below to
    assign the group object with the permission to change user password on all user objects within an OU.
    $acl = get-acl "ad:OU=xxx,DC=com"
    $group = Get-ADgroup xxx
    $sid = new-object System.Security.Principal.SecurityIdentifier $group.SID
    # The following object specific ACE is to grant Group permission to change user password on all user objects under OU
    $objectguid = new-object Guid 
    00299570-246d-11d0-a768-00aa006e0529 # is the rightsGuid for the extended right User-Force-Change-Password (“Reset Password”) 
    class
    $inheritedobjectguid = new-object Guid 
    bf967aba-0de6-11d0-a285-00aa003049e2 # is the schemaIDGuid for the user
    $identity = [System.Security.Principal.IdentityReference] $SID
    $adRights = [System.DirectoryServices.ActiveDirectoryRights] "ExtendedRight"
    $type = [System.Security.AccessControl.AccessControlType]
    "Allow"
    $inheritanceType = [System.DirectoryServices.ActiveDirectorySecurityInheritance] "Descendents"
    $ace = new-object System.DirectoryServices.ActiveDirectoryAccessRule $identity,$adRights,$type,$objectGuid,$inheritanceType,$inheritedobjectguid
    $acl.AddAccessRule($ace)
    Set-acl -aclobject $acl "ad:OU=xxx,DC=com"
    The figure below shows the result of running the script above:
    Figure 2.
    In addition, if you want to assign other permissions, you can change the GUID values in the script above. The common GUID values are listed as below:
    $guidChangePassword     
    = new-object Guid ab721a53-1e2f-11d0-9819-00aa0040529b
    $guidLockoutTime        
    = new-object Guid 28630ebf-41d5-11d1-a9c1-0000f80367c1
    $guidPwdLastSet         
    = new-object Guid bf967a0a-0de6-11d0-a285-00aa003049e2
    $guidComputerObject     
    = new-object Guid bf967a86-0de6-11d0-a285-00aa003049e2
    $guidUserObject         
    = new-object Guid bf967aba-0de6-11d0-a285-00aa003049e2
    $guidLinkGroupPolicy    
    = new-object Guid f30e3bbe-9ff0-11d1-b603-0000f80367c1
    $guidGroupPolicyOptions 
    = new-object Guid f30e3bbf-9ff0-11d1-b603-0000f80367c1
    $guidResetPassword      
    = new-object Guid 00299570-246d-11d0-a768-00aa006e0529
    $guidGroupObject        
    = new-object Guid BF967A9C-0DE6-11D0-A285-00AA003049E2                                          
    $guidContactObject      
    = new-object Guid 5CB41ED0-0E4C-11D0-A286-00AA003049E2
    $guidOUObject           
    = new-object Guid BF967AA5-0DE6-11D0-A285-00AA003049E2
    $guidPrinterObject      
    = new-object Guid BF967AA8-0DE6-11D0-A285-00AA003049E2
    $guidWriteMembers   
        = new-object Guid bf9679c0-0de6-11d0-a285-00aa003049e2
    $guidNull               
    = new-object Guid 00000000-0000-0000-0000-000000000000
    $guidPublicInformation  
    = new-object Guid e48d0154-bcf8-11d1-8702-00c04fb96050
    $guidGeneralInformation 
    = new-object Guid 59ba2f42-79a2-11d0-9020-00c04fc2d3cf
    $guidPersonalInformation = new-object Guid 77B5B886-944A-11d1-AEBD-0000F80367C1
    $guidGroupMembership    
    = new-object Guid bc0ac240-79a9-11d0-9020-00c04fc2d4cf
    More information:
    Add Object Specific ACEs using Active Directory Powershell
    http://blogs.msdn.com/b/adpowershell/archive/2009/10/13/add-object-specific-aces-using-active-directory-powershell.aspx
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    The ActiveDirectoryAccessRule has more than one constructor, but yes, you've interpreted the one that takes six arguments correctly.
    Those GUIDs are different (check just before the first dash). Creating that ACE will create an empty GUID for InheritedObjectType, though, because you're telling it to apply to the Object only ([System.DirectoryServices.ActiveDirectorySecurityInheritance]::None).
    Since the ACE will only apply to the object, there's no need to worry about what types of objects will inherit it.
    If you've got time, check out
    this module. It will let you view the security descriptors in a much friendlier format. Try both version 3.0 and the version 4.0 preview:
    Sample version 3.0:
    # This is going to be kind of slow, and it will take a few seconds the first time
    # you run it because it has to build the list of GUID <--> Property/Class/etc objects
    Get-ADGroup GroupY |
    Get-AccessControlEntry -ObjectAceType member -InheritedObjectAceType group -ActiveDirectoryRights WriteProperty
    # Same as the previous command, except limit it to access granted to GroupX
    Get-ADGroup GroupY |
    Get-AccessControlEntry -ObjectAceType member -InheritedObjectAceType group -ActiveDirectoryRights WriteProperty -Principal GroupX
    Here's version 4.0. It's way faster than 3.0, but it's missing the -ObjectAceType and -InheritedObjectAceType parameters on Get-AccessControlEntry (don't worry, when they come back they'll be better than in 3.0):
    Get-ADGroup GroupY |
    Get-AccessControlEntry
    Get-ADGroup GroupY |
    Get-AccessControlEntry -ActiveDirectoryRights WriteProperty
    Get-ADGroup GroupY |
    Get-AccessControlEntry -ActiveDirectoryRights WriteProperty -Principal GroupX
    # You can do a Where-Object filter until the parameters are added back to Get-AccessControlEntry:
    Get-ADGroup GroupY |
    Get-AccessControlEntry -ActiveDirectoryRights WriteProperty |
    where { $_.AccessMask -match "All Prop|member Prop" }
    Get-ADGroup GroupY |
    Get-AccessControlEntry -ActiveDirectoryRights WriteProperty |
    where { $_.ObjectAceType -in ($null, [guid]::Empty, "bf9679c0-0de6-11d0-a285-00aa003049e2") }
    Get-ADGroup GroupY |
    Get-AccessControlEntry -ActiveDirectoryRights WriteProperty |
    where { $_.AccessMask -match "All Prop|member Prop" -and $_.AppliesTo -match "group"}
    That's just for viewing. Version 3.0 can add and remove access, or you can use New-AccessControlEntry to replace your call to New-Object, and you can still use Get-Acl and Set-Acl. The benefit to New-AccessControlEntry is that you can do something like this:
    New-AccessControlEntry -Principal GroupX -ActiveDirectoryRights WriteProperty -ObjectAceType member -InheritedObjectAceType group #-AppliesTo Object
     

  • File (Directory) object problem?

    Hi there. My problem is as follows. The method below is supposed to access an pre-existing directory with five previously saved test files, read in those files as account objects, add the objects to an ArrayList, then return the ArrayList. It seems to be able to create a file object representing the directory alright but it then insists that there are no files in the directory! Have I fouled up or is there some subtlety that I'm unware of? I was wondering if the fact that the account files have a .bac extenstion had something to do with it.
    Here's the method, with the two lines of code where I think the problem might lie in bold print:
    public ArrayList retrieveAccounts()throws IOException{
    ArrayList accounts = new ArrayList();
    File accDir = new File("C:" + File.separator + "accounts"); //creates a directory object
    //The following S.o.p statements are for test and maintenance purposes rather than user feedback
    System.out.println("Directory " + accDir.getCanonicalPath() + " opened");
    System.out.println("Confirm Accounts directory exists: " + accDir.exists());
    System.out.println("Directory: " + accDir.isDirectory());
    String [] accFiles = accDir.list(); //gets a list of files in the directory and saves it as a String array
    System.out.println("Number of files in directory: " + accDir.length());
    while(i < accDir.length()){
    filename = accFiles;
    try{
    //open layered input Streams to access the next account file in line
    ObjectInputStream in = new ObjectInputStream(new FileInputStream("C:"+ File.separator + "accounts" + File.separator + filename));
    account = (Account)in.readObject();
    accounts.add(account);
    in.close(); //closes Streams for that particular file
    }catch(IOException e){System.out.println("Filing error as follows: " + e);
                }catch(ClassNotFoundException e){System.out.println("Class not Found. Details: " + e); }
    filename = null; //frees up reference for next file
    i++;//counter increments by one
    return accounts;

    This is what I was trying to do minus the comments and maintence and test code:
    public ArrayList retrieveAccounts()throws IOException{
    ArrayList accounts = new ArrayList();
    File accDir = new File("C:" + File.separator + "accounts");
    String [] accFiles = accDir.list();
    while(i < accDir.length()){
    filename = accFiles;
    try{
    ObjectInputStream in = new ObjectInputStream(new FileInputStream("C:"+ File.separator + "accounts" + File.separator + filename));
    account = (Account)in.readObject();
    accounts.add(account);
    in.close();
    }catch(IOException e){System.out.println("Filing error as follows: " + e);
    }catch(ClassNotFoundException e){System.out.println("Class not Found. Details: " + e); }
    filename = null;
    i++;
    return accounts;
    By the way, your the first Java programmer that I've met that doesn't like comments! :)
    NOTE: Think I may have spotted where I went wrong in my code.
    filename = accFiles;
    Forgot to point it at the specific element of the array, like so:
    filename = accFiles[i];
    Thanks for your help!

  • Can't create hyperlinks after converting a Word document with Acrobat XI Pro

    Hello,
    Here's my problem.
    I'm making a catalog document for my company.
    The document that I'm converting to PDF is made on Office Word 2013 and it's a .docx format file.
    I'm on Windows 8 and the latest version of Adobe Acrobat XI Pro installed.
    Inside my word document I have some pictures that have a hyperlink. Those hyperlinks directionate to a bookmark inside the word document. Inside the word document, if I do Ctrl+Click over the image, it will go to the page that has that bookmark. And it works. Period.
    Beside that I also have some Cross-references on the word document. Those cross-references basically are the page number from the bookmark reference. By accident on most of those cross-refrences I left enabled the "Insert as hyperlink" on the cross-reference box options. When I Ctrl+Click over those cross-references I also go into the page of that cross-reference.
    After I convert the word document into pdf, I can't get any hyperlink on the pictures, if I simply click on them, like if I click on a hyperlink on a webpage or something similar, the pdf won't go the the bookmark on the page that I've set on the word document.
    The funny thing is that if I click on the other cross-references I can go to the page were that cross-reference is...
    I tried all the methods to convert the file in order to obtain hyperlinks on the images...
    I tried to use the Acrobat tab and the File -> Save as Adobe PDF, as both uses Acrobat PDFMaker, but nothing works.
    Even tried all options on Acrobat PDFMaker but can't get it. "Create bookmarks", "Add links", "Convert Word Bookmarks", "...Word Styles to Bookmarks", "...Word Headings to Bookmarks", none works....
    If I try to simply print from inside Word by choosing the Adobe PDF printer (like if I choose a regular printer), in the printers options it doesn't show up any hyperlink/link/bookmark option related, so that way is definitely a no go...
    To reference, on 2006/2007 I also worked on a similar project and used this method on the word document (on Word 2003). At that time I had another Adobe Acrobat version, can't remember what version was...
    This hyperlink situation was without any problem. After conversion, on the pdf file, if I click on a image it went to the right place inside that pdf file...
    So I'm simply lost wether it's a problem of me, a problem of Word, a problem from Acrobat... simply lost...
    I'm desperated....please, someone help me!!!

    Ok, sorry for never talk since the last time, but I finally discovered why I had this problem.
    I found out that M$ decided somehow to change the process of embedded hyperlinks on a image, but in a docx it doesn't get affected. Only after transforming it into a pdf by Acrobat that the problem emerges...
    I found this site http://www.pb-solv.net/2013/08/embed-pictures-in-microsoft-word.html
    Basically all I have to do is "Use Insert, Quick Parts, Field, IncludePicture. This inserts the picture in the old way as a field. You can use Alt-F9 to reveal the field codes and change the images to be embedded rather than linked."
    Then, after converting it with acrobat, the pdf finally have hyperlinks on the images!!!
    They change this on Word 2007. As I had the 2003, at the time, I didn't had this problem.
    As I said, M$ changed something, but only is affected after converting with acrobat. So, acrobat also missed something in the process. I call it a 50/50 guilt.
    To bad no one ever notice this problem...

  • After converting PDF to word, font sometimes changes in the middle and I can't get the document all in the same font.  It happened on many documents.

    I am preparing a book which I want in Times New Roman. After converting from PDF files, many of the pages had other fonts, mainly Cambria in them and I couldn't get the whole document in the same font.  How can I fix this?
    ESharan

    Fix it in Word. Converting to Word from PDF is a complex and uncertain process, just the first stage in editing. But does the book only exist in PDF? Often people go through PDF because it seems easier, while often it is harder.

  • PowerShell script : Directory object not found error in Get-ADGroupMember

    I am new in powershell scripting. I am writing a script to add users in different AD Groups. while doing so I do the following:
    Check if the user already exist in the group:
    $mbr_exist = Get-ADGroupMember $grpname | Where-Object {$_.SamAccountName -eq $sam}
    If user does not exist then add the user to the group.
    When I manually run the script its runs flawless, without any errors. But when I schedule the script to run it gives an error as follows:
    3/30/2015 8:32:15 AM Directory object not foundAt + $mbr_exist = Get-ADGroupMember $grpname | Where-Object {$_.SamAc ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~ Error at Line:$mbr_exist = Get-ADGroupMember
    $grpname | Where-Object {$_.SamAccountName -eq $sam}
    The strange thing is the user for which it throws the error is present in the group.I am not sure why this error is occurring when scheduled. Can any one please help? All the suggestions will be appreciated
    Note: (The script is scheduled using Windows Task Scheduler)
    try
    # # Initialize the variables we will use
    $status = 'false'
    $drivename = "H:"
    $sysdate = Get-Date -UFormat "%m_%d_%Y"
    $foldername = $drivename + "\Script_Result\PowershellData"+ $sysdate
    $backup_folder = "$foldername\AD_Groups_Backup"
    $updatedGroup = "$foldername\Updated_AD_Groups_LogFiles"
    $LogFilePath = "$foldername\Log_Update_ADGroups"+$sysdate+".log"
    # # Initialize the arrays we will use
    $GroupArray = @()
    # # maintain log of program startup
    $logdate = get-date
    $logdate.ToString() + "`tStarted script to Update AD user Groups..." | Out-File -FilePath $LogFilePath
    # # Create a sub folder to store the backup files
    $fileexist = Test-Path $backup_folder -PathType Container
    if($fileexist -ne 'False')
    New-Item -ItemType Directory $backup_folder
    # # Create a sub folder to store Updated AD group Log files
    $fileexist = Test-Path $updatedGroup -PathType Container
    if($fileexist -ne 'False')
    New-Item -ItemType Directory $updatedGroup
    # # Take back up of the AD groups data
    Get-ADGroupMember -Identity "Group1" | Export-csv "$backup_folder\Group1_BackUP$sysdate.csv"
    Get-ADGroupMember -Identity "Group2" | Export-csv "$backup_folder\Group1_BackUP$sysdate.csv"
    Get-ADGroupMember -Identity "Group3" | Export-csv "$backup_folder\Group1_BackUP$sysdate.csv"
    Get-ADGroupMember -Identity "Group4" | Export-csv "$backup_folder\Group1_BackUP$sysdate.csv"
    (an so on..... 11 such groups )
    # # Fetch AD Users data
    $ADusers = Get-ADUser -filter {(EmployeeNumber -gt 1) -and (EmployeeNumber -ne "N/A") -and (Enabled -eq $true)} -Properties * | Sort-Object -Property EmployeeNumber
    $ADusers.Count
    foreach($u in $ADusers)
    $sam = $u.SamAccountName
    $empnum = $u.EmployeeNumber
    $mgr = $u.mgr
    $fsal = $u.'fsalary-Hourly'
    $comp = $u.Company
    $ofc = $u.Office
    Write-Host "$sam : $empnum : $mgr :$fsal : $comp : $ofc" -ForegroundColor Yellow
    $GroupArray = @()
    # # Check if the user fits in any of the 11 scenarios
    if($comp -eq "US")
    # scenario 7
    write-host "7. Add to US Employees"
    $GroupArray += "US Employees"
    if($mgr -eq "Y")
    Write-Host "1. ADD to US MAnagers"
    $group = "US Managers"
    $GroupArray += $group
    if(($fsal -eq "Hourly") -and ($ofc -ne "Canton"))
    Write-Host "3. Add to US Hourly (excluding Canton)"
    $group = "US Hourly (excluding Canton)"
    $GroupArray += $group
    if(($fsal -eq "Hourly") -and ($ofc -eq "Canton"))
    write-host "4. Add to US Canton Hourly"
    $group = "US Canton Hourly"
    $GroupArray += $group
    if(($fsal -eq "Salaried") -and ($ofc -eq "Corporate" -or $ofc -eq "Landis Lakes 1" -or $ofc -eq "Landis Lakes 2"))
    Write-Host "5. Add to US Salaried Corporate"
    $group = "US Salaried Corporate"
    $GroupArray += $group
    if(($fsal -eq "Salaried") -and ($ofc -ne "Corporate" -and $ofc -ne "Landis Lakes 1" -and $ofc -ne "Landis Lakes 2"))
    Write-Host "6. Add to US Salaried Plant"
    $group = "US Salaried Plant"
    $GroupArray +=$group
    elseif($comp -eq "canada")
    # scenario 9
    write-host "9. Canada Employees"
    $GroupArray += "Canada Employees"
    if($mgr -eq "Y")
    Write-Host "2. Add to Canada Managers"
    $group = "Canada Managers"
    $GroupArray += $group
    if($fsal -eq "Hourly")
    Write-Host "10. Add to Canada Hourly"
    $group = "Canada Hourly"
    $GroupArray += $group
    if($fsal -eq "Salaried")
    Write-Host "11. Add to Canada Salaried Plant"
    $group = "Canada Salaried Plant"
    $GroupArray += $group
    elseif($ofc -eq "Corporate" -or $ofc -eq "Landis Lakes 1" -or $ofc -eq "Landis Lakes 2")
    Write-Host "8. Add to Corporate Employees"
    $GroupArray += "Corporate Employees"
    write-host "Final Group List" -ForegroundColor Green
    $grplen = $GroupArray.Length
    #$GroupArray
    $grplen
    for($i= 0; $i -lt $grplen; $i++)
    $grpname = $GroupArray[$i]
    write-host "$sam will be added to Group : $grpname" -ForegroundColor Magenta
    # # Check if the user is already present in the Group
    $mbr_exist = Get-ADGroupMember $grpname | Where-Object {$_.SamAccountName -eq $sam}
    if($mbr_exist -eq $null)
    # #Add user to US Managers group
    Add-ADGroupMember -Identity $grpname -Members $sam
    Write-Host "1. User $sam is added to $grpname group" -ForegroundColor Green
    # # documenting the user list that are added to this group
    $grpmbr = New-Object PSObject
    $grpmbr | Add-Member -MemberType NoteProperty -Name "EmployeeNumber" -Value $empnum
    $grpmbr | Add-Member -MemberType NoteProperty -Name "SamAccountName" -Value $sam
    $grpmbr | Add-Member -MemberType NoteProperty -Name "Name" -Value $u.Name
    $grpmbr | Add-Member -MemberType NoteProperty -Name "DistinguishedName" -Value $u.DistinguishedName
    $grpmbr | Add-Member -MemberType NoteProperty -Name "mgr" -Value $mgr
    $grpmbr | Add-Member -MemberType NoteProperty -Name "Company" -Value $comp
    $grpmbr | Add-Member -MemberType NoteProperty -Name "Salary/Hourly" -Value $fsal
    $grpmbr | Add-Member -MemberType NoteProperty -Name "Office" -Value $ofc
    $grpmbr | Add-Member -MemberType NoteProperty -Name "ADGroup" -Value $grpname
    $grpmbr | Export-Csv "$updatedGroup\ADUsers_To_Group($grpname)_$sysdate.csv" -Append -NoTypeInformation
    else
    Write-Host "Member $sam already exist in $grpname group" -ForegroundColor Red
    $logdate = get-date
    $logdate.ToString() + "`tCompleted script to Update Update AD Groups..." | Out-File -FilePath $LogFilePath -Append
    $status = 'true'
    return $status
    catch
    $err_lineno = $error[0].InvocationInfo.ScriptLineNumber
    $err_line = $error[0].InvocationInfo.Line
    $ExceptionMessage = $_.Exception.Message
    #$ExceptionMessage
    $error_info = $error[0].ToString() + $error[0].InvocationInfo.PositionMessage
    Write-Host "$error_info " -ForegroundColor Red
    $FailedItem = $_.Exception.ItemName
    if($ExceptionMessage)
    $logdate.ToString() + "`t $error_info " | out-file "$foldername\ErrorLog_Update_AD_Groups$sysdate.log" -append
    "Line Number: $err_lineno . `nError at Line: $err_line" | out-file "$foldername\ErrorLog_Update_AD_Groups$sysdate.log" -append
    #Invoke-Item "C:\ErrorLog.log"
    $status = 'false'
    return $status

    Hi mdkelly, Sorry for such a late reply (due to credential issues).
    I am using Windows task scheduler to schedule the task. I am given the administrator access to the server (Windows Server 2012). So I think I set to run the script under system account.
    My apologies for asking this, am I missing something while scheduling the script through task scheduler?  how to check if the scheduled task is running under who's credentials? How to pass my (admin) credentials, so that the script execution won't face
    a problem? Any suggestion on the above questions will be helpful. (I tried to search on net for the questions but didn't get any conclusive answers)  
    Thanks in advance.

  • ORA-29857: domain indexes and/or secondary objects exist in the tablespace

    I tried to drop tablespace APPS_TS_TX_DATA using drop tablespace APPS_TS_TX_DATA including contents and datafiles cascade constraints.
    I got error ORA-29857: domain indexes and/or secondary objects exist in the tablespace.
    After I have dropped all domain indexes, then tried to drop tablespace again, I still got the same error. I have searched metalink regarding this error, there is no hit.
    What exactly objects in the tablespace are prevenng dropping the tablespaces?

    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    ILMU88>
    ILMU88> SELECT COUNT(*)
    2 FROM dba_segments
    WHERE tablespace_name = 'APPS_TS_TX_DATA';
    3
    COUNT(*)
    14190
    drop tablespace APPS_TS_TX_DATA including contents and datafiles cascade constraints;
    drop tablespace APPS_TS_TX_DATA including contents and datafiles cascade constraints
    ERROR at line 1:
    ORA-29857: domain indexes and/or secondary objects exist in the tablespace

  • Directory object on $APPLCSF/$APPLOUT

    Hi,
    My requirement is to fetch a xml file from concurrent program output directory $APPLCSF/$APPLOUT and update some tables based on it.
    In order to read the file I need to have a directory object created on the same.
    Can I create a directory object on $APPLCSF/$APPLOUT?
    Is this not recommended?
    I just need to read it from a job submitted thru dbms_job.
    Please let me know your views.
    Thanks.
    Edited by: Chit on Mar 15, 2012 2:10 AM

    Chit wrote:
    Okay. Here is my requirement.
    I am in Oracle apps R12 and db 11g.
    I have a concurrent program with no mandatory parameters.
    I need to email POs to suppliers. I am using BIPublisher for it. I should not email POs twice.
    For this I have done the following:
    Written a PLSQL code which will
    1. Generate xml for bursting
    2. Launch bursting program
    So far so good. Now when it comes to duplicate email handling part, the complexity comes in.
    I need to do the following for it.
    1. Generate xml for bursting - parent request
    2. Launch bursting program - child request
    3. Wait for bursting program to complete - parent request
    4. Fetch the xml status file generated by bursting report, and update the POs with bursting report status. - parent request
    Since step3 waits for step2 to complete, step2 always fails with 'File o1234.out is not accessible'. I can understand that since parent is not complete (and whose out file is locked) and child is requesting for parent's out file, it errors.
    So I thought of handling step 3 and 4 thru dbms_job, so that step2 completes successfully.
    For step4, I need to access the out file of step2, for which I need a directory object created on $APPLCSF/$APPLOUT which will allow me to read that file and update the status back.
    Please let me know if you need more info.Why is your directory name specified with environment variables?

  • BFILENAME and Directory object

    Hi, I have a question about BFILENAME function. I can't find any other multimedia related topic so I decide to post it here, please help if you know the answer.
    I have following procedure:
    PROCEDURE test
    (name IN varchar2:= 'a.jpg' )
    IS
    v_pix_source BFILE;
    BEGIN
    v_pix_source := BFILENAME('C_TEMP', name);
    IF DBMS_LOB.FILEEXISTS(v_pix_source) = 1
    THEN
    DBMS_OUTPUT.PUT_LINE('EXIST');
    ELSE
    DBMS_OUTPUT.PUT_LINE('NOT EXIST');
    END IF;
    END test;
    C_TEMP IS A DIRECTORY object WITH PATH 'c:\temp\' .
    I keep getting 'NOT EXIST' when I call this procedure while the jpg file is there. I have tried 'c:\temp' too but it didn't work either.
    But this does work:
    INSERT INTO lob_table
    VALUES(1, bfilename('c:\temp\','a.jpg'));
    So it seems that the directory object is giving me trouble. This has nothing to do with privileges because I am using a DBA account to run the procedure.
    Any help will be appreciated!
    null

    I don't know if a DBA account has the read directory privilege for directories that he didn't create. Try grnting the read directory privilege to the user.
    SQL> grant read on directory C_TEMP to my_user;
    null

  • Compression fails with Characteristic attribute exists twice

    Guys,
    I ran a compression on cube 0PP_C03 that failed with "Characteristic
    attribute exists twice"
    I see that "Note 859320 - Multiple reference points in InfoCubes with non-cumulative v" tells me to run that program to clear up any dups in the E Fact table.
    I currently have 4,060,118 rows in the E Fact table.
    I ran rsrv program "Multiple Entries in Dimensions of a (Basis) InfoCube" and there are NO dups in the F Fact table.
    Running "Note 859320 - Multiple reference points in InfoCubes with non-cumulative v" indicates that I have 42,627 dups. The note talks about running RSCDS_MERGE_DUPL_REF_POINTS and I ran it using no reference points in simulation mode. Maybe I need to specify some selection conditions?
    I'd like to make sure I am executing the correct procedure prior to running this pgm live. Additionally, all of a sudden I have this same condition on cubes 0PM_C03, 0SD_C03, and ZSM_C001 as well. This is the first time I have seen this ocurrence.
    Has anyone any experienve running this or having this compression error condition?
    Mike

    As I remember I got the error message:
    Characteristic attribute exists twice with DBMAN 231
    So I ran se38 pgm:
    RSCDS_MERGE_DUPL_REF_POINTS, putting in the cube like 0PM_C03 and pkg size 100
    and it fixed the problem.
    Hope that helps. I just saw this and we don't have BW anymore. We have moved to HANA and shutdown BW.
    Mike

  • Adobe Form Translation error Omitted Objects (Could not be Converted)

    Hi,
    I am new to this forum. I have an issue with Adobe form Translation. Through SE63 (or through the form translation itself) , whenever I try to translate into any language it gives me an error "  Omitted Objects (Could not be Converted)". And the translation doesnt get saved. I tested with other forms and the translation works perfectly fine. Its the problem only with this particular form. In fact any change gives error. For e.g. I copy the English the translation to the Greek or the Hungarian one, and if I delete a character and save it it gives me an error.
    Please help me if you have faced similar issues have any knowledge about it.
    Thanks in advance
    Shivam

    Hi David,
    Thanks for answering my query. I had installed a new patch and even that did not work. However I managed to make it work. I dont know if its the correct way but it worked for me. On furthur analyses I found out that the problem was with XML tags. This was throwing an error. Also, on looking at the translations I Observed that there were few close tags "</trans-unit> " which had no open "<trans-unit>" for them. I simply deleted the extra close tags and the translation worked fine after that.
    Point to be noted is that the extra tags were not there in the original english translation. They only appeared when I tried to change the Greek or Hungarian translation and saved them.
    Hope it helps anybody.
    Thanks.

  • Can i convert a non layered file to a layered file bases on used colors?

    can i convert a non layered file to a layered file bases on used colors?

    I have heard questions like this before.
    Some people seem to think that each colour should be on a separate layer.
    I hope you are not one of them, because it is a complete misconception and defeats the object of Illustrator’s object stacking system.
    Why do you think you need to collect objects of the same colour onto separate layers?

  • Convert non-CDB to CDB

    I have upgraded a 11.2.0.4 database to a 12.1.0.2 version. It is now a non-CDB database. Could you please provide me the oracle doc to convert it to a CDB database.

    FYI - in the future please post 12c issues such as this in the multitenant forum
    Multitenant
    I have upgraded a 11.2.0.4 database to a 12.1.0.2 version. It is now a non-CDB database. Could you please provide me the oracle doc to convert it to a CDB database.
    You don't 'convert it to a CDB database'. You plug it in to an existing CDB database.
    So you would:
    1. Create a new 12c database - that will create the root/CDB
    2. Plug in your upgraded DB as a PDB
    The doc with the details is hte Database Upgrade Guide
    https://docs.oracle.com/database/121/UPGRD/upgrade.htm#CHDBHIHI
    Chapter 3.1.2 Upgrading an Earlier Release and Plugging a PDB into a CDB
    You can upgrade earlier releases of Oracle Database using either DBUA or the Parallel Upgrade Utility and then plug the upgraded database into a multitenant container database (CDB). The upgraded release 12.1 database can be plugged into an existing CDB. Be sure to follow any necessary pre-upgrade procedures described in Chapter 2, "Preparing to Upgrade Oracle Database." The following procedure assumes that both databases are on the same system.
    Following that text above is a step-by-step description of how to do EXACTLY what you need to do.

  • Under what conditions  ALL Objects exists and does not exists

    When does the ALL Objects exists in Database
    For Eg: ALL_TAB_COLUMNS , ALL_USERS etc
    When it does not exists
    For Eg : ALL_SEGMENTS which does not exist and only options are USER_SEGMENTS and DBA_SEGMENTS.
    There should be some rules for its existence and its non existence and under what conditions it exists and does not exists .
    Please explain.

    Its clearly stated in Oracle documentation.
    An ALL_ view displays all the information accessible to the current user, including information from the current user's schema as well as information from objects in other schemas, if the current user has access to those objects by way of grants of privileges or roles.
    A DBA_ view displays all relevant information in the entire database. DBA_ views are intended only for administrators. They can be accessed only by users with the SELECT ANY TABLE privilege. This privilege is assigned to the DBA role when the system is initially installed.
    A USER_ view displays all the information from the schema of the current user. No special privileges are required to query these views.
    Edit: formatted the post :)

  • Oracle DIRECTORY object and subdirectories

    As you know, in 9i the use of the UTL_FILE_DIR is being deprecated in favour of Oracle DIRECTORY objects. This is fine for security reasons and administration but there seems to be a problem with subdirectories.
    The situation: we are generating literally millions of files using UTL_FILE. These files are going to be stored in one of forty thousand directories (the precise directory is derived from parsing the file's key ID).
    In the old days access could be granted simply by setting the UTL_FILE_DIR parameter to /<root>/dir/*
    As far as I can see, the Oracle DIRECTORY does not support subdirectories. Is there any way of avoiding the creation of forty thousand CREATE DIRECTORY statements and a concommitant number of GRANT statements?
    Oracle 9.2, any suggestions gratefully received.
    Cheers, APC

    Just curious Andrew-- are there things in the UTL_FILE package that you don't find implemented better in Java's I/O classes? I wouldn't claim to be the world's leading expert on Java I/O, so I won't comment on the specifics of this. Generally I think using Java to re-write a piece of existing native functionality is a hard one to sell:
    (1) Java tends to run slower than native code
    (2) It's a chunk of work, and my PM is already breathing down my neck.
    However, I might do this as a hobby project. If I do, I'll let you know how it turns out :)
    Cheers, APC

Maybe you are looking for

  • No Video / i Sight Cam No Longer Works - HELP!

    I have been using iSight's internal cam with no problems. Today, after a freeze, i had to shut down using the button on the back of the computer. No video programs show the video preview. The camera lights, and I get no error messages. The screen jus

  • TS1741 Why won't my phone connect to computer with the cord??

    I have tried to connect my computer to my phone repeatedly but all I'm getting is blank. Anyone have any bright ideas??

  • Tables used for material ledger

    What are the standard tables used for material ledger

  • PDEPath element.

    Hi, I have pdf document, which contains PDEText, PDEPath, and other element, using SDK functions, Numchars = PDETextGetNumChars((PDEText)pdeElement); PDETextGetBBox((PDEText)kPDETextChar,pdeElement, charindex, bboxP); PDETextGetText((PDEText)pdeEleme

  • How to login into NP Identity System using ObSSOCookie?

    I am using the Web Services API to Netpoint, generated by WSDL files. I have an ObSSOCookie (from IWA) which I want to use to log into Netpoint Identity System. The usual method is as follows: Authentication authN = new Authentication(); authN.setLog