Labels

Friday, November 2, 2018

List Folders a given user have access



# List Folders a given user have access, check the log file like Get_Folder_Permissions_20181102_035121_result.log
#Usage: .\Get_Folder_Permissions.ps1 "*Path*" "*User*"

param(
[String]$Root = $( throw 'credentialIdentity is required' ), 
[String]$User= $( throw 'credentialIdentity is required' )
)

$timeStamp =(Get-Date).tostring("yyyyMMdd_hhmmss")
$logFile ="Get_Folder_Permissions_"+$timeStamp+".log"
$resultFile ="Get_Folder_Permissions_"+$timeStamp+"_result.log"

# Get computer name with Domain
Write-Output "ComputerName: $env:COMPUTERNAME.$env:USERDNSDOMAIN" | Tee-Object -file $logFile -Append
#Write-Output "$(Get-Date -Format "yyyy-MM-dd hh:mm:ss") Server:  $env:COMPUTERNAME.$env:USERDNSDOMAIN" | Out-file $logFile -Force
#Get-WmiObject Win32_ComputerSystem

Write-Output "Root= $Root, User=$User"| Tee-Object -file $logFile -Append

#get all groups that a user is a member of
(New-Object System.DirectoryServices.DirectorySearcher("(&(objectCategory=User)(samAccountName=$($User)))")).FindOne().GetDirectoryEntry().memberOf | Tee-Object -file $resultFile -Append


#loop through all subfolders that a user have access
foreach($item in Get-ChildItem $Root -Recurse | where-object {($_.PsIsContainer)})
{
    Write-Output $item.FullName | Tee-Object -file $logFile -Append
    (Get-Acl $item.FullName).Access | ?{(($_.IdentityReference -match $User)-and (-not $_.IsInherited ))} | Select $item.FullName, IdentityReference,FileSystemRights,AccessControlType,IsInherited,InheritanceFlags,PropagationFlags | Tee-Object -file $resultFile -Append
   
}



Wednesday, October 24, 2018

Oracle string aggregation by order

Custom aggregate function inside a package does not work??

LISTAGG Analytic Function in 11g Release 2 SELECT deptno, LISTAGG(ename, ',') WITHIN GROUP (ORDER BY ename) AS employees FROM emp GROUP BY deptno; WM_CONCAT Built-in Function (Not Supported) SELECT deptno, wm_concat(ename) AS employees FROM emp GROUP BY deptno; User-Defined Aggregate Function Specific Function Generic Function using Ref Cursor ROW_NUMBER() and SYS_CONNECT_BY_PATH functions in Oracle 9i COLLECT function in Oracle 10g https://oracle-base.com/articles/misc/string-aggregation-techniques http://www.oracle.com/technetwork/issue-archive/2006/06-jul/o46sql-083623.html

Valuable Developer Tools

These is the list of tools that we spoke about that I think would be very valuable to us to ensure we deliver very high quality of code:

 - .NET Memory Profiler. Leading tool to optimize memory usage and find memory leaks in any .NET application. This tool is used internally by Microsoft to analyze memory in .NET applications and .NET itself.
- JetBrains dotTrace Performance. Leading profiling tool to optimize .NET applications and detect performance bottlenecks. This tool is very lightweight and very fast to run and produces very accurate results.
- .NET Reflector. A must have tool for .NET development to understand .NET Framework and debug any .NET code. Although there’s very good free alternative ILSpy which has almost the same features.
- Redgate ANTS Performance Profiler. Another good and feature rich performance profiling tool however a bit heavy and requires very good hardware to perform performance tests.
 - SQLSolutions & SQL Power Tools. Good tools to analyze and detect performance problems in your SQL Server.

How to use AdWords




Quickly Create Keyword Lists with the RedFly Keyword Manager Tool

Job Posting Sample

Senior Data Analyst/ETL Developer (SQL, Hadoop, Talend, SSIS, BI)

Using SQL Database Project


Predict the size of database growth


Sample code of Back Testing


quantitative finance - Pattern Recognition on Financial Data



SQL Questions