#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
In questa pagina del sito puoi guardare il video online SQL Database Queries using Powershell della durata di ore minuti seconda in buona qualità , che l'utente ha caricato The Long Voyage 27 luglio 2019, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 4,726 volte e gli è piaciuto 32 spettatori. Buona visione!