2,187
edits
m (→Commands: Minor update) |
(Re-ordered sections) |
||
Line 92: | Line 92: | ||
#* File extension: <code>trn</code> | #* File extension: <code>trn</code> | ||
#* File age: Select as appropriate | #* File age: Select as appropriate | ||
== Gain Sysadmin Rights == | == Gain Sysadmin Rights == | ||
Line 144: | Line 134: | ||
* No SQL services are running | * No SQL services are running | ||
* No ''Microsoft SQL Server Management Studio'' instances are running (including via RDP, check for <code>Ssms.exe</code> or <code>Ssms.exe *32</code> in ''Task Manager'' | * No ''Microsoft SQL Server Management Studio'' instances are running (including via RDP, check for <code>Ssms.exe</code> or <code>Ssms.exe *32</code> in ''Task Manager'' | ||
== Commands and Maintenance == | |||
Crib sheet of some very basic stuff, the syntax isn't exactly the same, but see also [[MySQL]] | |||
<source lang="sql"> | |||
SELECT * FROM MASTER..SYSDATABASES /* Show databases */ | |||
EXEC sp_databases; /* Show databases */ | |||
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '%' /* Show tables */ | |||
SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' /* Show base tables only (not views etc) */ | |||
</source> | |||
[[Category:Applications]] | [[Category:Applications]] | ||
[[Category:Microsoft]] | [[Category:Microsoft]] |