#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
На этой странице сайта вы можете посмотреть видео онлайн SQL Database Queries using Powershell длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь The Long Voyage 27 Июль 2019, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 4,726 раз и оно понравилось 32 зрителям. Приятного просмотра!