Create user activity monitoring views. Views are useful to monitor user logons and Netezza appliance usage:
Create view DDL.
SELECT 'DEV' as ENV
,username AS USERNAME
,u.CREATEDATE AS CREATEDATE
,timezone(MAX(LAST_LOGON), 'UTC','EST' ) as LAST_LOGON
, CURRENT_DATE-timezone(MAX(LAST_LOGON), 'UTC','EST' ) as LAST_LOGON_DAYS
,SUM(ACCESS_COUNT) as TOTAL_LOGIN_COUNT
--- List concatenation here: put all database on one line comma delimited.
--- Read: http://nz2nz.blogspot.com/2016/02/netezza-concatenate-rows-into-string.html
,trim (trailing ', ' from
SQL_EXTENSIONS.. replace
(SQL_EXTENSIONS.. replace
(SQL_EXTENSIONS..XMLserialize
(SQL_EXTENSIONS..XMLagg
(SQL_EXTENSIONS..XMLElement( 'X',dbname))),
'<X>','' )
, '</X>' ,',' )) AS DB_ACCESSED
FROM
(
select username
,dbname
, max( time) AS LAST_LOGON
, count(* ) AS ACCESS_COUNT
from QUERY_HISTORY.."$v_hist_log_events"
where username not like 'ADMIN%' --- not interested in ADMIN** users
and username not like 'ZZ_%' --- not interested in ZZ_** functional users
group by username
, dbname
) as LAST_LOGON_DAYS
left outer join _v_user u using (username)
GROUP BY 1 ,2 ,3
order by TOTAL_LOGIN_COUNT desc
;
SELECT 'DEV' AS ENV
, QP.USERNAME AS USERNAME
, DATE_TRUNC('day' , QP.SUBMITTIME) AS THEDAY
, MIN(QP.SUBMITTIME) AS RUN_FROM
, MAX(QE.FINISHTIME) AS RUN_TO
, COUNT(*) AS QUERY_COUNT
, SUM((QE.FINISHTIME - QP.SUBMITTIME)) AS TOTAL_ELAPSED
, SUM(QE.RESULTROWS) AS TOTAL_ROWS
, SUM(P.RESULTBYTES) AS TOTAL_BYTES
FROM ( QUERY_HISTORY.QHIST_USER."$hist_query_prolog_3" QP
JOIN QUERY_HISTORY.QHIST_USER."$hist_query_epilog_3" QE
USING (NPSID, NPSINSTANCEID, OPID) )
JOIN ( QUERY_HISTORY.QHIST_USER."$hist_session_prolog_3" SP
JOIN QUERY_HISTORY.QHIST_USER."$hist_session_epilog_3" SE
USING (NPSID, NPSINSTANCEID, SESSIONID))
USING (NPSID, NPSINSTANCEID)
LEFT JOIN (
SELECT PP.NPSID
, PP.NPSINSTANCEID
, PP.OPID
, PP.SESSIONID
, SUM(PE.RESULTBYTES) AS RESULTBYTES
, SUM((PP.PREPTIME - PP.SUBMITTIME)) AS QUEUETIME
, SUM((PP.GRATIME - PP.PREPTIME)) AS PREPTIME
, SUM((PP.STARTTIME - PP.GRATIME)) AS GRATIME
, COUNT(PP.PLANID) AS NUMPLANS
, SUM(PP.QCRESTART) AS NUMRESTARTS
FROM (QUERY_HISTORY.QHIST_USER."$hist_plan_prolog_3" PP
JOIN QUERY_HISTORY.QHIST_USER."$hist_plan_epilog_3" PE
USING (NPSID, NPSINSTANCEID, OPID, SESSIONID, PLANID))
GROUP BY PP.NPSID, PP.NPSINSTANCEID, PP.OPID, PP.SESSIONID
) P
USING (NPSID, NPSINSTANCEID, OPID)
WHERE QP.SESSIONID = SP.SESSIONID
AND QE.STATUS = 0
AND QP.SUBMITTIME > current_timestamp - interval '60 days'
AND UPPER(QP.QUERYTEXT) NOT IN ( 'COMMIT','BEGIN' , 'SELECT * FROM DUMMY WHERE 1=2')
AND UPPER(QP.QUERYTEXT) not like 'SHOW %'
AND UPPER(QP.QUERYTEXT) not like 'SET %'
AND UPPER(QP.QUERYTEXT) not like 'SELECT VERSION%'
AND UPPER(QP.QUERYTEXT) not like 'SELECT DB_ENCODING%'
AND UPPER(QP.QUERYTEXT) not like 'SELECT NCHAR_ENCODING%'
AND UPPER(QP.QUERYTEXT) not like 'SELECT CURRENT_SID%'
AND UPPER(QP.QUERYTEXT) not like 'SELECT ''JDBC CLIENT VERSION''%'
/* to be continued based on your system. This xclusion list is to be revised ...*/
GROUP BY ENV, QP.USERNAME, DATE_TRUNC( 'day', QP.SUBMITTIME)
order by THEDAY desc, TOTAL_ELAPSED desc
;
Great post! A well-written resource to anyone looking to boost their NETEZZA through blog commenting. The tools mentioned will also go a long way in making the entire process much more efficient and effective.
ReplyDeleteI found your blog very interesting and very informative. I think your blog is great information source & I like your way of writing and explaining the topics. A database administrator (DBA) is an IT professional responsible for the configuration, monitoring, administration, installation, upgrading, and security of databases in an organization. More Details About SQL Click here.
ReplyDeleteNeeded to compose one simple word yet thanks for the suggestions that you are contributed here, please do keep updating us...
ReplyDeleteOracle ADF Online Training
Oracle APPS Functional Online Training
Oracle DBA Online Training
please do keep updating us...
ReplyDeleteCEH Training In Hyderbad
Astonishing web diary I visit this blog it's incredibly magnificent. Strangely, in this blog content made doubtlessly and sensible. The substance of information is instructive.
ReplyDeleteOracle Fusion Financials Online Training
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Within the next step, you can find information through the last service provider. Keeping these records in your records will likely be quite advantageous to keep your account along side QuickBooks Payroll Support Phone Number
ReplyDeleteQuickBooks Enterprise Tech Support Number get required suggestion after all time. The group sitting aside understands its responsibility as genuine & offers reasonable assistance with your demand.
ReplyDeleteto us at QuickBooks Support Phone Number The majority of us works 24*7 and serve its customers with excellent service each time they e mail us. It doesn't matter what issue is and however complex it truly is, we assure you that individuals offers you optimal solution as quickly as possible.
ReplyDeleteThe bond lost issue, connection with the free web, sync issue in the software along with other style of setting which not easily can be located & may block the entire workflow .
ReplyDeleteFor the rectification associated with issue call QuickBooks Technical Support Number is might help the Quickbooks users are right individuals to pin point and fix the issue completely. They assure resolution within the minimum wait time that saves your valuable time.
QuickBooks Payroll Service Phone Number is available and beneficial to many business owners, accountants, CA, CPA to calculate taxes and pay employees. Types of issues and errors arise the necessity to contact the Intuit Payroll support team using QuickBooks Payroll telephone number.
ReplyDeleteThe experts at our QuickBooks EnterprIse Technical Support Number have the necessary experience and expertise to address all issues linked to the functionality associated with the QuickBooks Enterprise.
ReplyDeleteWhen you should really be realizing that QuickBooks has made bookkeeping an easy task, you'll find times when you may possibly face a few errors that may bog over the performance when it comes to business. QuickBooks Support Phone Number is the better location to look for instant help for virtually any QuickBooks related trouble.
ReplyDeleteConsist of a beautiful bunch of accounting versions, viz., QuickBooks Support Phone Number Pro, QuickBooks Premier, QuickBooks Enterprise, QuickBooks POS, QuickBooks Mac, QuickBooks Windows, and QuickBooks Payroll, QuickBooks has grown to become a dependable accounting software that one may tailor depending on your industry prerequisite.
ReplyDeleteQuickBooks Enterprise Support Number has almost eliminated the traditional accounting process. Along with a number of tools and automations, it offers a wide range of industry verticals with specialized reporting formats and tools.
ReplyDeleteThe group deployed at the final outcome of QuickBooks Support Phone Number takes great proper care of all from the issues for the software. QuickBooks Support telephone number have a team of experts which can be pro in handling all of the issues because of this incredible software.
ReplyDeleteQuickBooks Tech Support Number is perhaps all concerning User expertise which explains why they need creating dedicated QuickBooks school Support Phone variety; Users will dial the fee number just in case they will have any facilitate in regards to the code.
ReplyDeleteGet striking solutions for QuickBooks near you straight away! Without having any doubts, QuickBooks has revolutionized the entire process of doing accounting this is the core strength for small as well as large-sized businesses. QuickBooks Support Phone Number is assisted by our customer care representatives who reply to your call instantly and resolve all of your issues at that moment. It really is a backing portal that authenticates the users of QuickBooks to operate its services in a user-friendly manner.
ReplyDeleteIt Will Makes Your Bank Account Job Easy And A Lot Of Important, It's Not Complicated, And Yes It Really Is An Undeniable Fact. QuickBooks Enterprise Is Obviously One The Most Consistent Enterprise Software, Its Recent Version QuickBooks Tech Support Number.
ReplyDeleteMany companies have now been saving a frequent sum of money out of opting QuickBooks Payroll to transfer the salary with regards to their employees. Also, the payrolls are accurate and shall be cleared timely through QuickBooks Technical Support Number With such satisfactory actions happening around, certain data related issues shall happen every so often. This is how you have to be definite in creating a routine backup and know the ways to restore the info in just about any crucial situations.
ReplyDeleteyou’ll scan in-depth articles concerning most of the errors and also the best way to resolve them. Rectifying errors desires in-depth information regarding the device as well as its intricacies. Our web site can be a go-to supply for everything related to QuickBooks Support.
ReplyDeleteThe best solutions are imperative for the growth of the business enterprise. Therefore, QuickBooks Tech Support Phone Number is available for users across the world once the best tool to supply creative and innovative features for business account management to small and medium-sized business organizations.
ReplyDeleteYou can further see the contact information on how to QuickBooks Support Phone Number. QuickBooks technical support team are active for only 5 days (Mon-Fri) in per week. The QuickBooks support phone number is available these days from 6 AM to 6 PM.
ReplyDeleteOn September 22, 2014, Intuit publicized the release of QuickBooks 2015 with types that users have already been completely demanding through the past versions. Amended income tracker, pinned notes, better registration process and understandings on homepage are the large choice of general alterations for several versions of QuickBooks 2015. It can benefit for QuickBooks Enterprise Phone Support to have technical help & support for QuickBooks.
ReplyDeleteIt is possible to dial the QuickBooks customer Support Number to possess a spoken language because of the QuickBooks Specialists or else you can even talk to them by victimization the chat choice on our internet site.
ReplyDeleteQuickBooks Payroll Tech Support Phone Number could remotely hook up to your computer to solve most of the issues. The QuickBooks Experts understand that each and every business is unique and has now different needs; that is why, we provide highly customized and agile methods to help you enjoy top-notch customer support and satisfaction.
ReplyDeleteEverbody knows there are always two sides to a coin and QuickBooks Support Number is not any different. This software also throws some errors in the end. Sometimes it becomes rather difficult to know this will be with this specific error code or message.
ReplyDeleteEarnings: for starters, a small business can simply survive if it is making adequate profits to smoothly run the operations associated with the work. Our QuickBooks Support team will certainly show you in telling you about the profit projections in QuickBooks Support Phone Number.
ReplyDeleteUnneeded to mention, QuickBooks has given its utmost support to entrepreneurs in decreasing the price otherwise we’ve seen earlier, however, an accountant wont to hold very different accounting record files. Utilising the assistance of QuickBooks, users will maintain records like examining, recording and reviewing the complicated QuickBooks Support Phone Number procedures.
ReplyDeleteError technically means an estimate difference between the calculated value of a quality and its true value. The numeric value, here, 9999 is the value to identity the error. If you would like to learn how to Fix QuickBooks Error 9999, you can continue reading this blog.
ReplyDeleteI am very happy when this blog post read because blog post written in good manner and write on good topic.Thanks for sharing valuable information…
ReplyDeleteSalesforce Training in Chennai
Salesforce Online Training in Chennai
Salesforce Training in Bangalore
Salesforce Training in Hyderabad
Salesforce training in ameerpet
Salesforce Training in Pune
Salesforce Online Training
Salesforce Training
Nice post,
ReplyDeletePower BI Training
Nice Article
ReplyDeleteDevops Online Training
This is amazing post for Quickbooks user which is one of the best software for manipulating many accounting task . this software could be any issue . to resolve your issue connect with at icwrapper.dll failed to register quickbooks.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteAmazing details, many thanks for providing this kind of information. The best and most fascinating information can be found on your website. Many thanks!
ReplyDeleteDevOps Training near me