---
title: "MSSQL Server"
topic: "Methodology and Resources"
topicSlug: "methodology-and-resources"
sourcePath: "Methodology and Resources/MSSQL Server - Cheatsheet.md"
sourceUrl: "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/3ac27901c711/Methodology%20and%20Resources/MSSQL%20Server%20-%20Cheatsheet.md"
sha: "3ac27901c711"
isReadme: false
---
# MSSQL Server
:warning: Content of this page has been moved to [InternalAllTheThings/cheatsheets/mssql-server-cheatsheet](/internal/cheatsheets)
- [Tools](/internal/cheatsheets)
- [Identify Instances and Databases](/internal/cheatsheets)
- [Discover Local SQL Server Instances](/internal/cheatsheets)
- [Discover Domain SQL Server Instances](/internal/cheatsheets)
- [Discover Remote SQL Server Instances](/internal/cheatsheets)
- [Identify Encrypted databases](/internal/cheatsheets)
- [Version Query](/internal/cheatsheets)
- [Identify Sensitive Information](/internal/cheatsheets)
- [Get Tables from a Specific Database](/internal/cheatsheets)
- [Gather 5 Entries from Each Column](/internal/cheatsheets)
- [Gather 5 Entries from a Specific Table](/internal/cheatsheets)
- [Dump common information from server to files](/internal/cheatsheets)
- [Linked Database](/internal/cheatsheets)
- [Find Trusted Link](/internal/cheatsheets)
- [Execute Query Through The Link](/internal/cheatsheets)
- [Crawl Links for Instances in the Domain](/internal/cheatsheets)
- [Crawl Links for a Specific Instance](/internal/cheatsheets)
- [Query Version of Linked Database](/internal/cheatsheets)
- [Execute Procedure on Linked Database](/internal/cheatsheets)
- [Determine Names of Linked Databases](/internal/cheatsheets)
- [Determine All the Tables Names from a Selected Linked Database](/internal/cheatsheets)
- [Gather the Top 5 Columns from a Selected Linked Table](/internal/cheatsheets)
- [Gather Entries from a Selected Linked Column](/internal/cheatsheets)
- [Command Execution via xp_cmdshell](/internal/cheatsheets)
- [Extended Stored Procedure](/internal/cheatsheets)
- [Add the extended stored procedure and list extended stored procedures](/internal/cheatsheets)
- [CLR Assemblies](/internal/cheatsheets)
- [Execute commands using CLR assembly](/internal/cheatsheets)
- [Manually creating a CLR DLL and importing it](/internal/cheatsheets)
- [OLE Automation](/internal/cheatsheets)
- [Execute commands using OLE automation procedures](/internal/cheatsheets)
- [Agent Jobs](/internal/cheatsheets)
- [Execute commands through SQL Agent Job service](/internal/cheatsheets)
- [List All Jobs](/internal/cheatsheets)
- [External Scripts](/internal/cheatsheets)
- [Python](/internal/cheatsheets)
- [R](/internal/cheatsheets)
- [Audit Checks](/internal/cheatsheets)
- [Find and exploit impersonation opportunities](/internal/cheatsheets)
- [Find databases that have been configured as trustworthy](/internal/cheatsheets)
- [Manual SQL Server Queries](/internal/cheatsheets)
- [Query Current User & determine if the user is a sysadmin](/internal/cheatsheets)
- [Current Role](/internal/cheatsheets)
- [Current DB](/internal/cheatsheets)
- [List all tables](/internal/cheatsheets)
- [List all databases](/internal/cheatsheets)
- [All Logins on Server](/internal/cheatsheets)
- [All Database Users for a Database](/internal/cheatsheets)
- [List All Sysadmins](/internal/cheatsheets)
- [List All Database Roles](/internal/cheatsheets)
- [Effective Permissions from the Server](/internal/cheatsheets)
- [Effective Permissions from the Database](/internal/cheatsheets)
- [Find SQL Server Logins Which can be Impersonated for the Current Database](/internal/cheatsheets)
- [Exploiting Impersonation](/internal/cheatsheets)
- [Exploiting Nested Impersonation](/internal/cheatsheets)
- [MSSQL Accounts and Hashes](/internal/cheatsheets)
- [References](/internal/cheatsheets)