PowerUpSQL: A PowerShell Toolkit for Discovering SQL Server Vulnerabilties

PowerUpSQL is an amazing tool to audit your SQL Server instances. Not only does it do discovery of SQL Server on your AD but can also help identify common SQL Server vulnerabilities. It can be download from below 2 links https://github.com/NetSPI/PowerUpSQL https://www.powershellgallery.com/packages/PowerUpSQL/ For More information on how to user PowerUpSQL goto below link: https://blog.netspi.com/powerupsql-powershell-toolkit-attacking-sql-server/

Advertisements

Copy one column to another sqlserver

UPDATE table SET columnB = columnA --This will update every row. UPDATE table_name SET destination_column_name=orig_column_name WHERE condition_if_necessary --This will update rows which satisfy the WHERE clause UPDATE table1 SET column1 = ( SELECT column2 FROM table2 WHERE table2.id = table1.id ); Whereby: table1 = table that has the column that needs to be updated table2 … Continue reading Copy one column to another sqlserver

Truncate Log in Database Mirroring SQL Server 2008 2012

select log_reuse_wait_desc from sys.databases where name = 'AdventureWorks' If Output is "LOG_BACKUP" -- Execute 2 Times just in case -- BACKUP LOG AdventureWorks TO DISK='NUL:' -- Now Truncate the Log -- USE AdventureWorks GO ALTER DATABASE AdventureWorksSET RECOVERY SIMPLE WITH NO_WAIT; GO DBCC SHRINKFILE(AdventureWorks_LOG, 100); GO ALTER DATABASE AdventureWorks SET RECOVERY FULL WITH NO_WAIT; GO