Sunday, August 21, 2011

SSMS Tips

Comma separated string

There are many times where you want to convert list of values to comma separated string.  This can be achieved by simple File & Replace.

Make sure in File Options, you selected “Use: Regular Expressions” option.  The same you can do by replacing “\n” with “’,’” for string.  Note: you may need to add beginning and end quotes, after Find & Replace.

SQL Comma

Find in Files

Some time you may need to check for some dependency of a object, by checking all the DB Scripts stored in File System.  In such case you can make use of File in Files feature of SSMS.

Find

Scroll keyboard shortcut

When you want to scroll window text with out using mouse you can use Ctrl+Arrow Key short cut to scroll the window.

Wednesday, June 29, 2011

Fiddler & Local host

Fiddle will not detect local host traffic.  There are different tricks to make it work.  The most known are

  1. http://localhost.:30408/Page.asmx – Not the dot after localhost
  2. http://127.0.0.1.:30408/Page.asmx – Fixed IP followed by dot then : port number

Monday, June 20, 2011

Are you slicing CSV row data

When you slice the CSV row data with embedded commas, double quotes and line breaks.  it becomes complex to handle.  An well defined RegEx will help you here.  Here is handy RegEx “,(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))” which works great.  Read more detail here.

Wednesday, June 8, 2011

Color code your SSMS Status bar for diff server

If you are working on multiple database at the same time and by mistake executing queries on different server (TRUNCATE on PROD!!).  Here is a cool tips for you.

When you are connecting to a server go to Connection Property tab and provide Customer Color. (may be RED for PROD).  The color will be visible in the Status bar.

image

You can notice the selected color in status bar.

image

Monday, May 9, 2011

SQL Code formatter

It is annoying to see improperly formatted lengthy SQL code.  For C# Visual Studio does the job neatly.  For SQL I was looking for some plug-in or Tool which can format SQL code.  The long search come to end with an online tool.

Check out here http://www.dpriver.com/pp/sqlformat.htm

Thursday, April 28, 2011

Double-Hop

After really spending two hours of time learned that impersonation will work only within same server and will not work across the servers.

Here is the guy neatly explained the scenario I went thru.

Thursday, April 21, 2011

Virtualization Jump Start

Virtualization is the future.  The complete Azure platform is based on Virtualization.  Already Microsoft is making impact on this space.

Here is the Jump Start guide for Microsoft Virtualization

http://technet.microsoft.com/en-us/edge/Video/hh124559

AI Learning resouces

 Collection of resources aka.ms/genai-beginners  -  github- generative-ai-for-beginners rasbt/LLMs-from-scratch: Implement a ChatGPT-like LL...