Skip to content

Simple Utility to help manage changes in database structures over time.

Notifications You must be signed in to change notification settings

gitberry/sqlHash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL Hash (MS SQL)

A tiny utility that distils the structure of each table into a hash value (name & type) and saves to an output file. Very useful when managing/monitoring database structures over time.

Description

This is for folks managing or supporting databases (MS SQL) and want a record of database changes over time.

More info in getting started on automation.

Getting Started

Compile and install (I still have not learned how to get a .netCore solution to compile to a single EXE - but that's a different story.)

You provide a connect string that will connect you to a database (ie Server=ServerName;Database=DatabaseName;Trusted_Connection=True;) and you are provided with a list of each table and view in the database prefaced by a hash of the fieldnames and types within each of those tables/views.

This is the essence of functionality - now to automate it (as I once did years ago) I wrapped that functionality in a batch file (you could do it in other automation tools - I just used what was handy at the time) and an example of that kind of automation batch file is in BatchFileToBestUtilize.txt in the project. It demonstrates the various things you need to do in the cycle of checking your database structures regularly, it could be modified to do modifications or whatever is needed if you automate the process - but it essentially has timestamps and comparisons so you can quickly assess if the structure today matches a baseline you set in the past and you can review when that happened.

Dependencies

This is a .NET core 5 console app with all the compile dependencies that come out of the box.
I did my original decades ago in some older .NET framework in visual basic for the then employer - This winter I wanted to do take my first crack at it in a newer MS tech stack although I'd like to also get my compile switches better - I can't imagine .net core can't allow you to compile to a single (platform targetted of course) exe.

Authors

Contributors names and contact info

gitberry@northberry.ca - the primary github handle for Clark Rensberry

Version History

Jan 30, 2022 - First submit is very bare bones - many TODO notes on where I'd like to improve it.

License

This project is licensed under the BSD License - copy, use, etc, attribute if you want, no blame accepted, acknowledged or even considered.

Acknowledgments

Various acknowledgements within the code.

About

Simple Utility to help manage changes in database structures over time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages