Skip to content
May 20, 2022
Login / Register

benjf.com

SQL/Dev/+

  • Special Menu
    • Home
    • Demo
    • Docs
    • Support
  • Home
  • About
  • Technology
    • ✉ Email
    • Privacy
  • Programming
    • HTML
    • CSS
    • Javascript
      • jQuery
    • PHP
    • SQL
      • SQL Server
    • Powershell
    • MS Access
    • WordPress
  • Opinion
    • ✞ Faith
    • ☺ For Fun
    • ? Politics
    • ? Random Awesomeness
  • Health

Category: SQL

  • Home
  • Programming
  • SQL
SQL Server – AD Groups vs AD Logins

SQL Server – AD Groups vs AD Logins

September 1, 2020September 1, 2020 benf101Opinion, Powershell, SQL, SQL ServerLeave a Comment on SQL Server – AD Groups vs AD Logins

Let me state my position from the outset: Favoring AD Groups for security in SQL Server over individual AD Logins is a mistake. I don’t care what the “best practice” is. It’s a headache with no discernible advantage.

Script Storage Update

Script Storage Update

October 17, 2019October 20, 2019 benf101C#, CSS, HTML, jQuery, MS Access, PHP, Powershell, Programming, SQL, SQL Server1 Comment on Script Storage Update

This is an update to a previous post. In another post on this site, it was said that Dropbox Paper is the code storage of choice. This has changed. As of today, I much prefer using Microsoft’s GIT code repository…

Read More

Script Storage

May 2, 2018October 21, 2019 benf101C#, CSS, HTML, jQuery, MS Access, PHP, Powershell, Programming, SQL, SQL ServerLeave a Comment on Script Storage

Update here: Script Storage Update Throughout my career, my scripts have been a vital piece of my work. Where I store them has changed over the years. The challenge has been in finding a repository that is reliable, searchable, accessible…

Read More

MySQL – Move Data Files To New Location (Windows)

February 15, 2018October 20, 2019 benf101SQLLeave a Comment on MySQL – Move Data Files To New Location (Windows)

After setting up MySQL, I realized that I put my data files on the C drive.  Since I don't want database growth to end up taking down the entire OS, I had to move them.  My struggles consumed a couple of…

Read More

SQL Server – Rolling Back Dynamic SQL

June 18, 2013June 3, 2015 benf101Programming, SQLLeave a Comment on SQL Server – Rolling Back Dynamic SQL

Do transactions apply in dynamic SQL, in SQL Server?  In a word, yes.  For proof, run the following chunks of code:

TSQL – Loop Through Result Set WITHOUT Cursors

May 20, 2013October 21, 2019 benf101Programming, Random Awesomeness, SQL2 Comments on TSQL – Loop Through Result Set WITHOUT Cursors

There is some controversy about using cursors in TSQL.  Overall, I believe they tend to tie up resources and are seen as bad.  So how do you get around using them?  Here’s how.

TSQL – Simple Loop Through Result Set Using Cursor

February 1, 2013October 21, 2019 benf101Programming, SQL2 Comments on TSQL – Simple Loop Through Result Set Using Cursor

(If you want to AVOID cursors, see: TSQL – Loop Through Result Set WITHOUT Cursors) This is the basic query text to use whenever you need to loop through a result set in SQL Server using TSQL.  In this example we…

Read More

SQL Server – Script Out a Database Role and Securables

January 10, 2013January 10, 2013 benf101Programming, SQL1 Comment on SQL Server – Script Out a Database Role and Securables

Sometimes, as a DBA, you will have to copy a database role to another instance, such as when you have to move something from development to testing or production.  Recently, I discovered that using the SSMS “script as” option doesn’t…

Read More

SQL Server Profiler New Templates Failing

December 19, 2012December 20, 2012 benf101SQLLeave a Comment on SQL Server Profiler New Templates Failing

Source of info: http://www.mattbutton.com/2011/06/01/sql-profiler-templates-missing/ Upon trying to create a trace template in SQL Server Profiler, I was able to name the trace but there were no events to choose from in the “Events Selection” tab, even when the “Show All Events”…

Read More

SQL Server – Email Results of Stored Procedure Conditionally

December 10, 2012December 20, 2012 benf101Programming, SQLLeave a Comment on SQL Server – Email Results of Stored Procedure Conditionally

Within a Stored Procedure, you may want the results of a particular query emailed to you, but only if there is a result.  In other words, I don’t want to be notified when the result set size is 0.

Posts navigation

1 2 Next

Recent Posts

  • Inspire Clean Energy (Scam or Legit?)
  • Does Memory Need Emotion?
  • Memery
  • Memery 2021-11-15
  • Nextcloud – Removing Duplicate Contacts
  • Population Zero
  • Feel Free To Discuss Your Recommendations At My Front Door, For a Fee
  • Fulton County GA Election Duplicate Scans For Democrat

Categories

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Archives

Copyright © All rights reserved.
Agency Ecommerce by mantrabrain