Powershell: Resetting an instance

Hey guys. I'm trying to figure out how I can reboot an Azure instance. I've connected to Azure using Powershell, but when I use the Reset-AzureRoleInstance command, it keeps telling me no deployment were found. This is the command:
PS C:\> Reset-AzureRoleInstance -ServiceName PROD -Slot Production -InstanceName "PROD.Tasks_IN_0" -reboot
I've copied the name for the service, slot and instancename from the Azure webinterface. However, whatever I try, this is what I get back:
Reset-AzureRoleInstance : ResourceNotFound: No deployments were found.
I've read the documentation about the reset-azureroleinstance command and I'm giving all the required parameters, but I'm still unable to reboot an Azure instance using Powershell. Has anyone ever used this command? What am I missing?

Hi,
From my experience, we need to Set-AzureSubscription and Select-AzureSubscripion first.
# Set-AzureSubscription
http://msdn.microsoft.com/en-us/library/dn408531.aspx
# Select - AzureSubscripion
http://msdn.microsoft.com/en-us/library/dn408494.aspx
Hope this helps.
Regards
Thanks! I've selected another subscription and I was able to reboot the instance which was not responding using the command specified in my first post.
Kinda stupid I didn't see this, even Powershell warns me about it:
VERBOSE: Setting: HA-CTC as the default and current subscription. To view other subscriptions
use Get-AzureSubscription

Similar Messages

  • To get page number reset at instance

    Hello everyone!
    When i having tons of Sale order to print at one time(i am feeding the start NO/end NO to report), i want the page number to be reset at every instance of Sale order but not reset at the whole report as now.
    There is a repeat frame with the source of Sale order query and my page number columns in put in this frame.
    How to do this? Thanks a lot!

    You create a field (in the margin) with source Page Number. On the Page Numbering property, you set the 'Reset at' property to the order repeating frame.

  • Powershell to get instance name

    Hi,
    Not sure whether this is the forum to ask.I have a list of servers names and i need to get the instance names in below format.
    SERVERNAME\INSTANCE1
    The o/p of the script actually shows Servername,MSSQL$Instance name..Anyway to tweak this to SERVERNAME\INSTANCE1?
    $servers = get-content "C:\SQLCheck\machinelist.txt"
    $logfile = "C:\SQLCheck\sql-instances.txt"
    $logerrs = "C:\SQLCheck\sql-failures.txt"
    Echo "Server, Instance" >> $logfile
    ForEach ($server in $servers) {
    $instances = Get-WmiObject -ComputerName $server win32_service | where {$_.name -like "MSSQL*"}
    if (!$?) {
    Echo "$server - No SQL instance found" >> $logerrs
    Echo "$server - No SQL instance found"
    Else {
    ForEach ($instance in $instances) {
    if (($instance.name -eq "MSSQLSERVER") -or ($instance.name -like "MSSQL$*")) {
    Echo "$server\$instance.name" >> $logfile
    Echo "$server, $($instance.name)"
    Best Regards, Arun http://whynotsql.blogspot.com/

    Hi,
    Use the sqlcmd -L command:
    $SqlCmd = "sqlcmd -L "
    Invoke-Expression $SqlCmd
    sqlcmd Utility
    http://technet.microsoft.com/en-us/library/ms162773.aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Can java action = java:usebean reset an instance creation ?

    Hello,
    I'm new to JSP and I tried to create this web application which simply echoes user request info back.
    The helper class User is defined as :
    package com.apress.faq;
    public class User {
    private String firstName;
    private String surname;
    private String loginName;
    private int age;
    public String getFirstName() {return firstName;}
    public void setFirstName(String newFirstName) {this.firstName = newFirstName; }
    public String getSurname() {return surname; }
    public void setSurname(String newSurname) {surname = newSurname; }
    public String getLoginName(){return loginName;}
    public void setLoginName(String newLoginName) {loginName = newLoginName;}
    public int getAge(){return age;}
    public void setAge (int newAge) {age = newAge;}
    The welcome.jsp file first displays a form for the user to enter their first name, surname, login and age. The form then passes the request to "processing_page.jsp" which looks like this (NB. I have only included a fragment):
    <%
    if((user.getFirstName() == null)||(user.getSurname()==null)||(user.getLoginName()== null)||(user.getAge()== 0) ) {
    %>
    <p> You have not filled out the registration form parameters.<p>
    <br><p> Please return to the welcome page and fill out the required
    information.<p>
    <%
    } else {
    %>
    <jsp:forward page ="welcome.jsp">
    <jsp:param name="form_complete" value="true"/>
    </jsp:forward>
    <%
    %>
    It appears to work fine, for the most part if the information for the form is entered correctly the first time, but what I', finding is that if I don't place all the values into the form I correctly get redirected to the code which states that the registration form has not been completed, sent back to welcome.jsp, but for some reason, the "user" attributes don't change value. Can a instance created by a JSP Action not change ? It doesn't seem to want to pick up the new values in the form when resubmitted.

    OMG...
    loko, Actually i was in telecom technology for more
    than an year and implemented an application, Which
    will contain the feature "Containment", about which
    you understood correctly.Actually I worked in telecom for several years, prolly most people have at some point, and that has nothing to do with anything. I don't know what you mean by "the feature containment" in this context.
    I can do work around for that in java.
    But i wanted to know in latest java version ,
    Is there any ready feature like Containment?
    It seems that there is no ready feature like that.Work around what? What on earth do you mean? Are you talking about composition? About containers as in Collections? Are you having a laugh? Again with the guessing.
    I want to try and help you, but this is my last attempt:
    1) Is your question simply "how do I give class A a member field of type reference to class B"? If so, I suggest you read some beginner's tutorials. (The same way you declare fields of primitive type.)
    2) Describe the problem precisely, in normal terms. As in: "here's a couple Books, here's my BookContainer, here's what I want to do, and this is the problem I have".
    Along with this description, post the (relevant parts of the) code you already have, using [ code ] tags.

  • PS2013 - When creating a new instance of Project Server hangs in 'Waiting for resources' status

    Hi,
    I have one instance of Project Server 2013 fully operational and I tried to duplicate the instance to make some tests. As I know the issue of using the same Content Database of Project Server in the same Server Farm, I used the powershell  backup/restore/dismount
    and mount the content database to change the site IDs to avoid index duplication. The Project server database was a regular SQL backup and restore in another database.
    I created a new Web App in the port 90 as show below.
    Then I included the Content database of Project Server as separated DB from SharePoint for this new SharePoint -acme90 and I tried to create the new instance. The creation hanged in "Waiting for Resources" status.
    To make another check excluding the reuse of the SharePoint-80 I tried to create another instance both in the SharePoint-80 where is the working instance and in the SharePoint-90, everything default and again they all hanged in Waiting for Resource.
    If I try to create the instance using PowerShell I got the following error:
    PS C:\Users\epm_setup> Mount-SPProjectWebInstance -DatabaseName Test_EPM -SiteCo
    llection http://acme02/epm -Lcid 1046
    Mount-SPProjectWebInstance : Cannot find an SPSite object with Id or Url:
    http://acme02/epm.
    At line:1 char:1
    + Mount-SPProjectWebInstance -DatabaseName Test_EPM -SiteCollection
    http://acme02/ ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~
        + CategoryInfo          : InvalidData: (Microsoft.Offic...ountPwaInstance:
       PSCmdletMountPwaInstance) [Mount-SPProjectWebInstance], SPCmdletPipeBindEx
      ception
        + FullyQualifiedErrorId : Microsoft.Office.Project.Server.Cmdlet.PSCmdletM
       ountPwaInstance
    All SharePoint and Project Server services are running, all App Pools and sites are started at the IIS. I could not find a hanging timer job.
    I cannot stop the hanged process or dismount the instances using Powershell since no instance created.
    How should I solve the hanging status of creation of the instance? As they are in Hyper-V I can go back using one snapshot.
    Thank you.
    Best regards, Ricardo Segawa - Segawas Projetos / Microsoft Partner

    Hi Eric,
    Thank your for your interest in this case.
    I checked for running and crashed PWA jobs and deleted all of them just after restoring the snapshot and tried to create the new instance in the new web app in port 90 (besides the existing and working instance in port 80), but again it hanged in "waiting
    for resources". There is not any timer job hanging, no error in event viewer or in log. So the error is well before working with cloned dbs.
    Answering your questiion, I am working all on 2013. My intention is backup one instance of the port 80 and copy to the instance of port 90, changing of course the url and the index of the content db of SharePoint. The process I used was:
    Create a new web app in port 90, creating a new SharePoint_Content_2 on a
    http://server:90 site.
    Created the top level site called Portal using the Team Site template.
    Create a new content db for new instance of Project Server named EPM_Content_2 using Central Admin.
    Backup content db from port 80 instance of Project Server and restore to this EPM_content_2 using PowerShell cmd.
    Dismounted and mounted this Project Server content db to create new index for existing sites to avoid index conflicts.
    Backup the Project Server DB from port 80 using SQL backup and restored as ProjectWebApp2 db for port 90 instance.
    Tried to create a new instance of Project Server
    http://server:90/pwa on web app of port 90 using the ProjectWebApp2 db and using the same app pool of the other instance. But as in the previous case, it hang out in "Waiting for resources".
    Best regards, Ricardo Segawa - Segawas Projetos / Microsoft Partner

  • Issue with Enterprise Manager 11g

    When I start the db console I am given the message
    Enterprise Manager is not able to connect to the database instance, The state of the components are listed below.
    All components are listed with green arrows indicating they are up
    After reading a few posts here I have attempted to use EMCA to drop and re create the repository and settings
    I have run the command 'emca -deconfig dbcontrol db -repos drop' to try and do this but it just hangs
    Looking in the logs I can see the follow (only the last few lines added to keep it short)
    emca_2011_08_05_14_17_29 -
    CONFIG: Setting param: REP_DB_RUNNING_HOST value: RangePlanTest.gooutdoors.local
    Aug 5, 2011 2:17:56 PM oracle.sysman.emcp.ParamsManager getRepDbPort
    CONFIG: Listener Port: 1521
    Aug 5, 2011 2:17:56 PM oracle.sysman.emcp.util.GeneralUtil isLocalConnectionRequired
    CONFIG: isLocalConnectionRequired: true
    Aug 5, 2011 2:17:56 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
    CONFIG: isLocalConnectionRequired: true. Connecting to database instance locally.
    Aug 5, 2011 2:17:56 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
    CONFIG: SQLEngine connecting with SID: godw, oracleHome: C:\app\server\product\11.2.0\dbhome_2, and user: SYSMAN
    Aug 5, 2011 2:17:57 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
    CONFIG: SQLEngine created successfully and connected
    Aug 5, 2011 2:17:57 PM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
    CONFIG: Passed listener validation check.Listener is up and running.
    Aug 5, 2011 2:17:57 PM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Dropping the EM repository (this may take a while) ...
    Aug 5, 2011 2:17:57 PM oracle.sysman.emcp.util.PlatformInterface isInView
    CONFIG: IN_VIEW marker not instantiated in C:\app\server\product\11.2.0\dbhome_2\sysman\config\emca.properties
    Aug 5, 2011 2:17:57 PM oracle.sysman.emcp.ParamsManager getParam
    CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
    Aug 5, 2011 2:17:57 PM oracle.sysman.emcp.util.PlatformInterface getEnvProps
    CONFIG: Returning env array from cache
    Aug 5, 2011 2:17:57 PM oracle.sysman.emcp.util.PlatformInterface getSortedEnvArray
    +CONFIG: New Env List: [ALLUSERSPROFILE=C:\ProgramData, APPDATA=C:\Users\server\AppData\Roaming, CLASSPATH=C:\app\server\product\11.2.0\dbhome_2\jlib\emca.jar;C:\app\server\product\11.2.0\dbhome_2\jlib\srvm.jar;C:\app\server\product\11.2.0\dbhome_2\jlib\srvmasm.jar;C:\app\server\product\11.2.0\dbhome_2\jlib\cvu.jar;C:\app\server\product\11.2.0\dbhome_2\jlib\emConfigInstall.jar;C:\app\server\product\11.2.0\dbhome_2\jlib\ldapjclnt11.jar;C:\app\server\product\11.2.0\dbhome_2\jlib\ldap.jar;C:\app\server\product\11.2.0\dbhome_2\jlib\share.jar;C:\app\server\product\11.2.0\dbhome_2\jlib\srvmhas.jar;C:\app\server\product\11.2.0\dbhome_2\jlib\netcfg.jar;C:\app\server\product\11.2.0\dbhome_2\jlib\http_client.jar;C:\app\server\product\11.2.0\dbhome_2\lib\http_client.jar;C:\app\server\product\11.2.0\dbhome_2\lib\xmlparserv2.jar;C:\app\server\product\11.2.0\dbhome_2\assistants\jlib\assistantsCommon.jar;C:\app\server\product\11.2.0\dbhome_2\sysman\jlib\emCORE.jar;C:\app\server\product\11.2.0\dbhome_2\sysman\jlib\emagentSDK.jar;C:\app\server\product\11.2.0\dbhome_2\oui\jlib\OraInstaller.jar;C:\app\server\product\11.2.0\dbhome_2\oui\jlib\OraPrereq.jar;C:\app\server\product\11.2.0\dbhome_2\inventory\prereqs\oui\OraPrereqChecks.jar;C:\app\server\product\11.2.0\dbhome_2\oui\jlib\OraPrereqChecks.jar;, COMMONPROGRAMFILES=C:\Program Files\Common Files, COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files, COMMONPROGRAMW6432=C:\Program Files\Common Files, COMPUTERNAME=RANGEPLANTEST, COMSPEC=C:\Windows\system32\cmd.exe, EMCA_JAR=C:\app\server\product\11.2.0\dbhome_2\jlib\emca.jar, FP_NO_HOST_CHECK=NO, HOMEDRIVE=Z:, HOMEPATH=\, HOMESHARE=\\kryten\gooutdoors\users\server, JRE_JAVA=C:\app\server\product\11.2.0\dbhome_2\jdk\jre\bin\java, LIB_DIR=C:\app\server\product\11.2.0\dbhome_2\jlib, LOCALAPPDATA=C:\Users\server\AppData\Local, LOGONSERVER=\\RIMMER, NUMBER_OF_PROCESSORS=4, OH=C:\app\server\product\11.2.0\dbhome_2, ORACLE_HOME=C:\app\server\product\11.2.0\dbhome_2, ORACLE_SID=godw, OS=Windows_NT, PATH=C:\app\server\product\11.2.0\dbhome_2\bin;C:\app\server\product\11.2.0\dbhome_2\bin;C:\Program Files\HP\NCU;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\, PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC, PROCESSOR_ARCHITECTURE=AMD64, PROCESSOR_IDENTIFIER=Intel64 Family 15 Model 4 Stepping 1, GenuineIntel, PROCESSOR_LEVEL=15, PROCESSOR_REVISION=0401, PROGRAMDATA=C:\ProgramData, PROGRAMFILES=C:\Program Files, PROGRAMFILES(X86)=C:\Program Files (x86), PROGRAMW6432=C:\Program Files, PROMPT=$P$G, PSMODULEPATH=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\, PUBLIC=C:\Users\Public, SESSIONNAME=Console, SYSTEMDRIVE=C:, SYSTEMROOT=C:\Windows, TEMP=C:\Users\server\AppData\Local\Temp\1, TMP=C:\Users\server\AppData\Local\Temp\1, USERDNSDOMAIN=GOOUTDOORS.LOCAL, USERDOMAIN=GOOUTDOORS, USERNAME=server, USERPROFILE=C:\Users\server, WINDIR=C:\Windows, WINDOWS_TRACING_FLAGS=3, WINDOWS_TRACING_LOGFILE=C:\BVTBin\Tests\installpackage\csilogfile.log]+
    Aug 5, 2011 2:17:57 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
    CONFIG: Starting execution: CMD /C C:\app\server\product\11.2.0\dbhome_2\sysman\admin\emdrep\bin\RepManager.bat -connect (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RangePlanTest.gooutdoors.local)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=GODW))) -repos_user SYSMAN -action drop -verbose -output_file C:\app\server\cfgtoollogs\emca\GODW\emca_repos_drop_2011_08_05_14_17_57.log
    emca_repos_drop_2011_08_05_14_17_57 -
    SQL> declare
    2 l_username varchar2(30);
    3 l_sid number;
    4 l_serial number;
    5 err number;
    6 c number;
    7 l_job_process_count NUMBER ;
    8 TYPE TBSP_ARRAY IS TABLE OF VARCHAR2(64) INDEX BY BINARY_INTEGER ;
    9 l_tablespaces TBSP_ARRAY;
    10
    11
    12      PROCEDURE set_job_process_count(p_count IN NUMBER)
    13      IS
    14      BEGIN
    15      --scope=memory so it will be reset on instance startup
    16      -- SID=* to take care of RAC
    17      IF p_count >=0
    18      THEN
    19      EXECUTE IMMEDIATE 'ALTER SYSTEM SET job_queue_processes='
    20                ||p_count||' SID=''*''' ;
    21      END IF ;
    22      EXCEPTION WHEN OTHERS THEN NULL ;
    23      END set_job_process_count ;
    24
    25      FUNCTION get_job_process_count
    26      RETURN NUMBER
    27      IS
    28      l_value NUMBER ;
    29      BEGIN
    30      SELECT value
    31      INTO l_value
    32      FROM v$parameter
    33      WHERE name = 'job_queue_processes' ;
    34      RETURN(l_value) ;
    35      EXCEPTION
    36      WHEN OTHERS THEN
    37      RETURN(10) ;
    38      END get_job_process_count ;
    39 begin
    40      -- Now, drop the SYSMAN user
    41      c := 0;
    42      -- validate user exists
    43      BEGIN
    44      SELECT username
    45      INTO l_username
    46      FROM dba_users
    47      WHERE username = upper('&EM_REPOS_USER') ;
    48      EXECUTE IMMEDIATE 'ALTER USER '||l_username||' ACCOUNT LOCK' ;
    49      EXCEPTION
    50      WHEN NO_DATA_FOUND THEN RETURN ;
    51      END ;
    52      -- reduce job_queue_processes to zero
    53      l_job_process_count := get_job_process_count ;
    54      set_job_process_count(0) ;
    55      begin
    56      loop
    57      BEGIN
    58      LOOP
    59           BEGIN
    60           FOR crec in (SELECT sid, serial#
    61                     FROM gv$session
    62                     WHERE (upper(username)=l_username OR
    63                          upper(schemaname)=l_username)
    64                     AND status != 'KILLED')
    65           LOOP
    66           BEGIN
    67                EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION IMMEDIATE ''' ||
    68                          crec.sid || ',' || crec.serial# || '''';
    69           EXCEPTION
    70                WHEN OTHERS THEN
    71                err := SQLCODE;
    72                IF err != -30 THEN
    73                     EXIT;
    74                END IF;
    75           END;
    76           commit;
    77           END LOOP;
    78           EXCEPTION
    79           WHEN OTHERS THEN
    80           err := SQLCODE;
    81           IF err != -30 THEN
    82                EXIT;
    83           END IF;
    84           END;
    85           IF SQL%NOTFOUND THEN
    86           EXIT;
    87           END IF;
    88           commit;
    89      END LOOP;
    90
    91      -- >> START - Capturing the Tablespaces to be dropped
    92
    93      for crec in (SELECT DISTINCT TABLESPACE_NAME FROM all_tables
    94                WHERE owner = '&EM_REPOS_USER' AND table_name IN ('MGMT_TARGETS','MGMT_JOB_PARAMETER','MGMT_AUDIT_DATA')
    95                MINUS
    96                SELECT DISTINCT TABLESPACE_NAME FROM all_tables
    97                WHERE owner != '&EM_REPOS_USER')
    98           LOOP
    99           l_tablespaces(l_tablespaces.count) := crec.tablespace_name;
    100           END LOOP;
    101
    102      -- >> END - Capturing the Tablespaces to be dropped
    103
    104      execute immediate 'drop user ' || l_username || ' cascade';
    105      set_job_process_count(l_job_process_count) ;
    106
    107      -- >> START - Dropping the Tablespaces
    108      BEGIN
    109           IF (l_tablespaces.count > 0) THEN
    110           FOR i IN l_tablespaces.FIRST .. l_tablespaces.LAST
    111                LOOP
    112                BEGIN
    113                execute immediate 'drop tablespace ' || l_tablespaces(i) || ' including contents';
    114                exception
    115                when NO_DATA_FOUND then
    116                DBMS_OUTPUT.PUT_LINE('DropRep: Tablespaces for REPOS USER do not exist');
    117                WHEN OTHERS THEN
    118                err := SQLCODE;
    119                DBMS_OUTPUT.PUT_LINE('DropRep: Error ' || SQLCODE || ' received dropping tablespace ' || l_tablespaces(i));
    120                END;
    121                END LOOP;
    122           ELSE
    123           DBMS_OUTPUT.PUT_LINE('NO TABLESPACES Exist');
    124           END IF;
    125      END;
    126      -- >> END - Dropping the Tablespaces
    127
    128      exit;
    129
    130      EXCEPTION
    131           WHEN NO_DATA_FOUND THEN
    132           exit;
    133           WHEN OTHERS THEN
    134           err := SQLCODE;
    135           IF err = -1918 THEN
    136           EXIT;
    137           ELSE
    138           IF err = -1940 THEN
    139                NULL;
    140           ELSE
    141                DBMS_OUTPUT.PUT_LINE('not 1940 err' || err);
    142                c := c+1;
    143                IF c > 50 THEN
    144                RAISE;
    145                END IF;
    146           END IF;
    147           END IF;
    148      END;
    149      end loop;
    150      end;
    151      commit;
    152 EXCEPTION
    153 WHEN OTHERS THEN
    154 set_job_process_count(l_job_process_count) ;
    155 RAISE ;
    156 end;
    157 /
    old 47:     WHERE username = upper('&EM_REPOS_USER') ;
    new 47:     WHERE username = upper('SYSMAN') ;
    old 94:          WHERE owner = '&EM_REPOS_USER' AND table_name IN ('MGMT_TARGETS','MGMT_JOB_PARAMETER','MGMT_AUDIT_DATA')
    new 94:          WHERE owner = 'SYSMAN' AND table_name IN ('MGMT_TARGETS','MGMT_JOB_PARAMETER','MGMT_AUDIT_DATA')
    old 97:          WHERE owner != '&EM_REPOS_USER')
    new 97:          WHERE owner != 'SYSMAN')
    Sorry for the long post but any help would be great

    As a bit of further info I noticed these warnings when running the command - emca -deconfig dbconrtol db -repos drop
    Do you wish to continue? [yes(Y)/no(N)]: Y
    Aug 5, 2011 4:26:26 PM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at C:\app\server\cfgtoollogs\emca\GODW\emca_2011_08_05_16_25_58.log.
    Aug 5, 2011 4:26:27 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
    INFO: Stopping Database Control (this may take a while) ...
    Aug 5, 2011 4:26:28 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
    WARNING: Error executing CMD /C C:\app\server\product\11.2.0\dbhome_2\bin\nmesrvops.exe delete OracleDBConsoleGODW
    Aug 5, 2011 4:26:32 PM oracle.sysman.emcp.EMReposConfig invoke
    WARNING: Unable to remove DBMS jobs.
    Aug 5, 2011 4:26:33 PM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Dropping the EM repository (this may take a while) ...

  • How to clear a private static class attribute once it's been created?

    <pre>I'm working with an instance of a complex Class object that has been created using the function module <br>HRXSS_CAT_APPLICATION_INIT. The Class object that I am trying to work with is<br> CL_XSS_CAT_BUSINESS_LAYER and in particular its Static Private component attribute PROFILE.<br>
    The issue that I am having is that the first call of this function module creates and populates the Static Private component attribute, <br>PROFILE, for the instance of this Class and I do not know how to initialize it once it's been created. The PROFILE attribute is an <br>object reference to an instance of Class CL_XSS_CAT_PROFILE. <br>
    I want to reset/intialize this Static Private component. I can then call a Class Method with<br> different parameters so that it repopulates PROFILE with different attributes. <br>There is no Public method to do this in CL_XSS_CAT_BUSINESS_LAYER and even the Private method<br> INIT_PROFILE, the logic first checks to see if the PROFILE component is initial before creating a new PROFILE<br> object instance. All the Attributes of the CL_XSS_CAT_PROFILE object are Static and Private.
    <br>
    I would appreciate any insight anyone might have in how to reset/initialize this Class component attribute.<br><br>
    Thanks much,<br>
    <br>
    Graham<br>
    Sample code snippet is as follows:
    <br><br>
    DATA: lr_cats_application_rfc TYPE REF TO IF_XSS_CAT_APPLICATION_RFC,
    lr_core TYPE REF TO IF_XSS_PT_APPLICATION_CORE,
    lr_core TYPE REF TO CL_XSS_CAT_1_APPLICATION_CORE,
    lr_instance TYPE REF TO CL_XSS_CAT_APPLICATION,
    lr_business_layer TYPE REF TO CL_XSS_CAT_BUSINESS_LAYER,
    lr_profile TYPE REF TO CL_XSS_CAT_PROFILE,
    lr_profile_temp TYPE REF TO cl_xss_cat_profile.
    DATA: l_employee TYPE pernr_d.
    DATA: l_employee_tab TYPE rhxss_cat_employee_t.
    CASE im_command.
    WHEN 'DATESELECTION_PRVPERIOD'.
    *-> navigate to object component reference for CL_XSS_CAT_PROFILE instance
    lr_cats_application_rfc = im_ref_to_parameter_cache->REF_TO_APPLICATION.
    *-> navigate to object component reference for CL_XSS_CAT_1_APPLICATION_CORE
    lr_core ?= lr_cats_application_rfc->get_core( ).
    *-> navigate to object component reference for CL_XSS_CAT_BUSINESS_LAYER
    lr_business_layer = lr_core->business_layer.
    *-> navigate to object component reference for CL_XSS_CAT_PROFILE
    lr_profile = lr_business_layer->get_profile( ).
    l_employee = im_ref_to_parameter_cache->pernr.
    append l_employee to l_employee_tab.
    <br><br>
    *THIS IS WHERE I AM HAVING ISSUES...I WOULD LIKE TO CLEAR/INITIALIZE THE STATIC PRIVATE COMPONENT<br> LR_BUSINESS_LAYER->PROFILE BEFORE CALLING THE METHOD INITIALIZE_FOR_TIME_RECORDING<br>
    <br>
    <br><br>*THE FOLLOWING LINE FAILS ON A SYNTAX CHECK WITH 'FIELD "PROFILE" IS UNKNOWN. IT IS NEITHER IN <br>ONE OF THE *SPECIFIED TABLES NOR DEFINED BY A "DATA" STATEMENT
    <br>
    clear: lr_business_layer->profile.
    CALL METHOD lr_business_layer->initialize_for_time_recording
    EXPORTING
    im_employee_tab = l_employee_tab
    im_profile_id = 'MODAPPR1'
    im_startdate = sy-datum
    EXCEPTIONS
    pernr_not_enqueued = 1
    no_pernr_for_user_found = 2
    profile_not_found = 3.</pre>
    Edited by: Matt on Aug 1, 2009 12:44 PM

    OK...I apologize but I did not dig deep enough to see that the Enhancement Framework allows for the addition of Methods to Classes/Interfaces. Most of this ABAP OO stuff is still quite new to me so I'm struggling with syntax and what is and isn't possible based on how everything is declared. I guess now that I know I can do this I am having some problems understanding how singleton Class objects work and how to 'reset' them.
    The Class instance based on CL_XSS_CAT_BUSINESS_LAYER has a Static Private attribute PROFILE that is an object reference to the singleton Class instance CL_XSS_CAT_PROFILE.
    The singleton Class instance of CL_XSS_CAT_PROFILE has all of its attributes set to Static Private. If you look at this Class in SE80 you see that one of its attributes is also called PROFILE and is an object reference variable to itself.
    So the issue I am having is how to go about 'initializing' this singleton object so that I can 'recreate' this singleton object using a copy of the existing S
    I used the enhancement framework to create a copy of the CL_XSS_CAT_BUSINESS_PROFILE Instance Private Method INIT_PROFILE , called in INIT_PROFILE2, but I am not sure how to 'clear/reset' the instance of the CL_XSS_CAT_PROFILE object.
    Since PROFILE is an attribute of the CL_XSS_BUSINESS_LAYER object, I thought that a simple CLEAR PROFILE would reset the object but this is not the case. Within this method the FREE clears the value of the reference variable PROFILE but as soon as you step into the method me->init_profile, the value of PROFILE goes back to what it was. I need for all of the CL_XSS_CAT_PROFILE instance attributes to be reset or initialized so I can fill them again. I think I'm getting confused on the scope of things...should I be enhancing the CL_XSS_CAT_PROFILE Class with 'setter' methods so I can initialize all of the Static Private attributes that way instead of trying to clear all the attributes at a higher call level?
    Any assistance with helping me with my thought process or approach to this would be much appreciated.
    METHOD INIT_PROFILE2.
    FREE PROFILE.  >>> is reset but it does not carry through to next method call and does not clear all the attributes of the object referenced in PROFILE
    CALL METHOD me->init_profile
    EXPORTING
    IM_PROFILE_ID = im_profile_id
    etc...

  • Any body know about Authority interface?

    Dear all,
    in the GlobalPlatform_Card_API_org.globalplatform_1.5, Authority interface has below information
    public interface Authority
    extends javacard.framework.Shareable
    This interface provides services to recover a cryptographic key and to sign data. The CASD shall publish this interface to the OPEN, using Global Service interface, to make its services available to other Applications. The APSD is the first entity requiring this service from the CASD as shown in 2.1. There is only one CASD inside the card. The CASD shall register this service as a unique Global Service with the service family identifier =’83’ (per section 8.1.3 of GlobalPlatform Card Specification v2.2).
          The Authority interface is responsible for signing and verifying message with a key implicitly known. The implementer of this interface has the knowledge of the keys used for the different operations.
    Since:
        export file version 1.2
    Field Summary
    static byte      MODE_KEY_RECOVERY
              Used in init() methods to indicate key recovery mode.
    static byte      MODE_SIGN
              Used in init() methods to indicate signature sign mode.
    Method Summary
    void      init(byte theMode)
              Initializes the Authority interface with the appropriate mode (MODE_SIGN or MODE_KEY_RECOVERY).
    short      recoverKey(byte[] inBuff, short inOffset, short inLength, byte[] outBuff, short outOffset)
              Recovers a cryptographic key from a set of data structures provided in the input buffer (inBuff).
    short      sign(byte[] inBuff, short inOffset, short inLength, byte[] sigBuff, short sigOffset)
              Generates the signature of all/last input data.
    void      update(byte[] inBuff, short inOffset, short inLength)
              Accumulates input data. for the current operation (MODE_SIGN or MODE_KEY_RECOVERY).
    Method Detail
    init
    void init(byte theMode)
              throws javacard.security.CryptoException
        Initializes the Authority interface with the appropriate mode (MODE_SIGN or MODE_KEY_RECOVERY).
        Parameters:
            theMode - one of MODE_SIGN or MODE_KEY_RECOVERY
        Throws:
          # javacard.security.CryptoException - with the following reason code: ILLEGUAL_VALUE if theMode option is an undefined value
    sign
    short sign(byte[] inBuff,
               short inOffset,
               short inLength,
               byte[] sigBuff,
               short sigOffset)
               throws javacard.security.CryptoException
        Generates the signature of all/last input data. A call to this method resets this Authority interface to the state it was in when previously initialized via a call to init(). That is, the object is reset and available to sign another message. The input and output buffer may overlap and shall be global arrays.
        Parameters:
            inBuff - the input buffer of data to be signed
            inOffset - the offset in input buffer at which the signature starts
            inLength - the byte length to sign
            sigBuff - the output buffer to store signature data
            sigOffset - the offset into sigBuff at which to begin signature generation
        Returns:
            the number of bytes of signature output in sigBuff
        Throws:
          # javacard.security.CryptoException - with the following reason codes: INVALID_INIT if this Authority interface is not initialized or initialized in MODE_KEY_RECOVERY mode.
          # ILLEGAL_USE if this Authority algorithm does not pad the message and the message is not block aligned.
            java.lang.SecurityException - if the inBuff or sigBuff are not global array.
    update
    void update(byte[] inBuff,
                short inOffset,
                short inLength)
                throws javacard.security.CryptoException
        Accumulates input data. for the current operation (MODE_SIGN or MODE_KEY_RECOVERY).
        When this method is used, temporary storage of intermediate results is required. This method should only be used if all the input data required for the current operation is not available in one byte array. The sign or recoverKey methods are recommended whenever possible. The inBuff shall be global array.
        Parameters:
            inBuff - buffer containing input data
            inOffset - offset of input data
            inLength - length of input data
        Throws:
          # javacard.security.CryptoException - with the following reason codes: INVALID_INIT if this Authority interface is not initialized.
            java.lang.SecurityException - if the inBuff is not global array.
    recoverKey
    short recoverKey(byte[] inBuff,
                     short inOffset,
                     short inLength,
                     byte[] outBuff,
                     short outOffset)
                     throws javacard.security.CryptoException
        Recovers a cryptographic key from a set of data structures provided in the input buffer (inBuff). As a mandatory step, the recovery mechanism includes the verification of the origin and integrity of the recovered key. This method knows, from the set of data structures present in the input buffer, which recovery mechanism is to be used. The recovered key is written in the ouput buffer (outBuff) at specified offset (outOffset), in the form of a key data structure whose format depends on the type of the key. A call to this method resets this instance of the Authority interface to the state it was in when previously initialized via a call to init(). That is, the object is reset and available to recover another key. The input and output buffers may overlap and shall be global arrays.
        Parameters:
            inBuff - containing input data.
            inOffset - offset of input data.
            inLength - length of input data.
            outBuff - the buffer where recovered key data structure shall be written
            outOffset - offset where recovered key data structure shall be written
        Returns:
            Length of the recovered key data structure written in outBuff at outOffset,or 0 if the recovery mechanism failed (e.g. recovered key was considered invalid).
        Throws:
          # javacard.security.CryptoException - - with the following reason codes: INVALID_INIT if this Authority interface is not initialized or initialized in MODE_SIGN mode.
            java.lang.SecurityException - if the inBuff or outBuff are not global array.As my knowledge, to use above method of Authority interface, the applet should extends the Authority interface and implement those method above.
    i want to validate above methods, but i still dont understand what should i do to validate above methods. Can any body tell me?
    Thanks

    /* Copyright (c) EJP Retirement Fund, 2007. All rights reserved. */
    public class HeakingException extends Exception
    public interface Heakable
    void heak(Object ... args) throws HeakingException;
    public abstract class AbstractHeakable implements Heakable
    public class HeakableImpl extends AbstractHeakable
      public void    heak(Object ... args) throws HeakingException
          System.out.println("Consider yourself heaked!");
    // and not forgetting the factory pattern
    public abstract class AbstractHeakableFactory
      public static AbstractHeakableFactory getInstance()
        return new HeakableFactoryImpl();
      public abstract Heakable createHeakable();
    class HeakableFactoryImpl extens AbstractHeakableFactory
      public Heakable createHeakable()
         return new HeakableImpl();
    }

  • Toolbar of ALV hierachy tree cumulates separators at the end

    Hi all,
    I'm using an ALV hierarchy tree on a dynpro with dynamic subscreens, where each subscreen adds one or two buttons to the standard ALV toolbar. These buttons are separated by a separator. Now the user can reset the screen with the subscreen and in this case the buttons are deleted.
    Adding the buttons and deleting the buttons work fine except that there's still a separator remaining at the end of the toolbar. If I repeat the operation, there are two separators at the end and so one.  What more, the separators are not in table M_TABLE_BUTTON.
    What am I missing here ?
    Thank for your every provided answer or help ...

    While googling I came across this method [CL_GUI_CFW=>UPDATE_VIEW|http://help.sap.com/saphelp_nw04/helpdata/en/e0/9424f7f16e11d2bdd8080009b4534c/content.htm] of the control framework class. Honestly i have never tried this method!
    Maybe u can try this. Try calling this method at the right place after u reset an instance.
    - Jose

  • Problem installing Flash via SCCM 2012

    Hoping someone can help. We are currently pushing Flash, version 12.0.0.70 company wide to Windows 7 laptops. For half of the users it installs just fine. The other half SCCM reports failed to install. When looking at the laptop it has both the old version and the new version of Acitve X and the Plugin. For some reason it doesnt remove the older version and then SCCMS detects it as failed. Im not sure why its only happending to half of our computers but I need to figure this out soon. Any ideas or suggestions?!?!?!

    Hi,
    If you don't use Unknwon Computer support in SCCM the computer must be known in SCCM either with MAC Address or UUID and be added to a collection with a Task Sequence deployed to it, so there is really no need for a filter in that scenario you
    have it already in the product.
    Yes you can use a powershell script for instance to create the computer in SCCCM with MAC address/UUID, if you don't use the AD Computer Account or any other prestaging, you can let SCCM create that for you as well.
    This example script will import a computer into a specific Collection as well so no need for the computername prompt either.
    http://www.david-obrien.net/2012/07/import-computer-to-configuration-manager-2007-2012/
    Regards,
    Jörgen
    -- My System Center blog ccmexec.com -- Twitter
    @ccmexec

  • Another SCOM Maintenance Mode query/advice...

    Hi,
    Just looking some advice on setting SCOM Maintenance Mode (using SCOM/SCO 2012R2)...
    I want to be able to set a server entirely into MaintMode, ie similar to choosing "Selected object AND ALL their contained objects" from SCOM console.
    I had asked similar question back in SCOM 2007/Opalis days, but the solution then (placing server and health server watchers separately into maintenance as per Anders blog http://contoso.se/blog/?p=2164 I'm not sure is appropriate now as I believe MaintMode
    is handled differently in 2012.
    I have seen some pretty complex solutions where using custom built DBs to hold MaintMode status etc.  Was hoping theres a neater/simpler soultion using the Orchestrator Activities these days.
    If not possible using Native Orchestrator then the fallback would be to try use powershell commandlet.  Looking at the Commandlet Examples if I used the following example solution, will that effectively put the server object (and all contained objects
    into maintenance which is what I'm trying to achieve.
    Windows PowerShell
    PS C:\> $Instance = Get-SCOMClassInstance -Name "Server01.Contoso.com"
    PS C:\> $Time = ((Get-Date).AddMinutes(10))
    PS C:\> Start-SCOMMaintenanceMode -Instance $Instance -EndTime $Time -Comment "Applyin
    Any advice to this recurring pain point of SCOM much appreciated.
    PS. Not sure if this post is better placed here or in SCOM/Powershell forum so can move if necessary...

    Hi Michael,
    thanks for your reply confirming the powershell command will work.
    I have actually just tried using the native Start Maintenance Mode Activity which actually seems to do as required - if the monitor selected is the relevant <servername> : Microsoft.Windows.Computer: <servername> object then it seems to put the
    entire server into maintenance.  I tested against a server which happened to also host SQL role, so when I placed in Maint via the runbook  I then stopped the SQL service and no alerts generated from SQL MP and I could see the spanner Icon against
    the server in relevant SQL node views aswell.
    I had though maybe that only windows MP stuff might be supressed - so again when I came across all the very complex solutions to apply Maint mode properly I wasnt sure if it was still relevant in 2012 (even though some of those solutions indicated for use
    on SCOM/SCO 2012?)
    Anyway if the simple solution work - as it appears to do so, then I'll run with that - unless someone can tell me why not?...
    Cheers

  • What files can I exclude from Time Machine backups?

    I'm running Firefox on OS X Mavericks. I use Time Machine to back this computer. I know that Time Machine will automatically avoid backing up my web cache. But which of the files in my profile directory can I not back up? I'm particularly interested in webappstore.sqlite, cookies.sqlite, and healthreport.sqlite since these are on the large end and seem to change frequently.
    I already have excluded bookmarkbackups and places.sqlite. I have the browser set to automatically export my bookmarks so if I need to restore my machine I'll get back my bookmarks but not my browsing history, which seems reasonable.

    What kind of data is valuable to you?
    A reset for instance preserves personal data like bookmarks (places.sqlite, JSON backups), history (places.sqlite), cookies (cookies.sqlite), passwords (signons.sqlite and key3.db), form data (formhistory.sqlite), open tabs (sessionstore.js)
    See these articles about information on files:
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *https://support.mozilla.org/kb/Recovering+important+data+from+an+old+profile

  • If I have two undo tablespace, under what situation oracle will use another

    if I have two undo tablespaces, under what situation oracle will use another
    one is default undo tablespace, another is created manually
    will it use it when the default one is full?
    it seem like to be it won't use the second undo tablespace.
    thanks
    Edited by: user11402556 on Jul 3, 2010 2:18 PM

    You can have two Undo Tablespaces created with the CREATE UNDO TABLESPACE syntax.
    However, the current database instance will use the Undo Tablespace specified by the instance level parameter undo_tablespace.
    When you want to switch the datafiles of an undo tablespace from, say, one mount point to another (or when you want to "resize" an undo tablespace that has grown very large for specific one-off / adhoc jobs), you would create another undo tablespace, reset the instance level parameter to the new undo tablespace and wait for a decent interval (e.g. at least undo_retention or autotuned undo retention) before dropping the old undo tablespace.
    So yours is not a hypothetical question. Having two undo tablespaces is a real-world practice -- but the two are concurrently present for only a short duration, while transactions and queries switch from one to the other.
    (In RAC, each database instance must have it's own Undo tablespace as well).
    Hemant K Chitale

  • Sending data to a different class

    Is there a way to send a class data without creating a new one?
    So, lets say I have three classes. I want classes 1 and 2 to send data to three, but I don't want three to be reset.
    Is there a way I can do this?
    Edit: ok better example: I have 3 classes. I want both the first and the third to be able to run a method in the second. The problem is that creating a new instance of the second class causes all of the variables in it to revert to their default, because of them being declared at the top. Is there a way I can run a method in the second class without resetting the variables in the second class?
    Message was edited by:
    Robin

    Is there a way to send a class data without creating
    a new one?I think you mean instance here rather than class. A class is a specification for instances of it; instances are created with new.
    So, lets say I have three classes. I want classes 1
    and 2 to send data to three, but I don't want three
    to be reset.An instance of a class "sends" or "receives" data.
    Is there a way I can do this?
    Edit: ok better example: I have 3 classes. I want
    both the first and the third to be able to run a
    method in the second. The problem is that creating a
    new instance of the second class causes all of the
    variables in it to revert to their default, because
    of them being declared at the top. Is there a way I
    can run a method in the second class without
    resetting the variables in the second class?Don't create a new instance. Call the method on the first or original or previously-created instance, or more generally, on the instance you want the method to operate on.
    Foo foo1 = new Foo();
    Foo foo2 = new Foo();
    foo1.someMethod(); // somemethod on instance foo1
    foo2.someMethod(); // someMethod on instance foo2

  • Netflix, tv shows and movie category disappears.

    So I unplugged my ATV2 so I could move in and when I plugged it back in I noticed that Netflix was not on there as well as the categories Movies and Tv shows are also not there now. It's like they just dissapeared. Now I also just realized my Internet is down so is that the reason why my ATV2 does not have those categories and Netflix? What should I do?

    Update:  I unplugged the Apple TV and then replugged.  All is well now.  I have seen (perhaps) about 4 issues with the ATV2 since I've owned it--unplug and replug resolved those issues.  I have an idea (unsubstantiated guess) that unplugging and replugging is the best way to go to resolve many issues (rather than "reset" for instance).  At least it has worked for my few issues.

Maybe you are looking for

  • Authorization at Company Code Level for table FEBKO

    Hello Experts, I need to add authorization check on my report program that accesses and displays data from table FEBKO. However the user should only be able to access the data of table FEBKO particular only for their company code. How can I apply thi

  • BDC - MM02 _long text  for material PO upload

    Hi experts, I want to upload Long text for material PO in MM02 (Purchase  order text view) throuh BDC upload.  I have successfully done recording for this transaction. But in the recording it show no  table field for that particular long text. Pls he

  • PSE9/Win 7: Can I create an album of all jpg's with reduced size?

    PSE 9 on Win 7. I want to take a bunch of my pictures to my iPad via iTunes. iTunes will accept a PSE Album as a source. But not a Smart Album. I also want to reduce the size of the jpg's in the album. Sort of what I can do with Export. Is there some

  • Sharpness APERTURE vs iPHOTO~file exported from Aperture worse than iPhoto

    HEY. i'm recently using Aperture for my Photo Editing work.I found that everything Good and Perfect after fine tune and preview in the Window of Aperture...while Export it to the Jpeg (originaly image import from jpeg file) I found it's a bit loose f

  • 10.4.6 update problems = Exchange - time of mail delivery is wrong

    10.4.6 update Entourage 11.2.3 Exchange 2003 mail server date/time server my Mac is using: internal company time server When I send an e-mail, the users with MS office 2003 (on a PC) have a time received of 1 hour later. If I send it a 9am, they get