RSS
 

Posts Tagged ‘Apps/Tools’

Snagit…

21 Mar

If you read my last post, you may have noticed that my images now include boxes, balloon text and highlighting.  This is due to a friend insisting the he couldn’t live without Snagit for blogging or documentation and that I simply must try it.  I figured I’d sign up for the free trial and a week later… here I am, scribbling all over screen shots and sharing my lack of anything resembling artistic talent with the world.  So far… it does seem pretty useful.  Much better and easier editing of screen captures and it allows me to point things out a bit more readily. 

My question to all of you is… is there anything better out there that I should evaluate before I take the plunge? 

 
1 Comment

Posted in All

 

Windows LiveSynch

20 Jan

After a while, most people who work with SQL have accumulated quite a few scripts that they use for investigation, troubleshooting, commonly requested ad hoc queries etc.  I’ve seen people suggest a few different methods for keeping this ’script library’ available on several different machines.  Some people recommend saving everything to an online storage repository so that it is available to any machine they log into.  This works, but it’s a lot of hassle to me.  Instead of just saving things normally, you have to constantly make sure you copy everything to this online box from every machine you use them on.  This is still a good option if you are constantly on public or random machines, but I find it unwieldy if I just need to synch between my laptops/desktop/work computers.

My favorite method for doing this is using Microsoft LiveSync (or FolderShare).  You install the client on each of the machines you normally need to access your scripts from, tell it which folders you want to sync… and you’re done.  Every time you create or modify one of the files in your watch folders from any of the computers, it is automatically updated on all the other computers that are subscribed to that folder.  You can specify multiple different folders (Subfolders off of the main folder are also synched and retain their structure) and choose which machines synchronize each one.  I like tools that just do what I need them to do with zero management, and that’s what this one does.  So long as I save everything underneath the synched folder, it is available on all my machines.

The only limitation I’ve found so far with this tool is that it can’t synch individual files.  I wanted to use it to maintain my chrome bookmarks, but haven’t figured out how to use it for that.  I have been told that there are other tools that do the same thing for non windows machines, but can’t remember what the names were.

 
No Comments

Posted in All

 

Redgate Software – SQL Prompt

07 Dec
Redgate Software
I’m going to post this entry *before* my blog starts being run on sqlservercentral.com so that people don’t assume I’m blowing smoke. Redgate is quite simply the best company I have ever done business with. Every single interaction I’ve ever had with them has been all I could ask for and then some, and left me feeling good afterwards. Every one of their tools that I try out changes the way I do things for the better in some large way. I’ll probably talk about a few of the tools and how they helped me over time, but for now I’ll stick with SQL Prompt.
SQL Prompt is basically Redgate’s Intellisense tool. Until recently, SQL server didn’t offer intellisense and this filled an extremely valuable gap. Personally, I’ve developed *without* intellisense for so long and type so fast that it actually annoys me as often as it helps; so I turn off the suggestions and only have it supply them when I ask for them. Even without this though, several aspects of SQL Prompt save me a massive amount of time in my daily coding.
Favorite Features:
Column name lists. These filter as you type them so you can just hit tab to complete the name. Very useful if you can’t remember the exact column name. This works as soon as you have the from clause on your query (and supports table aliases), so you’ll likely get used to writing the FROM clause of your queries first if you end up using the tool.
SELECT * FROM <table> replacement. SQL Prompt can automatically fill out all the field names. Huge time saver.
INSERT INTO <table> (Or Update). SQL Prompt will generate all the fields in the insert list and corresponding values fields with a commented out field data type next to it.
EXEC <stored procedure>. This one is great. This will supply all of the parameters that a stored procedure takes and the data types they should be filled in with.
Snippets: You can save snippets that can be auto inserted based on typing. One that I use all the time is my ‘header’ snippet, which is 15 or so lines of commenting that I put at the top of all my stored procedures. I also save things like commonly used CTE’s and small bunches of code that I run all the time to analyze performance problems.
Gripes:
There are two. The fact that there are only 2 really says a lot for the product, because I’m exceptionally picky when it comes to tools that I use.
The first is that it doesn’t highlight the beginning parenthesis as you close one. Most versions of intellisense do this and it’s extremely handy as a quick reference to make sure you’re not lost in some monstrous nested function string. Useful feature, maybe they’ll add it at some point.
The second is actually a major annoyance and applies to both parenthesis and single quotes. It auto replaces closing parenthesis/quotes as you type if there was another one immediately after your character. For example:
Let’s say you have a statement like SELECT DATEADD(d, DATEDIFF(d,0,@MyDateField), 0).
Then you decide you wanted to just use GETDATE() instead of @MyDateField, so you type it in.
This would leave you with SELECT DATEADD(d, DATEDIFF(d,0,GETDATE(), 0) .
This is wrong.
It should be: SELECT DATEADD(d, DATEDIFF(d,0,GETDATE()), 0), but SQL Prompt automatically replaced the ) that was already there and ended the DATEDIFF with the one you typed in to close the GETDATE(). It does the same thing with single quotes which gets extremely confusing when you’re doing crazy things with dynamic SQL strings. So if you do use SQL Prompt (as of version 4.0.2.53) be aware of this. To get around it, either plan on it and type an extra ), or move your cursor so that it is to the right of the last ) or ‘ and then type another one. It only replaces them to the right, not the left. Also, if you have a whole series of end parens, like )))), you’d actually have to type in the ) 5 times, as it would continually replace each one until you got to the end, and then you’d be inserting a fresh one.
I reported this ‘bug’ to them and asked if there was any way to not have it happen (to see if it was just a menu option somewhere). While there is unfortunately not a fix for it at the moment, have a look at the response I received (less than 8 business hours later) from their support department.
Thanks for your enquiry.
I have reproduced the scenario you described, and unfortunately there isn’t a way to turn off this behaviour.
I have logged this as a bug with SQL Prompt 4, and now the developers are reviewing the issue.
Once they have had a chance to look at it, I can let you know if/when it will be fixed.
For your reference, the bug tracking code for this is ———
Thanks,
First class all the way in my opinion, this is everything you could ask for in a response to a bug report. If you like intellisense and aren’t annoyed by it like myself, this tool is probably an even bigger benefit to you

I’m going to post this entry *before* my blog starts being run on sqlservercentral.com so that people don’t assume it is influenced by that in any way. Redgate is quite simply the best company I have ever done business with. Every single interaction I’ve ever had with them has been all I could ask for and then some, and left me feeling good afterwards. Every one of their tools that I try out changes the way I do things for the better in some large way. I’ll probably talk about a few of the tools and how they helped me over time, but for now I’ll stick with SQL Prompt.

SQL Prompt is basically Redgate’s Intellisense tool. Until recently, SQL server didn’t offer intellisense and this filled an extremely valuable gap. Personally, I’ve developed *without* intellisense for so long and type so fast that it actually annoys me as often as it helps; so I turn off the suggestions and only have it supply them when I ask for them. Even without this though, several aspects of SQL Prompt save me a massive amount of time in my daily coding.

Favorite Features:

  • Column name lists. These filter as you type them so you can just hit tab to complete the name. Very useful if you can’t remember the exact column name. This works as soon as you have the from clause on your query (and supports table aliases), so you’ll likely get used to writing the FROM clause of your queries first if you end up using the tool.
  • SELECT * FROM <table> replacement. SQL Prompt can automatically fill out all the field names. Huge time saver.
  • INSERT INTO <table> (Or Update). SQL Prompt will generate all the fields in the insert list and corresponding values fields with a commented out field data type next to it.
  • EXEC <stored procedure>. This one is great. This will supply all of the parameters that a stored procedure takes and the data types they should be filled in with.
  • Snippets: You can save snippets that can be auto inserted based on typing. One that I use all the time is my ‘header’ snippet, which is 15 or so lines of commenting that I put at the top of all my stored procedures. I also save things like commonly used CTE’s and small bunches of code that I run all the time to analyze performance problems.

Gripes:

There are two. The fact that there are only 2 really says a lot for the product, because I’m exceptionally picky when it comes to tools that I use.

  • The first is that it doesn’t highlight the beginning parenthesis as you close one. Most versions of intellisense do this and it’s extremely handy as a quick reference to make sure you’re not lost in some monstrous nested function string. Useful feature, maybe they’ll add it at some point.
  • The second is actually a major annoyance and applies to both parenthesis and single quotes. It auto replaces closing parenthesis/quotes as you type if there was another one immediately after your character. For example:

Let’s say you have a statement like

SELECT DATEADD(d, DATEDIFF(d,0,@MyDateField), 0)

Then you decide you wanted to just use GETDATE()  instead of @MyDateField , so you type it in.

This would leave you with 

SELECT DATEADD(d, DATEDIFF(d,0,GETDATE(), 0) 

This is wrong. It should be: 

SELECT DATEADD(d, DATEDIFF(d,0,GETDATE()), 0)

SQL Prompt automatically replaced the ) that was already there to close the DATEDIFF with the one you typed in with GETDATE(). It does the same thing with single quotes (which gets extremely confusing when you’re doing crazy things with dynamic SQL strings). So, if you do use SQL Prompt (as of version 4.0.2.53) be aware of this. To get around it, either plan on it and type an extra ), or move your cursor so that it is to the right of the last ) or ‘ and then type another one. It only replaces them to the right, not the left. Also, if you have a whole series of end parenthesis, like )))), you’d actually have to type in the ) 5 times, as it would continually replace each one until you got to the end, and then you’d be inserting a fresh one.

I reported this ‘bug’ to them and asked if there was any way to not have it happen (to see if it was just a menu option somewhere). While there is unfortunately not a fix for it at the moment, have a look at the response I received (less than 8 business hours later) from their support department.

Thanks for your enquiry.

I have reproduced the scenario you described, and unfortunately there isn’t a way to turn off this behaviour.

I have logged this as a bug with SQL Prompt 4, and now the developers are reviewing the issue.

Once they have had a chance to look at it, I can let you know if/when it will be fixed.

For your reference, the bug tracking code for this is ———

Thanks,

First class all the way in my opinion; this is everything you could ask for in a response (other than an actual fix).    So… if you aren’t annoyed by intellisense like I am, this tool is probably an even bigger benefit to you,  and I’d definitely recommend heading over to www.RedGate.com and downloading the SQL Toolbelt (available for a free 14 day trial).  I’m most likely going to be purchasing the entire toolbelt soon and will talk about a couple of the other products once I have full copies.  SQL Compare in particular is amazing even from the short time I spent playing with it.

 
No Comments

Posted in All