Skip to content

dungeym/Snippets-SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL Snippets

This repository contains a collection of SQL scripts that I've collected over the years. Some of them are mine, some of them might be yours, if your recognise something please let me know so I can give you credit :)

This project is licensed under the terms of the MIT license.

If you find these useful then I'm glad but I'm not a DBA so use at your own risk.

Database

Generic database scripts for admin, analysis and audit tasks.

  • drop all objects in a database.
  • rebuild indexes.
  • revoke all permissions.
  • grant permissions.
  • disable / enable triggers.
  • discover space used for tables, indexes, database files.
  • generate a checksum that can be used to compare one database to another (a bit low-tech..)

Functions

A series of functions to provide various functionally.

  • convert DateTime to Ticks.
  • convert Ticks to DateTime.
  • parse string to table.

Other

Random scripts.

  • create a Deadlock to test a system's ability to cope with this error.

Snippets

Snippets for SQL Prompt.

About

A collection of SQL scripts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages