#thelongvoyage ( Subscribe for more )
/ the.long.voyage
--------------------------------------------------------
Agenda : Read SQL Database of Remote Server by PowerShell
Task: Find Brave.exe user/program in DB
( SQL Server is running on Remote Server Machine )
and you have a user with appropriate rights
1. connect to remote SQL Server
2. list all the databases on that server
3. list all the tables for any specific database
4. list schema (structure)
5. list columns names
6. read table data ( find brave.exe )
-----------------------------------------------------------
Commands Reference:
install-module sqlserver ( install this module to use SQL cmdlets on PowerShell)
Get-SqlInstance -ServerInstance COMPUTERNAME -Credential UserName
Get-SqlDatabase -ServerInstance COMPUTERNAME -Credential UserName
$a = Get-SqlDatabase -ServerInstance COMPUTERNAME -Database process -Credential UserName
$a | Get-Member -Name Tables
$a.Tables
Read-SqlTableData -ServerInstance COMPUTERNAME -Credential UserName -DatabaseName process -TableName proc -SchemaName dbo -TopN 10 | where Path -Like brave
the end
Nesta página do site você pode assistir ao vídeo on-line SQL Database Queries using Powershell duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário The Long Voyage 27 Julho 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 4,726 vezes e gostou 32 espectadores. Boa visualização!