error ORA-4068:-l' current state of the package is invalidated

Hai friends,

Please see this link

Problem we faced, it is ' error ora-4068:-l' current state of the package is disabled "in the application.initiallly of customer, we migrated to oracle 9i and 10g 10.2.0.4.0

We have discussed and obtained the solution as the timestamp of the objects may be different. (we expect the access rights of the table sys.obj$) pls see the link

Re: oracle error-4068

But now we are informed senior as below

(1) error ora-4068 will come only when recompile us the view. is this true?

(2) 6136074 bug is fixed in 10.2.0.4.0. is it?

Gurus of give your valuable suggestions

S

Packages tend to fail because of their 'package '. A package has a 'State' when it contains the package variable and constant level etc. and the package is called. On the first calling package, the 'State' is created in memory to hold the values of these variables, etc. If an object including the package depends on for example a table is changed somehow example deleted and recreated due to data dependencies, the package then takes a State not VALID. When you do then appealed to the package, Oracle examines the status and see that it is not valid, then determines that the package has a "State". Because something changed the package depended on, the State is taken as being obsolete and is ignored, which causes the error "State package has been abandoned" message.

If a package has no variables of level package etc. i.e. the 'State' and then, taking the same example above, the whole takes an INVALID state, but when you make then a call to the package, Oracle considers as invalid, but knows that there is no 'State' attached to it and is therefore able to recompile the package automatically and then continue execution without causing error messages. The only exception here is if the thing that the package was dependent on a change of such kind that the package may not compile, in which case you will get an invalid error package type.

And if you want to know how we prevent Jetty package States...

Move all variables and constants in a stand-alone package specification and to refer to those of your original package. So when the status of your original packing is invlidated for some reason, it has no State package and can be recompiled automatically, however the packaging containing the vars/const is not cancelled because it has no dependencies, so the State that is in memory for this package will remain and may continue to be used.

As for package-level sliders, you will need to make these premises to the procedures/functions using them as you won't be able of sliders reference in all of packages like that (not sure on the use of the REF CURSOR but... exists for me to study!)

This first example shows the State being disabled by adding a new column on the table and causing to give a 'Package State scrapped' error...

SQL> set serveroutput on
SQL>
SQL> create table dependonme (x number)
  2  / 

Table created.

SQL>
SQL> insert into dependonme values (5)
  2  / 

1 row created.

SQL>
SQL> create or replace package mypkg is
  2    procedure myproc;
  3  end mypkg;
  4  / 

Package created.

SQL>
SQL> create or replace package body mypkg is
  2    v_statevar number := 5; -- this means my package has a state
  3
  4    procedure myproc is
  5      myval number;
  6    begin
  7      select x
  8      into myval
  9      from dependonme;
 10
 11      myval := myval * v_statevar;
 12      DBMS_OUTPUT.PUT_LINE('My Result is: '||myval);
 13    end;
 14  end mypkg;
 15  / 

Package body created.

SQL>
SQL> exec mypkg.myproc
My Result is: 25

PL/SQL procedure successfully completed.

SQL>
SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
  2  / 

OBJECT_NAME
--------------------------------------------------------------------------------------------------
OBJECT_TYPE         STATUS
------------------- -------
MYPKG
PACKAGE             VALID

MYPKG
PACKAGE BODY        VALID

SQL>
SQL>
SQL> alter table dependonme add (y number)
  2  / 

Table altered.

SQL>
SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
  2  / 

OBJECT_NAME
--------------------------------------------------------------------------------------------------
OBJECT_TYPE         STATUS
------------------- -------
MYPKG
PACKAGE             VALID

MYPKG
PACKAGE BODY        INVALID

SQL>
SQL> exec mypkg.myproc
BEGIN mypkg.myproc; END;

*
ERROR at line 1:
ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of package body "SCOTT.MYPKG" has been invalidated
ORA-06508: PL/SQL: could not find program unit being called: "SCOTT.MYPKG"
ORA-06512: at line 1

SQL>
SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
  2  / 

OBJECT_NAME
--------------------------------------------------------------------------------------------------
OBJECT_TYPE         STATUS
------------------- -------
MYPKG
PACKAGE             VALID

MYPKG
PACKAGE BODY        INVALID

SQL>
SQL> exec mypkg.myproc

PL/SQL procedure successfully completed.

SQL>
SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
  2  / 

OBJECT_NAME
--------------------------------------------------------------------------------------------------
OBJECT_TYPE         STATUS
------------------- -------
MYPKG
PACKAGE             VALID

MYPKG
PACKAGE BODY        VALID

And the following example shows how to get the package in their own specifications of package variables, allows the package to automatically recompile when it is called even if it has become invalid by the action to add a column to the table.

SQL> drop table dependonme
  2  / 

Table dropped.

SQL>
SQL> drop package mypkg
  2  / 

Package dropped.

SQL>
SQL> set serveroutput on
SQL>
SQL> create table dependonme (x number)
  2  / 

Table created.

SQL>
SQL> insert into dependonme values (5)
  2  / 

1 row created.

SQL>
SQL> create or replace package mypkg is
  2    procedure myproc;
  3  end mypkg;
  4  / 

Package created.

SQL>
SQL> create or replace package mypkg_state is
  2    v_statevar number := 5; -- package state in seperate package spec
  3  end mypkg_state;
  4  / 

Package created.

SQL>
SQL> create or replace package body mypkg is
  2    -- this package has no state area
  3
  4    procedure myproc is
  5      myval number;
  6    begin
  7      select x
  8      into myval
  9      from dependonme;
 10
 11      myval := myval * mypkg_state.v_statevar;  -- note: references the mypkg_state package
 12      DBMS_OUTPUT.PUT_LINE('My Result is: '||myval);
 13    end;
 14  end mypkg;
 15  / 

Package body created.

SQL>
SQL> exec mypkg.myproc
My Result is: 25

PL/SQL procedure successfully completed.

SQL>
SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
  2  / 

OBJECT_NAME
--------------------------------------------------------------------------------------------------
OBJECT_TYPE         STATUS
------------------- -------
MYPKG
PACKAGE             VALID

MYPKG
PACKAGE BODY        VALID

SQL>
SQL> alter table dependonme add (y number)
  2  / 

Table altered.

SQL>
SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
  2  / 

OBJECT_NAME
--------------------------------------------------------------------------------------------------
OBJECT_TYPE         STATUS
------------------- -------
MYPKG
PACKAGE             VALID

MYPKG
PACKAGE BODY        INVALID

SQL>
SQL> exec mypkg.myproc
My Result is: 25

PL/SQL procedure successfully completed.

Tags: Database

Similar Questions

  • ORA-04068: current state of the packages was waived - avoid

    Hello
    I fight with the bad behavior of developers that is, something like this:
    CREATE OR REPLACE PACKAGE pkg1 IS
    
    g_version VARCHAR2(20) := '7.3';
        TYPE t_id_kon IS RECORD(
        id_kon VARCHAR2(12),
        sr_id    NUMBER(5));
    
      TYPE t_id_kont IS TABLE OF t_id_kon INDEX BY BINARY_INTEGER;
      FUNCTION get_version RETURN VARCHAR2;
    END pkg1;
    /
    I did some tests and looks like when you recompile pkg1 with
    Global g_version variable it is ORA-04068 generated for all sessions using this pkg1 before recompiling.
    But what about type and table_type declared in pkg1 they cause same behavior as g_version global varialbe?

    And generally how to treat than the types of situations of application point of view, you must catch this exception and re-run your application just?
    concerning
    GregG

    Packages tend to fail because of their 'package '. A package has a 'State' when it contains the package variable and constant level etc. and the package is called. On the first calling package, the 'State' is created in memory to hold the values of these variables, etc. If an object including the package depends on for example a table is changed somehow example deleted and recreated due to data dependencies, the package then takes a State not VALID. When you do then appealed to the package, Oracle examines the status and see that it is not valid, then determines that the package has a "State". Because something changed the package depended on, the State is taken as being obsolete and is ignored, which causes the error "State package has been abandoned" message.

    If a package has no variables of level package etc. i.e. the 'State' and then, taking the same example above, the whole takes an INVALID state, but when you make then a call to the package, Oracle considers as invalid, but knows that there is no 'State' attached to it and is therefore able to recompile the package automatically and then continue execution without causing error messages. The only exception here is if the thing that the package was dependent on a change of such kind that the package may not compile, in which case you will get an invalid error package type.

    And if you want to know how we prevent Jetty package States...

    Move all variables and constants in a stand-alone package specification and to refer to those of your original package. So when the status of your original packing is invlidated for some reason, it has no State package and can be recompiled automatically, however the packaging containing the vars/const is not cancelled because it has no dependencies, so the State that is in memory for this package will remain and may continue to be used.

    As for package-level sliders, you will need to make these premises to the procedures/functions using them as you won't be able of sliders reference in all of packages like that (not sure on the use of the REF CURSOR but... exists for me to study!)

    This first example shows the State being disabled by adding a new column on the table and causing to give a 'Package State scrapped' error...

    SQL> set serveroutput on
    SQL>
    SQL> create table dependonme (x number)
      2  / 
    
    Table created.
    
    SQL>
    SQL> insert into dependonme values (5)
      2  / 
    
    1 row created.
    
    SQL>
    SQL> create or replace package mypkg is
      2    procedure myproc;
      3  end mypkg;
      4  / 
    
    Package created.
    
    SQL>
    SQL> create or replace package body mypkg is
      2    v_statevar number := 5; -- this means my package has a state
      3
      4    procedure myproc is
      5      myval number;
      6    begin
      7      select x
      8      into myval
      9      from dependonme;
     10
     11      myval := myval * v_statevar;
     12      DBMS_OUTPUT.PUT_LINE('My Result is: '||myval);
     13    end;
     14  end mypkg;
     15  / 
    
    Package body created.
    
    SQL>
    SQL> exec mypkg.myproc
    My Result is: 25
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  / 
    
    OBJECT_NAME
    --------------------------------------------------------------------------------------------------
    OBJECT_TYPE         STATUS
    ------------------- -------
    MYPKG
    PACKAGE             VALID
    
    MYPKG
    PACKAGE BODY        VALID
    
    SQL>
    SQL>
    SQL> alter table dependonme add (y number)
      2  / 
    
    Table altered.
    
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  / 
    
    OBJECT_NAME
    --------------------------------------------------------------------------------------------------
    OBJECT_TYPE         STATUS
    ------------------- -------
    MYPKG
    PACKAGE             VALID
    
    MYPKG
    PACKAGE BODY        INVALID
    
    SQL>
    SQL> exec mypkg.myproc
    BEGIN mypkg.myproc; END;
    
    *
    ERROR at line 1:
    ORA-04068: existing state of packages has been discarded
    ORA-04061: existing state of package body "SCOTT.MYPKG" has been invalidated
    ORA-06508: PL/SQL: could not find program unit being called: "SCOTT.MYPKG"
    ORA-06512: at line 1
    
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  / 
    
    OBJECT_NAME
    --------------------------------------------------------------------------------------------------
    OBJECT_TYPE         STATUS
    ------------------- -------
    MYPKG
    PACKAGE             VALID
    
    MYPKG
    PACKAGE BODY        INVALID
    
    SQL>
    SQL> exec mypkg.myproc
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  / 
    
    OBJECT_NAME
    --------------------------------------------------------------------------------------------------
    OBJECT_TYPE         STATUS
    ------------------- -------
    MYPKG
    PACKAGE             VALID
    
    MYPKG
    PACKAGE BODY        VALID
    

    And the following example shows how to get the package in their own specifications of package variables, allows the package to automatically recompile when it is called even if it has become invalid by the action to add a column to the table.

    SQL> drop table dependonme
      2  / 
    
    Table dropped.
    
    SQL>
    SQL> drop package mypkg
      2  / 
    
    Package dropped.
    
    SQL>
    SQL> set serveroutput on
    SQL>
    SQL> create table dependonme (x number)
      2  / 
    
    Table created.
    
    SQL>
    SQL> insert into dependonme values (5)
      2  / 
    
    1 row created.
    
    SQL>
    SQL> create or replace package mypkg is
      2    procedure myproc;
      3  end mypkg;
      4  / 
    
    Package created.
    
    SQL>
    SQL> create or replace package mypkg_state is
      2    v_statevar number := 5; -- package state in seperate package spec
      3  end mypkg_state;
      4  / 
    
    Package created.
    
    SQL>
    SQL> create or replace package body mypkg is
      2    -- this package has no state area
      3
      4    procedure myproc is
      5      myval number;
      6    begin
      7      select x
      8      into myval
      9      from dependonme;
     10
     11      myval := myval * mypkg_state.v_statevar;  -- note: references the mypkg_state package
     12      DBMS_OUTPUT.PUT_LINE('My Result is: '||myval);
     13    end;
     14  end mypkg;
     15  / 
    
    Package body created.
    
    SQL>
    SQL> exec mypkg.myproc
    My Result is: 25
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  / 
    
    OBJECT_NAME
    --------------------------------------------------------------------------------------------------
    OBJECT_TYPE         STATUS
    ------------------- -------
    MYPKG
    PACKAGE             VALID
    
    MYPKG
    PACKAGE BODY        VALID
    
    SQL>
    SQL> alter table dependonme add (y number)
      2  / 
    
    Table altered.
    
    SQL>
    SQL> select object_name, object_type, status from user_objects where object_name = 'MYPKG'
      2  / 
    
    OBJECT_NAME
    --------------------------------------------------------------------------------------------------
    OBJECT_TYPE         STATUS
    ------------------- -------
    MYPKG
    PACKAGE             VALID
    
    MYPKG
    PACKAGE BODY        INVALID
    
    SQL>
    SQL> exec mypkg.myproc
    My Result is: 25
    
    PL/SQL procedure successfully completed.
    
  • current state of the package has been abandoned...

    Hi all..

    I get the following error only for the '"first run" ", even the package is in State"valid ". If the execute the same package to new "second run", it works ok.

    usually we complie all 'invalid objects"in the diagram, when we pass the TEST or PRE-PRODUCTION code approx.

    but I get the following error, even if the package is in State "valid".
    ERROR at line 1:
    ORA-04068: existing state of packages has been discarded
    ORA-04061: existing state of package "TEST_OWNER.TEST_PKG" has
    been invalidated
    ORA-04065: not executed, altered or dropped package
    "TEST_OWNER.TEST_PKG"
    ORA-06508: PL/SQL: could not find program unit being called:
    "TEST_OWNER.TEST_PKG"
    ORA-06512: at line 2
    I went through the next thread, blu explained the cause of this error,
    but we receive this error even when the package is 'valid' State too?
    Re: When should be package invalidated?

    Which session refers to a package for first time package is instantiated in memory of the session. If the package is recompiled, Oracle assumes he may have changed and the package in memory session instance is no longer valid. This is why any reference to this package made by this session will raise an error.

    Session 1:

    SQL> create or replace
      2  package pkg1
      3  is
      4  g_n number;
      5  procedure p1;
      6  end;
      7  /
    
    Package created.
    
    SQL> create or replace
      2  package body pkg1
      3  is
      4  procedure p1
      5  is
      6  begin
      7  for rc in (select * from emp) loop
      8  dbms_output.put_line(rc.empno);
      9  end loop;
     10  end;
     11  end;
     12  /
    
    Package body created.
    
    SQL> exec pkg1.p1;
    
    PL/SQL procedure successfully completed.
    
    SQL>
    

    This package is instantiated PKG1 is session1. Then session 2:

    SQL> alter package pkg1 compile body;
    
    Package body altered.
    
    SQL> 
    

    Back to session 1:

    SQL> exec pkg1.p1;
    BEGIN pkg1.p1; END;
    
    *
    ERROR at line 1:
    ORA-04068: existing state of packages has been discarded
    ORA-04061: existing state of package body "SCOTT.PKG1" has been invalidated
    ORA-04065: not executed, altered or dropped package body "SCOTT.PKG1"
    ORA-06508: PL/SQL: could not find program unit being called: "SCOTT.PKG1"
    ORA-06512: at line 1
    
    SQL>
    

    SY.

  • ERROR: New-Snapshot (the operation is not valid due to the current state of the object)

    Hello guys!

    I've been googlin everywhere, but impossible to find a solution to my problem. I hope that one of you, qualified people can point me in the right direction :)

    I created a powerCLI script to take a snapshot of our most important servers before we do our weekly maintenance. The idea to run the script as regular powershell script and then have

    1. Add snap-ins powercli and connect to virtualcenter servers
    2. ask the VC servers to virtual machines in a perticular folder
    3. Loop foreach on these servers to create a snapshot with the name $snapshotname

    Currently, I just do it turn on a test folder that I created in vSphere that contains 3 test VMs:

    • Testmagne1 - normal operation
    • Testmagne2 - I renamed the folder for this virtual machine in the data store to generate an error.
    • testmagne3 - normal operation

    Since the servers (not the test servers, but good ones) is the most important servers in our environment, I want to be able to catch exceptions and errors when I run this script. I do this with the Try - Catch - Finally works.

    The strange thing is:

    The release of Powershell/PowerCLI is different from the output in VirtualCenter (!)

    In virtualcenter, the output is as follows

    • Testmagne1 - snapshot is created successfully - as expected
    • Testmagne2 - the snapshot creation fails because it cannot find the files .vmx - as expected
    • Testmagne3 - snapshot is created successfully - as expected

    However, the exit in powercli is slightly different:

    • Testmagne1 - snapshot is created successfully - as expected
    • Testmagne2 - creation of the snapshot fails because it cannot find the files .vmx - as expected
    • Testmagne3 - snapshot fails with the error message: operation is not valid due to the current state of the object - huh?


    Apparently once the first error is generated all succeeding VMs get error "the operation is not valid due to the current state of the object"


    I've been pulling trying to figure this problem on my hair, but I'm not getting anywhere


    Here is some additional information:

    1. the Script (abridged version of it. It generates the same error):

    -STARTUP SCRIPT-

    $ErrorActionPreference = "stop".

    Add-PSSnapin VMware.VimAutomation.Vds, VMware.VimAutomation.Core | Out-Null

    SE connect-VIServer VIRTUALCENTER1, VIRTUALCENTER2 | Out-Null # Sensored VirtualCenter names

    $servers = get-VM-location 'testfolder '.

    $snapshotname = 'Testsnapshot '.

    $verifycreatesnapshot = Read-Host "you are about to create snapshots for $servers. Do you want to continue? o/n.

    If ($verifycreatesnapshot - eq 'y') {}

    Write-Host "snapshots of creation...". »

    {ForEach ($i in $servers)

    Write-Host "instant Creation for $i."

    Try {new-Snapshot - VM $i - name $snapshotname |} Out-Null}

    Catch {$_.exception | select *;} Write-Host "Unable to create the snapshot for $i" ;}

    }

    Write-Host "command finished.

    }

    else {Write-Host "Operation canceled by user"}

    Read-Host "end of the script. Press ENTER to close. "

    ------------------ END SCRIPT -------------------

    2. the PowerCli error messages:

    Error for Testmagne 2 (as expected):

    File: [DATASTORE114] testmagne2/testmagne2.vmx

    DynamicType:

    DynamicPropertyInternal:

    FaultCause:

    FaultMessage:

    ErrorId: Client20_TaskServiceImpl_CheckServerSideTaskUpdates_O

    perationFailed

    ErrorCategory: NotSpecified

    TargetObject:

    RecommendedAction:

    SessionId:

    ConnectionId: /VIServer = SENSORED: 443 /

    Severity: error

    Message: 31/10/2013-10:52:16 New-Snapshot the operat

    ion for the entity 'testmagne2' failed with the follo

    the wing's message: "file [DATASTORE114] testmagne2/testmagn".

    E2.vmx was not found.

    Data: {ParameterValues}

    InnerException: VMware.Vim.VimException: exploitation of the entity

    'testmagne2' failed with the following message: 'thread '.

    testmagne2/testmagne2.vmx e [DATASTORE114] was not crazy

    ND ".

    TargetSite:

    StackTrace:

    HelpLink:

    Source:

    Failed to create the snapshot for testmagne2

    Error for testmagne3:

    Creation of snapshot for testmagne3

    ErrorId: Core_BaseCmdlet_UnknownError

    ErrorCategory: NotSpecified

    TargetObject:

    RecommendedAction: An error occurred when executing command: new-Snapshot. I have check

    f exception for more details.

    SessionId:

    Login ID:

    Severity: error

    Message: 31/10/2013-10:52:17 instant New-capture operation is not

    valid due to the current state of the object.

    Data: {ParameterValues}

    InnerException : System.InvalidOperationException: operation is not valid from

    e to the current state of the object.

    at VMware.VimAutomation.ViCore.Impl.V1.Task.ViCoreTaskCo

    reServiceProviderImpl.BeginTaskCompletionPoll (list 1 taskLi

    St)

    at VMware.VimAutomation.Sdk.Impl.V1.Task.CoreTaskService

    Impl.WaitForTask (IEnumerable 1 taskList, ProgressCallback p

    rogressCallback)

    at VMware.VimAutomation.Sdk.Util10Ps.BaseCmdlet.BaseCmdl

    and. EndProcessingErrorHandled()

    at VMware.VimAutomation.ViCore.Util10Ps.BaseCmdlet.BaseC

    mdlet. EndProcessingErrorHandled()

    TargetSite: Sub ThrowTerminatingError (System.Management.Automation.Err

    orRecord)

    StackTrace: At System.Management.Automation.MshCommandRuntime.ThrowT

    erminatingError (ErrorRecord errorRecord)

    HelpLink:

    Source: System.Management.Automation

    Failed to create the snapshot for testmagne3

    3 PowerCLI version

    PowerCLI Version

    ----------------

    VMware vSphere PowerCLI 5.5 Release 1 build 1295336

    ---------------

    Versions of the snap

    ---------------

    VMWare AutoDeploy PowerCLI component 5.5 build 1262826

    VMWare ImageBuilder PowerCLI component 5.5 build 1262826

    License of VMware PowerCLI component 5.5 build 1265954

    VDS's VMware PowerCLI component 5.5 build 1295334

    VMware vSphere PowerCLI component 5.5 build 1295334


    4 VirtualCenter version

    VMware vCenter Server Version 5.0.0 Build 913577

    vSphere Client Version 5.0.0 Build 913577

    Hosts: VMware ESXi 5.0.0 Build 914586

    If you need additional information, let me know

    Any help is greatly appreciated

    Thank you!

    -Loincloth



    Definition - ErrorAction Stop locally on the cmdlet will not solve the problem. We have found and solved the problem and the fix will be available in the next version. Until then, you can use the $error variable to detect whether the cmdlet was successful or not. You can clear the $error variable before calling the cmdlet and check if it's still empty after the call.

  • With Move-VM error: operation is not valid due to the current state of the object.

    I only started shows after update to PowerCLI v5.1.  My vCenter is v5.0.  I saw this when moving virtual machines to a data store in a different data store cluster.  The task submits to vCenter successfully and ends, but the Move-VM errors and returns control to the script or command line that ran.

    $> Move-VM - VM somevm Datastore - somedatastore - confirm: $false
    Move-VM: 13/11/2012-16:07:45 operation Move-VM is not valid due to the current state of the object.
    On line: 1 char: 1
    + Move-VM VM - somevm - data somedatastore store - confirm: $false
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo: NotSpecified: (:)) [Move-VM], VimException)
    + FullyQualifiedErrorId: Core_BaseCmdlet_UnknownError, VMware.VimAutomation.ViCore.Cmdlets.Commands.MoveVM

    I'm puzzled.

    Do you by chance have a PowerShell v2 available somewhere where you can run the same script?

    As much as I know there no official PS still in PowerCLI v3 support, although there are only a few known minor pitfalls.

    While clutching at straws

  • vmrun start leads to a "error: operation failed because of the current state of the system.

    Hello

    I am running the vmrun like this on the console command.

    / usr/bin/vmrun t CR h https://ourhost/sdk u ouruser Pei ourpwd start ' build001/build001.vmx [datastorename] '.

    I get the error text:

    Error: The operation has failed because of the current state of the system

    When I opened the Vsphere client, I see that the operation began, but also with an error: the operation is not allowed in the current state.

    I'm running on VMWare Vsphere Server Version 4.1.0 Build 258902

    How can I make sure via command line that the State of the system is correct. Is there a way to get corrected through an order status?

    When I try to power to the top of the image within the user interface, it works, but I need to know the opposite effect.

    Thank you.

    Hello and welcome to the forums.

    check via the State of the line of command of this virtual machine if necessary, unblock the process using vmsuport x how to show in this http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004340 Ko

  • The current state of the target is down and it displays red arrow down in OEM 12 c. But in fact the database is running

    Hi all

    my instance of database shows down in OEM 12 c but in fact the database is running and status of the listener is unknown. What steps should I take to make the database appear?

    FYI,.

    The error is:

    The current state of the target is down. (I checked events tab in the incident handler here, it is showing error as "inaccessible agent (reason = unable to connect to the agent to https://sunshine.mad:3872/emd/main / [connection refused]).") host is accessible.

    A week before I made switch to digital, the basics of data, is that this is the reason why it shows this error? do we need to change any configuration after switching to the databases on OEM 12 c. at this point time of the database instance shows down and the listener to the top but suddenly the database and listener went wrong.

    Please help me, give your suggestions in this regard.

    Verify that the agent is in place and suggested downloading like Antonio. For the target of the database, the home page, go to the (Oracle database > Configuration target >) Configuration of the analysis page, check the monitoring parameters are correct and do a test connection. You can check the parameters of surveillance for the target of the listener as well.

    Kind regards

    -Loc

  • Game-CDDrive operation is not valid due to the current state of the object.

    It's been a while, please remind me how to put the code here? PSVersion 5.0.10105.0 VMWare PowerCLI AutoDeploy component 6.0 build 2358282 VMWare ImageBuilder PowerCLI component 6.0 build 2358282 license of VMware PowerCLI component 6.0 build 2315846 VMware vSphere PowerCLI component 6.0 build 2548068 VMware VDS PowerCLI component 6.0 build 2548068 Cloud of VMware Infrastructure Suite PowerCLI component 6.0 build 2548068 VMware HA PowerCLI component 6.0 build 2510422 VMware PowerCLI component Storage Management 6.0 build 2522368 trying to build a server from the ground using Powercli. Started with:

    $paramVM = @{

    VMHost =   $vmhost

    Version =   "v7"

        Name  =   "CompVM"

    Data store = $datastore

    DiskGB =   50

    DiskStorageFormat = "EagerZeroedThick"

    MemoryGB =   4

    NumCpu =   1

    Location =   $Folder

        CD  =   $true

    ResourcePool = $ResourcePool

    PortGroup = $portGroup

    Notes = "DC of DOM"

    Confirm =   $false

    }

    $paramVM . Location | select *

    New-VM @paramVM

    It seemed to go very well.

    Get-VM svr01mid100 | Start-VM

    Then, something isn't quite right.

    $paramNA = @{

    StartConnected =   $true

    WakeOnLan =   $true

    Connected =   $true

        Type  = « Vmxnet3 »

    Confirm =   $false

    }

    Get-VM chi01osm300 | Get-NetworkAdapter | Set-NetworkAdapter @paramNA

    , I get the error: Set-NetworkAdapter: 29/07/2015-18:44:36 Set-NetworkAdapter operation is not valid due to the current state of the object. Online: 9 char: 43 + Get - VM svr01mid100 | Get-NetworkAdapter | Together-NetworkAdapter @paramNA + ~ ~ ~ + CategoryInfo: NotSpecified: (:)) [game-NetworkAdapter], VimException + FullyQualifiedErrorId: Core_BaseCmdlet_UnknownError, VMware.VimAutomation.ViCore.Cmdlets.Commands.VirtualDevice.SetNetworkAdapter MacAddress: 00:10:56:ss:3f:ab WakeOnLanEnabled: true NetworkName: SameAsAbove Type: Vmxnet3 ParentId: VirtualMachine - vm - 108361 Parent: svr01mid100 Uid: /VIServer = Dom\[email protected]: 443/VirtualMachine = VirtualMachine-vm-108361/NetworkAdapter = 4000 / ConnectionState: logged, NoGuestControl, StartConnected ExtensionData: VMware.Vim.VirtualVmxnet3 Id: VirtualMachine-vm-108361/4000 name: NIC 1 Client: VMware.VimAutomation.ViCore.Impl.V1.VimClient )

    Get-VM svr01mid100 | Get-CDDrive | Select Name,IsoPath

    Name IsoPath - CD/DVD drive 1 C:\ PS > Get - VM svr01mid100 | Get-CDDrive. Game-CDDrive - IsoPath $isoPath - StartConnected $true - confirm: $false Set-CDDrive: 29/07/2015-18:50:39 Set-CDDrive operation is not valid due to the current state of the object. I disconnected and then reconnected my session. I tried to see what was going on in vCenter (which I never do) and I fount it tries to start with the ISO, but giving a frown face and reboot again. I think that he did not like something in the build of the server. Help!

    I don't know that I did it is clear enough. The new VM script seems to work, it creates a new virtual machine.

    But eventually, every setting change that I try to do on the virtual machine, I get an error stating that "the operation is not valid due to the current state of the object."

    It seems to take the configuration but then I noticed he tried to start, but it started getting the error that I put in the screenshot.

    To me, that shows that it is trying to boot from the CD, because it is a Windows error.  Moreover, he just trying to start several times.

    Now, I went back and I think that the error "operation is not valid due to the current state of the object" may have been the fact that the VM tried to boot from the CD over and over, this is what is meant by the current state.

    I noticed just here, the hosts have 4.1 on them, which does not support r2 Server 2012.

    I think we're good.  Thank you!

  • Together-NetworkAdapter returning to "operation is not valid due to the current state of the object"

    I'm using fix - up all-NIC in the host servers when a portgroup is renamed.  Demand seems to make the required changes, then crashses.  I don't see any errors in the list recent tasks in vCenter.

    I use the following code:

    Get-VMHost vmware.host | Get - VM | Get-NetworkAdapter | Where {$_.NetworkName - eq "ancien_nom"} |  Together-NetworkAdapter - NetworkName "newname" - confirm: $false
    The error is:
    Together-NetworkAdapter: 17/10/2012 12:16:56 game-card network Operation is not valid due to the current
    State of the object.
    At line: 1 char: 114
    {"+... ancien_nom"} |  Together-NetworkAdapter - NetworkName "newname" - confirm: $false
    +                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo: NotSpecified: (:)) [game-NetworkAdapter], VimException)
    + FullyQualifiedErrorId: Core_BaseCmdlet_UnknownError, VMware.VimAutomation.ViCore.Cmdlets.Commands.VirtualDevice.
    SetNetworkAdapter
    It's using PowerCLI 5.1 Release 1 against vCenter 5.0 and 5.0 ESXi.
    Any ideas how or tell you why it's a failure or repair.
    Thank you
    Iain

    No, you should not be a problem.

    Are you by chance using PowerGui?

    There were references to the exact same message when you use an older version of PowerGui and the PowerPack.

    See New - VM error (operation is not valid due to the current state of the object.)

  • OracleDataReader: Operation is not valid due to the current state of the object

    Hi all

    I am new to using libraries and oracle development tools. I have a project in vb 2010 began when I use the oracleDataReader to read data from my db (10g). by using the following code:

    Oradb As String = "xxxxxxxxxxx".
    Dim conn As New OracleConnection (oradb)
    Conn. Open()

    Dim test (1000) As String
    Dim counter As Integer = 0
    Dim cmd As New OracleCommand

    Connection group conn cmd.
    cmd.CommandText = "table FROM SELECT column where otherColumn > 21 June 11 '.
    cmd.CommandType = CommandType.Text
    Var as OracleDataReader dr = cmd. ExecuteReader()
    Dr. Read()
    test (Counter) = Dr. GetString (0)
    While Dr. Read()
    test (Counter) = Dr. GetString (0)
    Counter = counter + 1
    Loop

    cmd ExecuteReader().
    cmd.CommandText = "SELECT FROM table where otherColumn > 21 June NewColumn 11'"
    Dr. Read()
    test (Counter) = Dr. GetString (0)


    How could change the cmd.CommandText to run new queries? As it is the second command dr.read throws the following error: "operation is not valid due to the current state of the object.

    I found stating an another OracleDataReader object will allow me to run another query, I guess that there is a better way to "reset" State of the object first, as opposed to the creation of any new object each time I need to reset the command text.


    Any ideas are greatly appreciated. Do not forget that I am new to coding, so I know the real C could be cleaned.

    Thank you
    ...
    cmd.CommandText = ""
    dr = cmd.ExecuteReader()
    dr.Read()
    ... etc ...
    

    It will be useful,
    Greg

  • DB Link error: ORA-12154: TNS: could not resolve the connect identifier specified

    Hi all

    We need to make an entry in the tnsname.ora file in a local database to connect to the remote database using db link?

    Here is my code: -.

    create the database link * _DBLINK

    connect to the USER IDENTIFIED BY 'user '.

    using '(DESCRIPTION =)

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP) (HOST = *. *. *. *)(PORT = 1521))

    )

    (CONNECT_DATA = (SERVICE_NAME = REM)

    )';

    After the creation of the DB connection when I'm trying to run select 1 of dual@***_DBLINK

    He throws me an error ORA-12154: TNS: could not resolve the connect identifier specified

    Am I expected to do an entry in the file tnsname.ora for "REM". I don't remember making any changes in the file tnsname.ora for the creation and access of the remote database via dblink.

    Help, please.

    Thanks in advance.

    2925917 wrote:

    Hi all

    We need to make an entry in the tnsname.ora file in a local database to connect to the remote database using db link?

    Here is my code: -.

    create the database link * _DBLINK

    connect to the USER IDENTIFIED BY 'user '.

    using '(DESCRIPTION =)

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP) (HOST = *. *. *. *)(PORT = 1521))

    )

    (CONNECT_DATA = (SERVICE_NAME = REM)

    )';

    After the creation of the DB connection when I'm trying to run select 1 of dual@***_DBLINK

    He throws me an error ORA-12154: TNS: could not resolve the connect identifier specified

    Am I expected to do an entry in the file tnsname.ora for "REM". I don't remember making any changes in the file tnsname.ora for the creation and access of the remote database via dblink.

    Help, please.

    Thanks in advance.

    I've learned to trust in your obfuscation you covered something important, or you are showing some apples and oranges.  Error to declare you come from not being able to find referenced in tnsnames.ora entry, but the way you say you created your link db, you hardcoded the entire connection, so he never users tnsnames.ora.

    I would change the definition of db_link

    create the database link * _DBLINK

    connect to the USER IDENTIFIED BY 'user '.

    using "REM."

    Then create an entry in your tnsnames.ora

    REM =

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP) (HOST = *. *. *. *)(PORT = 1521))

    )

    (CONNECT_DATA = (SERVICE_NAME = REM)

    )

    )

    Also, use server name instead of the HOST = IP address

    The closer looks that you can miss brackets final closing on your original definition.

  • How to get the current state of the son process

    Hello

    If I know that the instance id of a child process.
    How can I get the current state of the child (e.g., completed, running, etc.) process in the code "PBL"?

    Thank you in advance.

    Hello

    Here's a way to display the status of children sub-process engendered by a process parent process creation activity. In this sense, the process id of the subprocedure is "ChildProcess. The id of the activity of creating processes in the parent process that causes the work item instance in the child process called 'SpawnChildren '. This logic is performed from inside the process parent in an activity downstream process creation activity, called "SpawnChildren".

    Display statements have been added just to see you return values (do) their leash not when going into production.

    display "Children: " + children + "\nKeys: " + children.keys + "\nLength: " + length(children) +
    "\nInstance id of child: [" + children["SpawnChildren"] + "]"
    
    if children["SpawnChildren"] = null or children["SpawnChildren"] = "" then
         display "Child is completed"
    else
    
         bp as BusinessProcess
    
         connectTo bp
                         using url = Fuego.Server.directoryURL,
                             user = "test",
                             password = "test",
                             process = "/ChildProcess"
    
         instance as Fuego.Papi.Instance
         instance = getInstance(bp, instance : children["SpawnChildren"])
         logMessage "run Instance: " + instance.id
                          using severity = DEBUG
    
         display "Status: " + instance.status + "; inside the child process in the activity: " + instance.activityName
    
         disconnectFrom bp
    end
    

    I downloaded the project I used this in to http://www.4shared.com/file/130890113/2d825960/ChildrenOfaParent.html.

    Hope this helps,
    Dan

  • How to find the status of the package (valid/invalid) was at one time

    How to find the status of the package (valid/invalid) was at one time?
    I want to find the status of an oracle package to 15:00 yesterday. Today, the status of this package is INVALID.
    I'm sure it was VALID yesterday. But no way to prove it. Can any one help please?
    I can generate AWR report for the last 7 days...

    Try to use a flashback, like this query:

    select object_name, object_type, status
    from dba_objects AS OF TIMESTAMP (SYSTIMESTAMP - INTERVAL '18' HOUR)  -- 18 hours ago
    where object_name = 'MY_OBJECT'
    ;
    

    If you have not granted privs FLASHBACK, you may connect as SYS to make a request flashback on a table data dictionary.
    But this should give you the info you need - if it's still in cancellation.

  • ERROR ORA-12514: TNS: could not start the extraction process

    Hi Experts,

    I have installed Oracle Golden Gate in the slot environment. But failed to start the extraction process

    Main site (source): it is production DB up and running.

    RAC 2 nodes
    Oracle RAC 11.2.0.1.0
    ASM

    Oracle GoldenGate 11g Release 1 (11.1.1.0.0)

    Enterprise Linux Server version 5.5 (Carthage)
    X 64 processor type
    64-bit operating system

    target Site (destination):

    Single stand-alone server - no CARS
    Version 11.2.0.1.0 Oracle
    ASM

    Oracle GoldenGate 11g Release 1 (11.1.1.0.0)

    Enterprise Linux Server version 5.5 (Carthage)
    X 64 processor type
    64-bit operating system

    Getting error in newspapers below while starting the extraction process:
    RECOVERY: reset to initial or altered checkpoint.
    2012-08-05 10:34:10  ERROR   OGG-00868  Oracle GoldenGate Capture for Oracle, aaa.prm:  Attaching to 
    
    ASM server asm: (12514) ORA-12514: TNS:listener does not currently know of service requested in connect 
    
    descriptor.
    2012-08-05 10:34:10  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, aaa.prm:  PROCESS 
    
    ABENDING.
    [oracle @ ggate] $

    Getting error below when connecting with the instance asm directly:
    [oracle@ admin]$ sqlplus sys@asm as sysasm
    
    SQL*Plus: Release 11.2.0.1.0 Production on Sun Aug 5 11:16:11 2012
    
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    
    Enter password:
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor
    
    
    [oracle@ ~]$ tnsping asm
    AMT Ping utility for Linux: Version 11.2.0.1.0 - Production on August 5, 2012 11:55

    : 42

    Copyright (c) 1997, 2009, Oracle. All rights reserved.

    Use settings files:


    TNSNAMES adapter used to resolve the alias
    Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = xxx-

    Scan) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ASM) (I

    NSTANCE_NAME = + ASM1)))
    OK (0 msec)
    Any help Please ?
    
    Regards
    
    LazyDBA
    
    Edited by: LazyDBA11g on Aug 5, 2012 12:14 AM
    
    Edited by: LazyDBA11g on Aug 5, 2012 11:25 PM
    
    Edited by: LazyDBA11g on Aug 12, 2012 4:36 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    It should help you to TRANLOGOPTIONS ASMUSER

    http://oracleabout.blogspot.com/2012/06/GoldenGate-on-ASM-GoldenGate-on-RAC.html

  • get an error to remove and update statement using the escape char

    for the following statement:
    Order of UPDATE
    A DATE = NULL
    WHERE
    circuit AS in_service_id | '------%' ESCAPE ' \'
    AND ord_id = "ORD1."

    getting below error:

    ORA-01424: missing or illegal character that follows the escape character

    any suggestions?

    Assuming that in_service_id is a variable

    The value of the variable can have any value that is having '-' char, this statement will give error.

    This can help.

    Order of UPDATE
    A DATE = NULL
    WHERE
    circuit AS replace(in_service_id,'\','\\') | '------%' ESCAPE ' \'
    AND ord_id = "ORD1."

Maybe you are looking for

  • Gmail question

    With V4.1.2 you are supposed to be able to pinch zoom messages. How do you define this upward.

  • HP 15-r045sr: need some drivers for HP 15-r045sr

    Hello. Please, help me, I need some drivers. Network controller PCI\VEN_1814 & DEV_3290 & SUBSYS_18EC103C & REV_00PCI\VEN_1814 & DEV_3290 & SUBSYS_18EC103CPCI\VEN_1814 & DEV_3290 & CC_028000PCI\VEN_1814 & DEV_3290 & CC_0280 SM Bus controller PCI\VEN_

  • Window Vista Home Premium cd required

    Hello.. I have a laptop HP with Vista home premium. My hard drive went bad. I had to get another drive. My Vista restore disk does not work. How to get an another vista installation disc or even better get a Windows 7 Home premium disc?

  • Brand new G560 - all function keys launch "a recovery key.

    The subject line says it all - whenever I try to use one of the special keys, such as volume-to the high or low volume, instead of the marked task, the lap top throw a key recovery in place. Any suggestions on how to fix this? I'm as Win7 64 bit.

  • I need help bad please

    I have a Toshiba Satellite L655-S5096 laptop. I had this during about 5 years. I did the recovery media that I burned three discs after that I bought new. I used to work on the computers of friends at the time, and a few times I found myself with a b