SQL Server SEQUENCE
In 2012 SQL Server introduced the SEQUENCE object. Looking at the syntax it is very similar to how Oracle has implemented SEQUENCEs for many years.… Read More »SQL Server SEQUENCE
In 2012 SQL Server introduced the SEQUENCE object. Looking at the syntax it is very similar to how Oracle has implemented SEQUENCEs for many years.… Read More »SQL Server SEQUENCE
Recently I have been on the LEAN improvement quest to make a 2 second improvement in my process every day. Part of that improvement is… Read More »What’s your favorite SSMS time saving hotkey?
After the last post on Cumulative Distribution Function (CDF) or as it is known in TSQL CUME_DIST(), I realized that although I showed how to… Read More »Cumulative Distribution Function (CDF) – Analyzing the Roll of Dice with TSQL
Percent rank is defined as the number of values that are the same or less than the current value divided by one less than the… Read More »More TSQL Analytic Functions – PERCENT_RANK
Throughout my career I have worked with different programming and database tools. Thinking back the tools that I enjoyed using were the tools that were… Read More »3 Steps to Work More Efficiently in SSMS.
This feature has been available since SQL server 2012 and is one of my favorites. It is the Rows/Range enhancements to the over clause. These… Read More »Rows and Range, Preceding and Following
The problem with using the default maintenance plans is that SQL Server Management Studio makes it easy to turn on some features that are really… Read More »Default Maintenance Plan Shrink Database – Video Tip
Database mail is a critical part of getting notifications from your SQL Server when things go wrong. The problem comes when you have a database… Read More »Bulk Update Database Mail Password
Recently while working on a SQL Server for a client I came across the following error when I attempted to view the SQL Server logs… Read More »sp_readerrorlog – Msg 22004, Level 16, State 1, Line 0 – Failed to open loopback connection. Please see event log for more information.
While doing a recent server move, I came across the need to script all agent jobs and save them to a file so that if we needed to reference what was there after the move we could get at the agent jobs without having to restart the old SQL Server.
It made me realize that sometimes what you want to do is available in SQL Server Management Studio, but that perhaps it is not always entirely obvious.
In the example below, where I have four jobs (imagine if it was 150 jobs), I want to script all of them out and save them for future use.
I could just right click on each one, choose “Script Job As, CREATE To, New Query Window”, which wouldn’t be that bad for 4 jobs, but assume you need to do this for 150 jobs, it could take you a while.
Read More »Script all Agent Jobs Using SQL Server Management Studio