SQLDBA
useful things about data, databases, data warehouse and related stuff. The opinions expressed in this blog are mine alone. They may not necessarily reflect that of my employers and customers - both past or present. The comments left by the reviewers are theirs alone and may not reflect my opinion whether implied or not. None of the advice is warranted to be free of errors and omission. Please use at your own risk and after thorough testing in your environment.
Thursday, March 29, 2018
Wednesday, April 19, 2017
JIRA Query users mentioned in issue using JQL
project = "KEY" and (summary ~ currentUser() OR description ~ currentUser() OR comment ~ currentUser()) and updatedDate >= -7d
Monday, November 14, 2016
Convert Oracle date to int using native Microsoft date
SQL Server/Excel
select getdate() 'Today',convert(int,getdate())
Oracle
select current_date,cast(current_date - date '1900-01-01' as int)
from dual;
14-NOV-16 42687
Thursday, November 10, 2016
Oracle subtract days/Hours from current timestamp
select to_timestamp(to_char(systimestamp + INTERVAL '-1' DAY, 'dd-mon-yy hh.mi.ss.ff4 AM')) from dual; ------ -1 day
select to_timestamp(to_char(systimestamp + INTERVAL '-2' HOUR, 'dd-mon-yy hh.mi.ss.ff4 AM')) from dual; ----- -2 hours current date time
select to_timestamp(to_char(systimestamp + INTERVAL '-1' DAY, 'dd-mon-yy hh.mi.ss.ff4 AM')) + INTERVAL '-2' HOUR from dual; ------- -2 hours -1 day
Thursday, August 25, 2016
Change Linux root user password of Cloudera Hadoop nodes
Cloudera Manager only uses the root credentials when
adding a new node to the cluster. Once the node has been added and the Cloudera
Manager agent deployed the server will no longer use the root credentials.
i.e. Once your
cluster is set up, you can safely change the root password. Cloudera Manager
does not save SSH credentials and all credential information is discarded once
the installation is complete.
Changing the root password will not affect any currently
deployed services. Nodes talk to each other o SSH key based authentication
sh-4.2# passwd root New password: Retype new password: passwd:all authentication tokens updated successfully.
Monday, June 29, 2015
Splunk useful commands
put cluster in maintenance mode
$SPLUNK_HOME/bin/splunk enable maintenance-mode
rolling restart
$SPLUNK_HOME/bin/splunk enable maintenance-mode
rolling restart
splunk rolling-restart cluster-peers
Daily License volume by host
index=_internal source=*license_usage.log type=Usage | stats sum(b) as bytes by h | eval MB = round(bytes/1024/1024,1) | fields h MB | rename h as host
Find AD account lockout status in Splunk
EventCode=4740 Account_Name=<account name>
Friday, May 29, 2015
Command to recursively delete files older than N days
this command will delete all files inside c:\Folder and subfolders which are older than <Number of Days>
forfiles -p "C:\Folder" -s -m *.* /D -<Number of Days> /C "cmd /c del @path"
forfiles -p "C:\Folder" -s -m *.* /D -<Number of Days> /C "cmd /c del @path"
Subscribe to:
Posts (Atom)