Wednesday, February 22, 2017

SQL Code Guard 2.9 released

Nothing special - just signed with renewed code sign certificate, small fixes, etc
Have fun!

Wait a minute! Almost forgot.
More great news coming soon, stay tuned, subsribe to twitter https://twitter.com/SQLCodeGuard if you don't want miss somthing fun.

Wednesday, March 9, 2016

New developer build of SQL Code Guard released

Issues fixed since last developer build
[*] fixed incorrect binding of MI008 to MI007
[*] fixed xtra EI028 in case with named default constraint
[*] fixed error with IncludeIssues method when issues were not actually marked as Warning except ALL issue
[*] fixed extra MI003 Unqualified column name on xml methods
[*] fixed several CGUNP on CREATE/ALTER database (rarely used/new options)


Full list of issues fixed since last release you can find here - http://sqlcodeguard.com/index-database-changelog.html#R2_9_developer

Have fun!

Tuesday, December 1, 2015

SQLSaturday 426, Lviv, Dec 05 - only few days left!

Last changes and preparation for SQLSaturday in Lviv - http://sqlsaturday.com/426/EventHome.aspx
You still have a time to register and attend it.
Great city, great people, great event - don't miss it!

Wednesday, November 11, 2015

Support for SSMS 2016 now available

Good news!
Red-Gate published new version of its SIPF framework with support of SSMS 2016!
Now you can simply download and install SIPF from Red-Gate's site http://documentation.red-gate.com/display/MA/SSMS+ecosystem+project - and you'll be able to use SQL Code Guard and ExpressProfiler from SSMS 2016!

Great job, Red-Gate! Awesome as always!
Thank you, David!




Friday, October 30, 2015

Catching specific statements using new MI008 "Statement used" rule

Imagine that you want (for some reason) prohibit usage of some statement (or statements), eg - CURSOR
How can you find if this statement is used in the script? To perform this task you should use newly added rule MI008 "Statement used"

Monday, September 21, 2015

I'm alive!!!!

Hi all!
Sorry for long delay but i was a pretty busy preparing SQLSat
Now mission is accomplished and i'll return to development in the nearest future.


Thursday, June 25, 2015

ExpressProfiler: say "Hi!" to new developer!

I glad to introduce new member of Express Profiler team - Chris Moore!
He has many ideas and eager to implement them.
Welcome onboard, Chris!

Wednesday, June 24, 2015

SQL Code Guard - Developer build: just as planned

Well, not exactly just as planned, but at last!
Few minor fixes
[*] fixed unparsed with CONTAINS condition
[*] fixed xtra "ST010 Use alias for all table sources" for UPDATE/DELETE statements with single FROM clause item
[*] fixed xtra MI003 "Unqualified column name" on DATENAME(MONTH, GETDATE())
You can download Developer Build at http://sqlcodeguard.com/
Enjoy! At your own risk, of cours ;)

Tuesday, June 16, 2015

SQL Code Guard - developer builds

Hi all
Unfortunatelly I'm pretty busy now and will be busy till end of the year
So I have not so much time for development and feature implementation.
It may take a lot of time while I implement enough features or fix enough bugs to make "release".
So i've decided to esatblish "developers build" - build that i'll publish every week/2 weeks or when i decide that changes worths to be published.
Same installation package, still digitally signed, but may contains some untested code.
Use it at your own risk. Well... Everything as before :) so nothing changes except of more frequent builds.


Wednesday, May 20, 2015

SqlSaturday 377, Kiev, May 23 - only 3 days left

Hello everyone!
As you may already know - on 23rd May in Kiev will be held SqlSaturday 377.
Hurry up!
You can meet many famous speakers, including Kevin Boles, Benjamin Nevares, Dmitri Korotkevitch, Satya Jayanty, Mihail Mateev, Boris Hristov, Dmitry Piliugin and other.
Also you can attend 3 Pre-cons:
Kevin Boles. Tune Like A Guru! - https://sqlsaturday-377-precon-kevin-boles.ticketforevent.com/
Dmitri Korotkevitch. SQL Server Internals from the practical angle. - https://sqlsaturday-377-precon-dmitr.ticketforevent.com/
Benjamin Nevarez. SQL Server Query Tuning & Optimization. - https://sqlsaturday-377-precon-benjamin-nevarez.ticketforevent.com/
Session schedule can be found here http://www.sqlsaturday.com/377/Sessions/Schedule.aspx
Follow SqlSaturday 377 at Twitter -  #sqlsatkiev
See you in Kiev at SqlSaturday 377!

Monday, May 4, 2015

SQL Code Guard v2.8 released

Main change - SCG moved back to .Net framework 3.0 to restore support of SSMS 2008/2008R2
Few small fixes, additional logging, nothing critical.
Enjoy!

Saturday, May 2, 2015

Using SQL Code Guard TFS Checkin Policy with VS2013

To use TFS Checking policy the first thing that you must do - is to add policy to your TFS source control
The process itself is pretty simple

  1. Install SQL Code Guard at target computer. Please remember that you will need to have SCG installed on each computer on which you will do checkin to project with SCG policy enabled.
  2. Register SQL Code Guard with VS - devenv /setup
  1. add checking policy
    1. select TFS collection / project
    2. open menu TEAM -> Team Project Settings -> Source Control
    3. Select Check-in Policy tab
    4. click Add button
    5. select SQLCodeGuard.CheckinPolicy policy and press OK button
    6. Press OK to close "Source control settings" dialog


Now you can try to use/test checkin policy
  1. add (or edit) sql file in TFS
  2. select "Pending changes"
  3. If you didnt placed SQL Code Guard settings file in project directory then you will get message "Unable to find settings"
  4. if there are issues in script file - you will see warning message

You can doubleclick on message and error list window with full set of of issues will appear


Doubleclick on issue will navigate you to location of issue.
That's all, folks!





Wednesday, March 18, 2015

24HOP Russian Edition

Spoke at 24HOP Russian edition.
Interesting experience.
It is difficult to determine mood of audience if there is no visible audience  :)
And looks like that 90 minutes is too less for me.

Wednesday, March 4, 2015

SQL Code Guard v2.7 and SQL Server 2008R2: bad news and good news

Hi all!
Bad news: SQL Code Guard v2.7 is not working with SSMS from SQL Server 2008R2 (and below).
Good news: I know about this issue, already fixed it in my development environment and will release fix in nearest possible future.
Bad news (again) : integration will not work with SSMS from SQL Server 2005. Even in next release.




Tuesday, February 17, 2015

SQL Code Guard v2.7 released

Hola!
SqlCodeGuard v2.7 is just released.
To be brief - major changes:
1. Added command line utility
2. Added scgallow(issue)/scgignore(issue`)to control which issues should be registered
3. Added [SC004] Found todo item. You can use "--# todo <text>", "--# bug <text>", "--# fix <text>" or "--# warning <text>" marks in your scripts.
4. Added support for VS2013
5. SQL Code Guard moved to .Net Framework 4.0

Full list of changes can be found here 
Bon appétit!





Monday, February 9, 2015

ExpressProfiler - new build published

Just published new signed build of ExpressProfiler - few nice improvements like advanced search, stay on top window, transparency - just to make life easier
Actually there is no change since last august, i simply build, sign and publish version that already was in CodePlex's TFS, but now you can get binaries.

Saturday, November 15, 2014

How to fix: Visual Studio 2012 startup problem: The 'HDIProjectPackage' package did not load correctly.

After installing Community Edition of VS2013 with some additional packages i've noticed that my VS2012 starts failing to start with message like "The 'HDIProjectPackage' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\************\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml'."

Activity log shows

SetSite failed for package [HDIProjectPackage]
End package load [HDIProjectPackage]
{665BA479-E656-4485-9097-7CE2A22A90F2} (just to let Google to find this page)

Google knows nothing about HDIProjectPackage. I dont know how to fix errors with VS2012. I'm stuck!
After 24 hours of thinking and meditation (and several reinstalls of both VS2012 and VS2013) I've found that the problem was with "Microsoft Azure HDInsight Tools for Visual Studio" which I've installed via Web Platform Installer
HDIProjectPackage->HDInsight, looks similar, right?
So I uninstalled "Microsoft Azure HDInsight Tools for Visual Studio" and my VS2012 now alive!!!!!
And I can continue to develop next release of SqlCodeGuard with such nice features like, say, preprocessor commands to disable specific issues in particular scripts (or even - part of script)

Sunday, October 5, 2014

SQLSaturday 311, Sofia, October 11

Making last changes before sqlsat 311.
By the way, did you ever visited SQL Saturday? No? Why?
SQL Saturday is fun, SQL Saturday is free, SQL Saturday is just what you need!
Good place to meet famous speakers from all around the world, ask them question that cannot be answered by usual people, make new friends :)


Monday, September 15, 2014

To be brief. What to do when PATH variable is too long to be real PATH.

Sometimes after installing pretty useful addins when starting SSMS you can see error message like "Exception has been thrown by the target of an invocation"

That can mean that your PATH variable is tooooo long to fit some system functions - and SSMS crashes.
Question "Why one function allows to write value that other function cannot read?" falls far beyond this topic.
So - what can you do?

First that came into my mind is manually change PATH variable - remove entries that are no longer needed and replace full folder names with the same names but in 8.3 format.
But stop! My PATH variable is more than 2K chars long! I dont want to make all these changes by my own hands!
Lets write small  program instead, ok?

using System;
using System.Runtime.InteropServices;
using System.Text;

namespace ShortenPath
{
    class ShortifyPath
    {
        [DllImport("kernel32.dll", SetLastError = true)]
        private static extern int GetShortPathName(String pathName, StringBuilder shortName, int cbShortName);
        static void Main(string[] args)
        {
            string path = Environment.GetEnvironmentVariable("PATH");
            Console.WriteLine("Current path value:{0}",path);
            string[] chunks = path.Split(new char[] {';'},StringSplitOptions.RemoveEmptyEntries);
            StringBuilder sb = new StringBuilder();
            foreach (string chunk in chunks)
            {
                StringBuilder sb1 = new StringBuilder(500);
                int n = GetShortPathName(chunk, sb1, 500);
                if (0 == n)
                {
                    if (2 != Marshal.GetLastWin32Error())
                    {
                        Console.WriteLine("Something went wrong...");
                        Console.WriteLine("{0}", Marshal.GetLastWin32Error().ToString());
                        return;
                    }
                    else
                    {
                        sb1.Append(chunk);
                    }
                }
                sb.AppendFormat("{0};", sb1.ToString());
            }
            Console.WriteLine("Path is shortened! Old len: {0}, new len {1}",path.Length,sb.ToString().Length);
            Console.WriteLine(sb.ToString());
        }
    }
}

Compile it using csc.exe
C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe ShortenPath.cs

And voila!
Run it and the program will print old value of PATH variable and the new value with shortened folder names. If you agree with result then you can use new value as value for PATH variable.
In my case I've saved about 500 chars from 2000.

Monday, August 18, 2014

SQL Code Guard v2.6 released

Today we released new version of SQL Code Guard, 2.6
Main changes:
1. Bug fixing
2. Small GUI and usability improvements
3. Fixed support of SQL2014
4. Changed behavior of some issues.

Enjoy!