> For the complete documentation index, see [llms.txt](https://tenaka.gitbook.io/pentesting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tenaka.gitbook.io/pentesting/enumeration/databases/ms-sql.md).

# MS SQL

cd Impacket/examples

mssqlclient.py sa\@10.0.0.1

#### #Navigation

select name from sys.databases

#### #select database to interrogate&#x20;

use databasename;

select \* from information\_schema.tables

#### #list all tables

select tabl&#x65;*\_name from informaiton\_schema.tables*

select \* from information\_*schema.columns where table\_name='name of table'*

#### *#view data of table*

#### *#Investigate output looking for headings within the data, not the actual headings at the top of the output*

*select username,email,password from 'name of table'*
