Skip to content

Archive for

Filesystem monitoring by NPS software

Starting from NPS version 7, we can now monitor Netezza mount points /nz and /nzscratch using the newly introduced system manager threshold parameters. These parameters can be defined in /nz/data/config/system.cfg

1) sysmgr.hostFileSystemUsageThresholdOneToRiseEvent (default value is 85%)
This parameter will send a notification when ever /nz or /nzscratch filesystem (mount point) usage goes above 85%.

2) sysmgr.hostFileSystemUsageThresholdTwoToRiseEvent (default value is 90%)
This parameter will send a warning message when ever /nz or /nzscratch filesystem (mount point) usage goes above 90%.

3) sysmgr.hostFileSystemUsageThresholdToStopSystem (default value is 95%)
This parameter will stop Netezza if /nz or /nzscratch usgae goes above 95% (for NPS version 7.0.0, 7.0.1 and 7.0.2). Starting from v7.0.3 system stops Netezza only if /nz file system is 95% full and not for /nzscratch.

All these parameters can take any value between 1 to 100, in percentage.

Script to list out all the SQL Server logins

Script to list out all the SQL Server logins along with its properties. The output of this script will be a create login script which can be run on the target machine where all these logins are to be migrated. You will see their are two selct queries in this script. First select query is to pull out all the SQL authenticated logins and second script will pull out all the Windows authenticated logins.

SELECT 'CREATE LOGIN ' + QUOTENAME(name) + ' WITH PASSWORD=' + sys.fn_varbintohexstr(password_hash) + ' HASHED, SID=' + sys.fn_varbintohexstr(sid) + ', ' + 'DEFAULT_DATABASE='+ QUOTENAME(COALESCE(default_database_name, 'master')) + ', DEFAULT_LANGUAGE=' + QUOTENAME(COALESCE(default_language_name, 'us_english')) + ', CHECK_EXPIRATION=' + CASE is_expiration_checked WHEN 1 THEN 'ON' ELSE 'OFF' END + ', CHECK_POLICY=' + CASE is_policy_checked WHEN 1 THEN 'ON' ELSE 'OFF' END as 'SQL Server Logins' FROM sys.sql_logins WHERE name not like 'sa' UNION ALL SELECT 'CREATE LOGIN ' + QUOTENAME(name) + ' FROM WINDOWS WITH ' + 'DEFAULT_DATABASE='+ QUOTENAME(COALESCE(default_database_name, 'master')) + ', DEFAULT_LANGUAGE=' + QUOTENAME(COALESCE(default_language_name, 'us_english')) as 'SQL Server Logins' FROM sys.server_principals WHERE type IN ('U','G')