-
SQL Server Database snapshot as a change control tool
Microsoft introduced database snapshot in Sql Server 2005. It is used to keep a point-in-time snapshot of the database state at the time the snapshot was taken. It is also good for reporting purposes when database mirroring is implemented, because while a mirroring partner database is not accessible, one can produce a snapshot of that…
-
SQL code for SQL and Relational Theory
-
Perl script to split sql script into separate files
Below is a quick script I put together to split one single file that contains many stored procedures into many files that contain just a single stored procedure. It can be easily modified for views, user-defined functions, etc.. Notes: 1. It does put BEGIN and END before and after the procedure creation. Because some script…
-
Calling MySQL fans in the near west suburb of Chicago
-
Generate insert scripts for SQL Server tables with Perl
Here is a quick hack with Perl to generate insert statements to reproduce data already exist in a given table. It is similar to results mysqldump generates. A few things worth mentioning here: 1. This script uses a text file, TableList, that contains a list of tables that you want insert statements created. Each line…