The Multifunctioning DBA:

Powershell


November 25, 2011  3:33 PM

Powershell Truncate a String



Posted by: Colin Smith
Powershell, String, Truncate

I am working on a script where I need to push some data into an oracle database. That is easy enough as I know that I can use sqlplus to execute my query into oracle but, the Oracle column that I am putting data into cannot be ny more than 10 characters. Some of the data that I want to put in is...

November 21, 2011  4:10 PM

Query Oracle with Powershell



Posted by: Colin Smith
Oracle, Powershell

I have a small project that I am working on and it requires that I pull data from Oracle from within a Powershell script. This is not something that is fun but it can be done and it is not really that difficult to get the data out of Oracle, it is dealing with the data once you have the data...


October 30, 2011  10:00 AM

PowerShell SQL Server Health Check Script – Revisited



Posted by: Colin Smith
Powershell, SQL Server

In the past couple months I have received a few comments and questions about my SQL Server Health Check Script. So I thought it might be a good time to revisit the script and clear some things up...


October 19, 2011  1:16 PM

Powershell Disable db File Autogrow



Posted by: Colin Smith
autogrow, file managemnt, Powershell, SMO, SQL Server

In order to Disable autogrow on your database files it is a bit tricky. One would think that in SMO you would have an autogrow flag that could be turned on and off like there is in the GUI. Well this is not the case. So if you take my script from 


October 14, 2011  8:25 AM

Powershell Script to change data and log files that are growing by percent



Posted by: Colin Smith
Powershell, SMO, SQL Server

This is the next step after finding all the files that are growing by percent and not by a fixed value. Below is the modified script to make the changes that I needed.
#### Check Log and Data Growth for all User Databases. If they are not set up correctly then change...


October 12, 2011  1:56 PM

Powershell Script to check if data and log files are growing by percent



Posted by: Colin Smith
Data Files, Growth, Log Files, Powershell

In my new shop we try to grow our data and log files by a specific amount and not by a percentage. Our team lead ran into a database that had not been set up properly and wanted someone to check all our databases to verify that they have been set up correctly. Since I am the new guy and...


September 30, 2011  4:13 AM

Powershell to add logins to SQL Server



Posted by: Colin Smith
Groups, Logins, Powershell, SQL Server

This is a script that I threw together for an app that needed to have 60 logins created on the sql server. We had all the ad groups created using a standard naming convention.
app_dev_groupname
was the standard that we went with so here is...


September 27, 2011  10:00 AM

Some Powershell Help



Posted by: Colin Smith
Help, Powershell

Since I started my new job, I let the guys that I used to work with know that I would be happy to help them out if they have any questions about anything especially powershell since I took care of pretty much all of our Powershell needs. And the other day I got an email asking about how to find out...


September 19, 2011  10:00 AM

SQL Server Health Check Follow Up



Posted by: Colin Smith
Help, Powershell

A long while ago I wrote a script that does a SQL Server Health check and I posted it here. Recently I have gotten some comments on it and I want to help some people out. So I thought I would...


September 9, 2011  9:21 PM

Powershell Register Servers to CMS



Posted by: Colin Smith
CMS, Powershell, Register

I wanted to take my list of servers that I have in a database and put them in a CMS so I could have them all listed and accesibile for other DBA's to use that do not know powershell. This is a cool and powerfull thing, I just prefer powershell. Anyway I thought since I already have a listing of all...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: