SQL Server – Dynamically PIVOT ANY Column On ANY Table in ANY Database For ANY Aggregation With ANY Condition

SOURCE CODE ATTRIBUTION: Before I proceed, I want to give credit to the original procedure by sfrejofsky based on which I created this procedure (mostly improvements). The source of this procedure is https://stackoverflow.com/questions/10404348/sql-server-dynamic-pivot-query I had a need to do dynamic PIVOTing for one of my projects and instead of reinventing the wheel, I used the … Continue reading SQL Server – Dynamically PIVOT ANY Column On ANY Table in ANY Database For ANY Aggregation With ANY Condition

Advertisements

SQL Server – Resolve “The /IAcceptSQLServerLicenseTerms command line parameter is missing or has not been set to true.”

As I blogged before, I am in the process of downgrading most of our Enterprise Edition SQL Servers to Standard Edition. The Uninstalls and Installs are done from the command-line. When I tried to install SQL Server 2012 Standard from the command-line, I used the following command-line I have added new-lines above so that you … Continue reading SQL Server – Resolve “The /IAcceptSQLServerLicenseTerms command line parameter is missing or has not been set to true.”

PowerShell: Save Millions By Downgrading Your SQL Server Edition & Partially Automate It!

This is one of those fresh ideas I wish I had but in reality it did not occur to me until it came down to me for execution from above me. Good job managers! Kudos. Sorry, I did not come-up with this! Execution: "I can do really well and you have got the best". I … Continue reading PowerShell: Save Millions By Downgrading Your SQL Server Edition & Partially Automate It!

PowerShell: Backup All SSAS Databases To A Network Share

I am working on downgrading SQL Server Enterprise Edition (EE) s/w to Standard Edition (SE) where EE features are not used (to save money on licensing). We have a big list of these to go through. That required all SSAS databases to be backed-up to the network and restored after the edition downgrade. I will … Continue reading PowerShell: Backup All SSAS Databases To A Network Share

SQL Server – Breakup A Monolithic Data File (Database) Into Multiple Small Files And Breakaway From Shrinking!

If the SQL Server databases being manged are a few GB in size each, then having a single .mdf file for data is fine. However, if the size is anywhere in the hundreds of GB or more, then a single .mdf file is certainly not the way to go. Related to this, please checkout my … Continue reading SQL Server – Breakup A Monolithic Data File (Database) Into Multiple Small Files And Breakaway From Shrinking!