Query for Last Communicated Time
Hi Folks,
I've searched the forums and I think it may be out there, but I can't find it. Simply put, I'm looking for a WQL query to list all client systems that have communicated with the SCCM server in the last 1 month (or 30 days).
I have tried { SMS_R_System.LastLogonTimestamp < DateAdd(dd,-30,GetDate()) }, but it is not accurate.
The "Last Activity" column/criteria looks promising, but I can't find the code to use it.
Any help in this matter would be appreciated.
-Bill
Why not using the build in report: Clients that have not reported recently (in a specified number of days)
More information in the following thread:
http://social.technet.microsoft.com/Forums/systemcenter/en-US/57d0a157-e7d4-40a7-93c7-24ce152afcb2/looking-for-a-report-for-sccm-client-last-contact?forum=configmgrai
Please take a moment to Vote as Helpful and/or Mark as Answer where applicable. Thanks.
Similar Messages
-
any body have a query for last 8 days results
TIMESTAMPADD(SQL_TSI_DAY, -8, CURRENT_DATE) this is resulting only 1 day results only .if i execute this query is it displaying 8th back day results only.
i want all 8 back days results .
anybody have query for this...
Edited by: user12255470 on Apr 28, 2010 7:19 AMThis works fine for me:
SELECT "D0 Time"."T00 Calendar Date" saw_0, "F1 Revenue"."1-01 Revenue (Sum All)" saw_1 FROM "Sample Sales" WHERE "D0 Time"."T00 Calendar Date" BETWEEN TIMESTAMPADD(SQL_TSI_DAY, -8, CURRENT_DATE) AND TIMESTAMPADD(SQL_TSI_DAY, -1, CURRENT_DATE) ORDER BY saw_0
regards
John
http://www.obiee101.blogspot.com/ -
How to find top utilized query for last two months in oem
how to find top utilized query for last two months in oracle enterprise manager?
Can you mark the thread as Helpful and once marked the information can be reviewed by other customer for similar queries
Regards
Krishnan -
Query for last four rows?
please write query for get the last four rows from a table
ratnakar wrote:
please write query for get the last four rows from a tablelast 4 rows is indeterminate.
rows in a table are like balls in a basket.
which are last 4 balls in any basket?
Handle: ratnakar
Email: [email protected]
Status Level: Newbie
Registered: Aug 27, 2012
Total Posts: 34
Total Questions: 16 (11 unresolved)
why so MANY unanswered questions? -
When I run the same query for the second time it's faster, I want to reset this behavior
I am running a query in oracle 11g select A from B where C = ':D' B has millions of records.
The first time i run it it takes about 30 seconds, the second time i run the query it takes about 1 second.
Obviously it's caching something and i want it to stop that, each time i run the query i want it to take 30s - just like it was running for the first time.
The reason I want to reset this is because for testing purposes I want to measure this query at the very first time.
Please help.
Thanks & Best Regards,
Darkuser9359353 wrote:
I am running a query in oracle 11g select A from B where C = ':D' B has millions of records.
The first time i run it it takes about 30 seconds, the second time i run the query it takes about 1 second.
Obviously it's caching something and i want it to stop that, each time i run the query i want it to take 30s - just like it was running for the first time.
The reason I want to reset this is because for testing purposes I want to measure this query at the very first time.
Please help.
Thanks & Best Regards,
Dark
No - you do NOT want to do that. Not if you want to get results that really represent how that query will work in reality.
See these two AskTom blogs where he discusses the reasons for NOT doing this in detail.
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:7413988573867
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:311990400346061304 -
Hi All,
Can anybody give me a SQL Query which will select last n rows from a table.
guess some time I see this query in this forum but forgot to note it down.
Thanks in Advance
[email protected]Hi All,
There is a simple solution, which will be useful at some of the following cases.
1) Find Top( or bottom) <n> rows.
For e.g. Top 5 rows or Bottom 100 rows.
2) Range of rows.
For e.g. Row 11 to row 20. (which is required for displaying the dynamic pages on web search engines)
We need to understand how Oracle processes the query.
SQL>Select rownum, Ename, Sal from Emp;
ROWNUM ENAME SAL
1 A 1000
2 B 800
3 C 3500
But, if we write the query in following manner, check the output to understand Oracle's query processing.
SQL>Select rownum, Ename, Sal from Emp order by Sal;
ROWNUM ENAME SAL
2 B 800
1 A 1000
3 C 3500
The above output makes it clear that the rownum is assigned to the array of output before sorting it.
Therefore, if you have to use the rownum of sorted output, you will have to use the inline query.
SQL>Select rownum, Ename, Sal from (Select Ename, Sal from Emp ) order by Sal;
ROWNUM ENAME SAL
1 B 800
2 A 1000
3 C 3500
The above query can be used, but not for any kind of filter conditions. Please check the tricky part of this filter condition.
SQL>Select rownum, Ename, Sal from (Select Ename, Sal from Emp ) order by Sal
where rownum = 2;
No rows returned.
This is because the rownums are generated first, then the filter is applied for Each row.
Therefore, if the rownum is 1 it is filtered out. Therefore, the second row becomes first row( rownum = 1) and again it gets filtered out.
Therefore, here we need to use one more inline query.
SQL>Select rnum, Ename, Sal from (
Select rownum rnum, Ename, Sal from (Select Ename, Sal from Emp ) order by Sal)
where rnum = 2;
ROWNUM ENAME SAL
2 A 1000
Think, with this above discussion, you can generate any type of query.
Regards.
Yogesh D. -
Query for last 5 Purchase Price for items
Dear All
I was trying to write a query in which
i want to display Items with last 5 purchase price
itemcode UOM Last Purchase Price II Last Pur Price III Last Pur Price IV Last Pur Price V Last Pur Price
but not getting right result because of future posting and post date entries as I am considering Max(DocNum) for Query.
SELECT distinct a.ItemCode, a.invntryUom
, (select Price from PCH1 where itemcode=a.itemcode and
docentry=(select max(docentry) from PCH1 where itemcode=a.ItemCode)) as 'II Pur. Price'
, (select Price from PCH1 where itemcode=a.itemcode and
docentry=(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode))) as 'II Pur. Price'
, (select Price from PCH1 where itemcode=a.itemcode and
docentry=(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode)))) as 'III Pur. Price'
, (select Price from PCH1 where itemcode=a.itemcode and
docentry=(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode))))) as 'IV Pur. Price'
, (select Price from PCH1 where itemcode=a.itemcode and
docentry=(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode and docentry<(select max(docentry) from PCH1 where itemcode=a.ItemCode)))))) as 'V Pur. Price'
, Max(b.docentry) as 'MaxDocEntry'
FROM OPCH INNER JOIN
PCH1 b ON OPCH.DocEntry = b.DocEntry INNER JOIN
OITM a ON b.ItemCode = a.ItemCode
group by a.ItemCode, a.invntryUom
order by a.ItemCode
Please help me on this.
Regards
Anubha PaliwalHi........
Try this......
SELECT Top 5 T0.[DocNum], T1.[ItemCode], T1.[Dscription], T1.[Price], T3.[ItmsGrpCod],
T3.[ItmsGrpNam] FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON
T2.ItmsGrpCod = T3.ItmsGrpCod WHERE T3.[ItmsGrpNam] ='[%0]' ORDER BY T0.[DocDate] desc
Regards,
Rahul -
WQL Query for Last Policy Request
I'm trying to create a collection based on workstations whose last policy request was more than 30 days ago and I'm having trouble with the query statement. Any help would be greatly appreciated.
You can query v_CH_ClientSummary to get last policy request and join
v_r_system in order to get the comuter name.
That SQL and cannot be used for building a collection ...
Torsten Meringer | http://www.mssccmfaq.de -
Query for Last page visit by user/session and get version # of current page
Hi Guru's,
Any have a query to retrive last page visited by user / session? Somewhere from apex view fir 3.0 or later version? Also looking for query to get version number of current pageRequestCtx.getResponsibilityId() should return you the Responsibility Id &
RequestCtx.getUserId() should return the User Id.
As I understand RequestCtx values are always available in the JSP Page. Kindly check again. -
What is the sql query for the real time reports Resource Stats?
Does anyone know what the query is that the real time report tool uses for the Resource Stats page? Trying to develop a custom report that displays similar information that is updated regularly.
Hi,
009 wrote:
Hi Frank,
Just wanted your opinion on the above given SQLI'm not sure I understand it.
I added some more formatting to help me read it:
SELECT A
, CASE WHEN LAG(A,1) OVER (ORDER BY A) IS NULL
OR A=LAG(A,1) OVER (ORDER BY A)
THEN LAG(B,1) OVER (ORDER BY A)
END B_LAG
, B
FROM (
SELECT A, B
FROM
SELECT '1'A,'Apple' B FROM DUAL UNION ALL
SELECT '1'A,'cat'B FROM DUAL UNION ALL
SELECT '2'A,'bat'B FROM DUAL UNION ALL
SELECT '3'A,'rat'B FROM DUAL UNION ALL
SELECT '2'A,'yellow'B FROM DUAL UNION ALL
SELECT '1'A,'pin'B FROM DUAL
CONNECT BY PRIOR A=B
ORDER BY A
);What is the purpose of the CONNECT BY in what you have so far?
Is the idea that you will add another CONNECT BY query, using
CONNECT BY b_lag = PRIOR b?
Do you think that will be better than using ROW_NUMBER?
Will it work if (a, b) is not unique? -
FDM Scripting Query for last imported source file using Batch Processing
Hi Experts,
I'm currently in the processing of automating the FDM load process on our version of FDM 9.3.3 using batch processing and the FDM Task Manager. Most of the process works fine including an email alert which notifies users of when a data load has taken place.
As part of that email alert I am trying to attach the source file that has been loaded in batch processing. I have managed to get an attachment using the following FDM Script Object of:
"API.MaintenanceMgr.fPartLastFile(strLoc, True, False)".
But have noticed that using this only attaches the last "manually" imported file rather than the last file imported using the batch processing.
My question is: Is it possible for someone to steer me into the right direction of either a more appropriate API or if I have missed a step in my script.
Any help as always would be much appreciated.
Cheers
PipUnfortunately the batch process does not work the same way as on-line. I am assuming you are using the normal batch load and not Multiload (although the batch is simisar).
the batch file name gets recorded on the tBatchContents table, and moved to the import/batches folder under the folder for the current batch run. However, if successful the file gets deleted (and from memory does not get archived). To add the import file to the e-mail, after a successful load, i think you will need to store a copy of it prior to importing the file. -
How to Query for last updated data in planning Cube?
Hi,
i want to see the last updated data with specific timestamp on one of our planning application Cube, IS it possible ?
I have gone through application log and essbase server log but didn't get much information
Can any one please let me know.
ThxHow was the data updated, if it was through planning then you can enabling data auditing and you should be able to then query the information.
If it is was a data load then in EAS go the database, edit properties, modications, it should display data load information.
Cheers
John
http://john-goodwin.blogspot.com/ -
How to find the cpu usage per query for a time period
Hi All,
Is there a way to find the cpu used per query for a given time period?
DB:10.2.0.5
OS:AIX
Thanksuser13364377 wrote:
if there are multiple queries starting at the same time, then what to do?Handle: user13364377
Status Level: Newbie (10)
Registered: Jul 5, 2010
Total Posts: 264
Total Questions: 113 (84 unresolved)
why so many unanswered questions?
clarify your question
same SQL multiple times from different sessions?
or
different SQLs from different sessions? -
How to findout the sql query elapsed time for last call
RDBMS vesrion: 11.2.0.3
How can I get the stats like how much time it took for a query to run if I know the "sql_id"
I can query v$sql and find out the "parse_calls","fetches","execution","elapsed_time" (microsecs)
but if the query executed 20 times then the elapsed time will be the cumulative of all the executions.
But I want to know the ELAPSED TIME of LAST CALL(last execution only) for that sql_id.
Edited by: rcc50886 on Aug 2, 2012 8:35 AMYou can easily monitor the statement and see the results for v$sql_monitorWe didn't enabled the monitor for the sql's and its not possible in my current enveronment due to some issues with management.
Is there any way to find out the last elapsed time for the sql with known sql_id ? -
DMV Query -- all Catalogs and last processed time
Hi
I want to get a list of all catalogs & there last processed time, can you join the two DMV queries ?
SELECT * FROM $System.DBSCHEMA_CATALOGS
SELECT CUBE_NAME, LAST_DATA_UPDATE FROM $System.MDSCHEMA_CUBESI just used the one query , I was trying to list out all the catalogs and illustrate in an excel pivot table, unfortunately the last processed date is not available in the DBSCHEMA_CATALOGS
c
In order to get the last processed date I would have to connect to each Catalog to retrieve the data making it useless for excel, as the Last processed date in only available in the $System.MDSCHEMA_CUBES
schema
SELECT CUBE_NAME, LAST_DATA_UPDATE FROM $System.MDSCHEMA_CUBES
Hi Carlo,
In your scenario, you list out the catalogs using the query below
SELECT * FROM $System.DBSCHEMA_CATALOGS
And get the last processed date using the query below.
SELECT CUBE_NAME, LAST_DATA_UPDATE FROM $System.MDSCHEMA_CUBES
Now what you want to know if we can use the Join function to join those two queries, right?
The query engine for DMVs is the Data Mining parser. The DMV query syntax is based on the SELECT (DMX) statement. Although DMV query syntax is based on a SQL SELECT statement, it does not support the full syntax of a SELECT statement. Notably, JOIN, GROUP
BY, LIKE, CAST, and CONVERT are not supported.
So your requirement cannot be achieve currently.
Thank you for your understanding.
Regards,
Charlie Liao
TechNet Community Support
Maybe you are looking for
-
Sending log files for scheduled jobs as attachment through mail
Hi All, Can any one please help me out to write a pl/sql program to send log files for scheduled jobs as attachment through mail. Thanks.
-
Can I transfer all my date and apps to my new Ipad
NNeed **** transfer all my data and app from my old IPad 2 to my new I pad air
-
Migrating from 2007 MBP to 2009 unibody 17" MBP
Hi all, hope you're all well! I'm expecting delivery of my new 17" Unibody MacBook Pro this week and have heard conflicting things as to how best migrate my data from the old 2007 15" Intel MBP to the new machine and hope you kind folk can clear it u
-
Need a script to check the version of Office365 Pro Plus to push our office updates
I need a script that could check the version of office365 pro plus e.g ( 15.0.4711.1002) and if it doesn't exists on users machine than to deploy a latest version from a network location I have an XML which works fine with downloading and even when d
-
Deploying BC4J to JBoss 3.0.0/TomCat 4.0.3
When building an application that runs OK localy Followed the instructions on http://otn.oracle.com/products/jdev/howtos/appservers/deploy_bc4j_to_jboss.html i get a good deployment of the EAR file, can go to the application page, see the menus etc B