Report on deployment id and host name

Hi ALL
Im trying to write a new sql query to generate a sccm report based on deployment id and machine id or host name.. the report is as follows..
im getting some data after 5min in sql db that too multiple results, but not in sccm reporting.. please help me..
main query:
declare @DeploymentLocalID as int
declare @RscID as int
select @DeploymentLocalID=AssignmentID from v_CIAssignment where
Assignment_UniqueID=@DEPLOYMENTID and UpdateAssignment=1
select Assignment_UniqueID as DeploymentID,
AssignmentName as DeploymentName
from v_CIAssignment where AssignmentID=@DeploymentLocalID
select @RscID=ResourceID from v_R_System where ((Name0 = @MachineName) and (Active0 = 1));
select catinfo.CategoryInstanceName as Vendor0,
      ArticleID as ArticleID,
      BulletinID as BulletinID,
      Title as Title,
      Approved = case when col.CollectionID is not null then '*' else '' end,    
      NumPresent as Installed,
      NumMissing as Required,
      NumNotApplicable as NotRequired, 
      NumUnknown as Unknown,
      NumTotal as Total,
      PCompliant=case when NumTotal<>0 then CAST((NumPresent+NumNotApplicable)*100.0/NumTotal as numeric(5,2)) else 0.0 end,
      PNotCompliant=case when NumTotal<>0 then CAST((NumMissing)*100.0/NumTotal as numeric(5,2)) else 0.0 end,
      PUnknown=case when NumTotal<>0 then CAST((NumUnknown)*100.0/NumTotal as numeric(5,2)) else 0.0 end,
  col.CollectionID,
   UniqueUpdateID=ui.CI_UniqueID,
   ctm.ResourceID
from v_CIAssignmentToCI cia
join  v_UpdateInfo ui on cia.CI_ID = ui.CI_ID
join v_UpdateComplianceStatus css on ui.CI_ID=css.CI_ID
join (v_CICategories_All catall join v_CategoryInfo catinfo on catall.CategoryInstance_UniqueID = catinfo.CategoryInstance_UniqueID and catinfo.CategoryTypeName='Company')
      on catall.CI_ID=ui.CI_ID
left join v_CITargetedCollections col on col.CI_ID=ui.CI_ID --and
col.CollectionID=@CollID
join v_UpdateSummaryPerCollection us on us.CI_ID=ui.CI_ID --and
us.CollectionID=@CollID
left join v_CITargetedMachines ctm on ctm.CI_ID=css.CI_ID and ctm.ResourceID = @RscID
left join (
                        select atc.CI_ID, Deadline=min(a.EnforcementDeadline) from v_CIAssignment a
                        join v_CIAssignmentToCI atc on atc.AssignmentID=a.AssignmentID
                        group by atc.CI_ID) cdl   on cdl.CI_ID=css.CI_ID
where cia.AssignmentID=@DeploymentLocalID AND css.ResourceID = @RscID
prompts:
deployment id:
begin
 if (@__filterwildcard = '')
select
cia.Assignment_UniqueID as DeploymentID , cia.AssignmentName as DeploymentName
from v_CIAssignment cia
where cia.UpdateAssignment=1
order by AssignmentName
else
select
cia.Assignment_UniqueID as DeploymentID , cia.AssignmentName as DeploymentName
from v_CIAssignment cia
where cia.UpdateAssignment=1
and Assignment_UniqueID like @__filterwildcard or AssignmentName like @__filterwildcard
order by AssignmentName
end
machine id:
begin
 if (@__filterwildcard = '')
  select distinct Name0 from v_R_System WHERE isnull(Obsolete0,0)<>1 order by Name0
 else
  select distinct Name0 from v_R_System
  WHERE Name0 like @__filterwildcard
 and isnull(Obsolete0,0)<>1 order by Name0
end

declare @CI_ID int;
select @CI_ID=AssignmentID from v_CIAssignment where AssignmentName = @Assignment;
select rsys.Name0, SUM(CASE bigpoo.Status WHEN 3 THEN 1 ELSE 0 END) AS [Installed Count], SUM(CASE bigpoo.Status WHEN 2 THEN 1 ELSE 0 END) AS [Missing], SUM(CASE bigpoo.Status WHEN 0 THEN 1 ELSE 0 END) AS [Not applicable], SUM(CASE bigpoo.Status WHEN 1 THEN
1 ELSE 0 END) AS [Unknown]
from (Select CI_ID, ResourceID, Status from v_UpdateComplianceStatus 
union select CI_ID, ResourceID, 0 as [Status] from v_UpdateComplianceStatus_NotApplicable as UPNA
union select CI_ID, ResourceID, 1 as [Status] from v_UpdateComplianceStatus_Unknown as UPU) as BIGPOO inner join
v_UpdateInfo as ui on BIGPOO.CI_ID = ui.CI_ID inner join 
v_CIAssignmentToCI as CItoCI on CItoCI.CI_ID = BIGPOO.CI_ID inner join
v_CIAssignment as CIA on CIA.AssignmentID = CItoCI.AssignmentID inner join
v_R_System as RSYS on RSYS.ResourceID = BIGPOO.ResourceID
where ui.IsExpired = 0 and cia.AssignmentID =@CI_ID and rsys.ResourceID 
in (Select ResourceID from v_CIAssignmentTargetedMachines where v_CIAssignmentTargetedMachines.AssignmentID = @CI_ID)
group by RSYS.Name0
Create a report with the above query you will get what you wanted in the report  its deployment management based report in detail for each machines.
Kamala kannan.c| Please remember to click “Mark as Answer” or Vote as Helpful if its helpful for you. |Disclaimer: This posting is provided with no warranties and confers no rights

Similar Messages

  • What are the userid,password, and host name for oracle 9i?

    HI Guys.
    I am a research student at the University and the I recently downloaded Oracle 9i for my research. But the problems is also with seting it up. Please could you show me the userid, password, and host name for oracle 9i.
    Thanks in advance for your cooperations.
    Malinga R
    [email protected]

    I believe that starting with 9.2, you have to specify different passwords when you install (can't be the default).
    Justin

  • Question about Domain and Host name fields.

    Hello! Just a quick question, I currently have the Mail Server up and running although I'm a little unsure about what exactly needs to be entered into the users email application.
    I've tested POP and IMAP using the information that I entered into the "Domain Name" field, and into the "Host name" field, and everything worked great.
    Example:
    Incoming Mail Server: mail.example.com
    Outgoing Mail Server: smtp.example.com
    Although while setting up another site and including the normal mail setup via DNS I've also noticed that I can send and receive email by using other sites that belong to me, as long as they are pointing towards our server.
    Example:
    Incoming Mail Server: mail.mynewsite.com
    Outgoing Mail Server: smtp.mynewsite.com
    So, I guess my question is whether its bad to use other websites in the incoming and outgoing mail server fields, or should I stick to the incoming and outgoing sites that I have listed in the Mail Server's 'Domain Name' and 'Host Name' fields?
    I hope that made sense, thanks again for your help.
    Paul
    PowerMac G5, Xserve G5, and PowerBook G4 Mac OS X (10.4.8)

    Does it matter if our users type mail.example.com
    into the incoming mail server, or are they allowed to
    use their own domain name "mail.mydomain.com" as long
    as the DNS is setup correctly?
    There is no intrinsic 'meaning' to hostnames entered into the mail client. These are merely converted to IP addresses, using available dns, and then the mail client communicates with the IP address, using whatever port number is applicable for the service required (e.g., port 25 for smtp, port 110 for pop). So you could use the hostname woohooo.mydomain.com for the smtp or pop server, as long as it resolves to the correct IP.
    This enables laptop users to have the one smtp/pop hostname, with lan dns resolving it to the local private IP and ext dns resolving same hostname to wan IP.
    There is also no need to have two separate hostnames for pop and smtp. These are typically used by ISPs because they have separate servers doing each job - one doing pop, one doing smtp. If one server does both (and there is no likelihood of splitting the services later) then just the one hostname for pop and smtp is fine.
    -david

  • UNABLE TO RETRIEVE THE CLIENT IP ADDRESS AND HOST NAME OF A PORTAL USER

    I'm trying to retrive the client IP address and host name of a portal user
    trying to access a portal page using APIs:
    PortletRenderRequest portletRequest =
    (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    HttpServletRequest servletRequest =
    (HttpServletRequest)portletRequest.getAttribute(HttpCommonConstants.SERVLET_REQUEST);
    String l_szClientIPAddress = servletRequest.getRemoteAddr();
    String l_szClientHost = servletRequest.getRemoteHost();
    but i found that for all portal users on different machines IP addresses, the
    returned IP is the same for all which is Portal middle tier IP address.
    So how can retrive the IP addess of a portal user trying to access a portal
    page ?

    Brijesh,
    Do you mean how to see hostname/ip address of client requests processed by the server? If yes, depending on what's your front ending component - Web Cache or OHS, you can configure the access log format to have this information recorded in either of these component's access log file.
    For Web Cache access log file, refer this:
    http://download.oracle.com/docs/cd/B14099_19/caching.1012/b14046/diagnostics.htm#sthref2090
    For OHS access log file, refer this:
    http://download.oracle.com/docs/cd/B14099_19/web.1012/b14007/servlog.htm#sthref439
    By default, both Web Cache and OHS are configured to use Common Log Format (CLF) that does record hostname/ip address so if you haven't made any changes to log format, this info is already there for you. Look for $ORACLE_HOME/webcache/logs/access_log file for Web Cache and $ORACLE_HOME/Apache/Apache/logs/access_log file for OHS.
    Thanks
    Shail

  • I want to change IP and Host Name of application serve

    our application server is on IBM AIX platform and now i want to change IP and Host Name of application server?

    Hi Again;
    For Ip please see:
    How to change the IP Address for a Release 11i Instance ? [ID 364099.1]
    How to Change IP Address in an Oracle Applications Environment [ID 553318.1]
    PS:Please mention your EBS version
    Regard
    Helios

  • Change IP and Host name of the server

    Hi,
    Db :11.2.0.3
    Os:Aix6
    OS team are going change IP address and host name of the server which has ASM and DB.
    What are the things we need to follow for this?
    Thanks & Regards,
    VN

    OS team are going change IP address and host name of the server which has ASM and DB.
    What are the things we need to follow for this?1. TNSNAMES.ORA files everywhere
    2. LISTENER.ORA on server
    If there are thin JDBC clients, change IP/hostname in their connection URLs.

  • Getting the context and host name during initialization

    I am trying to find a way to get the Context path and the host name during the ContextInitialized event, but without any luck. I think it is very strange that you can not even find the context path or the host name of the application you are running yourself.
    Does anybody have an idea?

    What I mean are the configuration elements which are put in the server.xml
    The BIG problem with the getServletContextName is that this returns the name which is put in the web.xml. But I have a web application which is generic and only some config parameters should be altered. Thats why I need to now in which context I am.
    I think the deployment of web applications is wrong by design. I have to specify deployment information inside the application package which in fact should be presented to the servlet container separately. It's like installing new applications on a computer. It should be possible to create 1 installation file (read a web archive) and then specify the location where you want to install it while deploying it (read specify the host name, context location etc.) Now these two are mixed together which I think is wrong.
    Besides the above problem, I think it is also not correct to let users specify properties while configuring a context (either in the server.xml or the web.xml) and then not having an equivelant in the object model (Read the ServletContext object).
    Morten

  • NetInstall and host name

    Can someone explain why, when I image from our NetBoot server, the host name of the client (target machine) is changed to "knotset"? We used to use a bootable DVD to install our custom corporate image and never had this problem. However, we've recently evolved to the point of using NetInstall to deploy our images. Everything in NetBoot has been working great, but this knotset thing is bugging me... The only way I know to change it is in /etc/hostconfig, but I'd prefer to avoid manually changing this value.

    Hey Charles,
    I see you are having an issue with getting your Officejet Pro 8600 Premium to connect to your wireless network.  The first thing I would advise is to make sure to power cycle the entire network setup.  This will make sure the network is fresh and DHCP is renewed.
    Follow these steps to reset your HP printer, your wireless router, and your computer.
    Press the Power button on the HP printer to turn it off.
    Disconnect the power cord from the rear of the HP printer.
    Disconnect the power cord from the wireless router.
    Turn off the computer.
    Wait 30 seconds.
    Reconnect the power cord to the wireless router.
    Wait 30 seconds, or until the router is fully on and ready.
    Turn the computer back on.
    Wait for the computer to reload.
    Reconnect the power cord to the rear of the HP printer.
    Turn the printer back on.
    Once everything is powered back up, then try going back to the Wireless Setup Wizard through the front panel of the printer.  Are you trying to connect through WPS (Wifi protected setup) or through selecting the network ID (SSID) and typing in the password?
    What happens when you try to connect?  Do you get any errors?
    Once the printer is connected to the network what is the IP of the printer?  Does this fit in the domain of your home network?
    Jason
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    I am not an HP employee.

  • Reports Executed from SA38 and user name

    Hi,
    I wanted to find the reports executed from sA38 and the user name who did it
    We are able to get the information from STAD, but we are able to get only one day's data
    Please let me know if there is any table , where i can get the information of all the list of Reports and users executed from SA38
    Thanks in Advance

    Hello Balaji
    you need to turn on audit log ...through sm19 you can to that,not only the user but report name
    which is executed is also available when you turn on the audit (sm19),after that you can check
    the daily audits by tcode sm20.so browse for it...you may get more information.
    regards,
    Manjula.

  • Need to change IP address and host name on a ORACLE 10g RAC setup.

    Hi Forum,
    I have a task to change the IP address, host name and host related details for the ORACLE 10g RAC 2 node setup. So Can anyone tell me the procedure to do the same on both the nodes.
    Regards
    Prakash

    change IP Address Public + VIP + Interconnect
    http://surachartopun.com/2007/01/i-want-to-change-ip-address-on-oracle.html
    change VIP name
    http://surachartopun.com/2009/01/change-vip-hostname-on-oracle-rac.html
    If you'd like to change HOSTNAME... Metalink (NOTE:220970.1)
    Can I change the public hostname in my Oracle Database 10g Cluster using Oracle Clusterware?
    Hostname changes are not supported in Oracle Clusterware (CRS), unless you want to perform a deletenode followed by a new addnode operation.
    The hostname is used to store among other things the flag files and Oracle Clusterware stack will not start if hostname is changed.
    Changing the Private Interconnect
    o Change of the IP Address: change the IP address in the hosts file and/or DNS and make sure that ASM and the database also use the same interconnect
    o Change of the private node name used by Oracle Clusterware: requires a reinstall of Oracle Clusterware
    So, Public or Private hostnames can only be changed by removing/adding nodes, or reinstalling Oracle Clusterware. VIP Hostnames can be changed
    But you can read this idea (reinstall CRS)
    http://www.pythian.com/news/482/changing-hostnames-in-oracle-rac
    http://surachartopun.com/2008/12/change-hostnames-oracle-rac.html
    Edited by: Surachart Opun (HunterX) on Oct 25, 2009 10:58 PM

  • Changing domain name and host name?????????//

    Hai,
    how to chane the domain name and hostname for LINUX ES 4.0 server.
    is any impact On EBS 11.5.10.2 . if i change??

    This is the command that I run at command prompt:
    perl D:\oracle\VIS\db\tech_st\10.2.0\appsutil\bin\adgentns.pl appspass=secret \contextfile=conf_VIS.txt -removeserver
    It returns:
    'perl' is not recognized as an internal or external command, operable program or batch file.
    Did you source the env file first?I apologize, what does this mean? I am running EBS12 on a WINXP environment, but this was the closest forum post I could find related to the topic.
    From Article:
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:1947016216372695354::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,338003.1,1,1,0,helvetica
    If you already changed the information of your existing AutoConfig Context file and
    have not done the above step, then you can manually update the Net Services
    Topology Model using the following syntax :
    Locate the System Name :
    The System name is the database name
    Verify with sql query :
    select DB_NAME from FND_DATABASES;I logged into the vision DB (VIS) as the system user id, via SQLPLUS, ran the query and it returned a table or view "FND_DATABASES" does not exists.
    I changed the computer name, and changed the domain name (primary dns suffix).
    I was successful using the Context Editor to edit both the DB and App context files, and ran AutoConfig for both the DB and Application (exists on the same machine).
    I hope this provides more clarity....
    Thanks
    -J

  • Script to find the list of Queries currently running in database with User Login Name and Host Name.

    Hai,
    How to find the list of queries currently running in the Database with User Login Information.
    Since my database application is running slow, to find the slow queries.

    Try the below query
    SELECT r.start_time [Start Time],r.session_id [SPID],
    DB_NAME(database_id) [Database],
    s.host_name,
    s.program_name,
    s.login_name,
    SUBSTRING(t.text,(r.statement_start_offset/2)+1,
    CASE WHEN statement_end_offset=-1 OR statement_end_offset=0
    THEN (DATALENGTH(t.Text)-r.statement_start_offset/2)+1
    ELSE (r.statement_end_offset-r.statement_start_offset)/2+1
    END) [Executing SQL],
    r.status,command,wait_type,wait_time,wait_resource,
    last_wait_type
    FROM sys.dm_exec_requests r
    OUTER APPLY sys.dm_exec_sql_text(sql_handle) t
    inner join sys.dm_exec_sessions s
    on s.session_id = r.session_id
    WHERE r.session_id !=@@SPID -- don't show this query
    AND r.session_id > 50 -- don't show system queries
    ORDER BY r.start_time
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Register IP address and host name of SAP Router

    Does anyone think there would be a problem if we register one IP address now and then register another one later, replacing the first?
    Thanks.

    I think that It isn't problem
    Check SAP  Note 126645 - SAP provider remote connection data sheet
    In the message explain your question
    Regards
    William Neira

  • Getting host name and IP address

    I have develop different types of forms which resides on server and clients are acessing it.Now from my end i want to track that which user is accessing my forms on the server i.e i want to know the client IP address and host name.When the user execute some query on the database then i will get it easily using sys_context function but if it perform some functions within the form and i catch the host name then it returns the server host name where the actual forms resides not the client host name and i want to know the client host name and IP address who is running the forms.Plz let me know the way so i can do that easily .
    thanks

    Hi Grant,
    I want to get ip/address host name of reports server, sitting on forms server.
    can you tell me how to do this.
    in a web base environment.
    i have several report server instances running on different machines.
    when i run a report using RUN_REPORT_OBJECT using report_server=mac_rep1
    i want to know mac_rep1 resides on which host/ip machine.
    regds

  • Get host name and ip addrees of the client machine for window VISTA

    Hello Friends !!
    I have write the following code to get the ip adress and host name of the client machine ..
    it works fine for windows xp and 2000 but in vista it gives this type of out put.
    host name = 0:0:0:0:0:0:0:1
    ip addresss = 0:0:0:0:0:0:0:1
    what i have to make changes in my code to get the proper ip address and hostname for vista...
    My code is listed below....
    code ::
    InetAddress remoteAddress = null;
    // Setting Host Name...
    request.setAttribute("reportHostIP", request.getRemoteAddr());
    // Setting Host IP Address...
    try
         remoteAddress = InetAddress.getByName(request.getRemoteAddr());
         //This will give you the full qualified domain name of the client
    request.setAttribute("reportHostName", remoteAddress.getCanonicalHostName());
    catch(Exception e)
         logger.error(e.getMessage(), e);
    }

    BIJ001 wrote:
    Is it not IPv6 by any chance?It is. And if I remember correctly, then "0:0:0:0:0:0:0:1" (or "::1" for short) is the IPv6-equivalent to "127.0.0.1", i.e. it's the loopback device.

Maybe you are looking for

  • Can we push a Custom Type Object on Stack in BCEL?

    Hi All, I know how to push Primitive Types on Stack IN BCEL using InstructinoList.append(new PUSH(ConstantPoolGen,343)); Now i want to push Custom Type Object(Obj of some user defined class i.e EngineClass obj) on Stack in BCEL. Let me explain some c

  • Pp reports ( standard)

    hi sap gurus, i am implementation on MTO scenario of pipe & euipment manuf.industieries so i want infirmation about pp reports and where i get , my client wants following reports so plz tell me how i got fron sap standard or to make from abapers. dai

  • Should not create any output file when transform with xslt file

    I have a xslt file, which I have make code to check the order status value. If OrderStatus != 'Reject' --> create attribute, element for output file Else OrderStatus = 'Reject' --> do not create attribute/element ==> output is the empty file. Require

  • Does the background task support BDC program in Workflow?

    Hi Gurus, Environment: ECC 6.0 WAS 640 I've configured a task using Class method, in which a BDC program is called. When the task is set as background, it doesn't work. The workflow is suspended at this step. However,  when i unselected background op

  • I need help with a web page for a client pppppppppppllllllllleeeeaaassssseee hhheellllpppp

    Ok so it seems that I have  programed the music to work propery on my webpage. The only problem is  that it does not always play. I mean sometimes it does play and then  theres the issue of songs overlaping certain times when I open  the page and oth