Recently, I overcame an instance where my SSIS Performance Counters were missing out of PerfMon on my development machine. This made it incredibly hard to keep track of what was running and it's system-level impact once I kicked it off in SSMS. Sure, I can use the reports to see the messages and the overview report, yes, but what I really want is to know whether or not it's paging to disk!
Specifically, I want these
http://msdn.microsoft.com/en-us/library/ms137622(v=sql.110)
Buffers spooled
Buffer memory
So, I tried
Restarting Perfmon
Hey, sometimes the simplest solution is still the answer! It wasn't this time, though.
Reinstalling the counters
This involved a call to the command line. When I remember the syntax (or find it in my notes...) I'll update it here.
Setting the Performance Logs and Alerts service to start automatically
This didn't do anything, either, but it did set me up for...
Set the Performance Logs and Alerts service to use "Local Service"
It was in the process of re-enabling the perfmon service to use this account that I received a message to the effect of "Enabling this account to log on as a service". While I am still not sure which patch or update killed that ability, the SSIS counters now show up, and work as intended.
Tuesday, September 9, 2014
Tuesday, September 2, 2014
A quick way to load the baseball DB
I found the quickest way to load and reload the baseball database I've converted was to do two things:
- Cut the db into individual files
- Load those files one by one along with some logging
This is all accomplished through good, old-fashioned and very fast command line calls to SQLCMD .
There's a couple of great things about this script.
The downsides of this approach aren't really "cons" as in "pros vs. cons", but more like limitations. For example:
There's a couple of great things about this script.
- It runs fast, even in a VM.
- It uses integrated security - no need to jump through hoops to make it work.
- The output is directed to a very specific file, which is rebuilt with every command.
The downsides of this approach aren't really "cons" as in "pros vs. cons", but more like limitations. For example:
- The file output of SQLCMD is overwritten every time. In command line mode, there is no SQLCMD flag to indicate I'd like the file "appended to" instead.
- The output file can be appended through concatenation, though, which, while a separate command line call, is still pretty simple.
Here's the script. I've saved this in my VM as a file on the desktop named "Make Lahman.cmd"
cls
sqlcmd -S localhost -d lahman -b -I -i lahman2013_tables.sql -o tempout.txt
type tempout.txt > finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "lahman master.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "lahman Fielding.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "lahman Batting.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "Pitching.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "Teams.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "PitchingPost.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "lahman ManagersHalf.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "lahman AllstarFull.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "TeamsHalf.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "TeamsFranchises.sql" -o tempout.txt
type tempout.txt >>finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "Salaries.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "Schools.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "SchoolsPlayers.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "SeriesPost.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "lahman Managers.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "lahman HallOfFame.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "llahman FieldingPost.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "lahman BattingPost.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "lahman AwardsSharePlayers.sql" -o tempout.txt
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "lahman AwardsShareManagers.sql"
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "lahman AwardsPlayers.sql"
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "lahman AwardsManagers.sql"
type tempout.txt >> finalout.txt
sqlcmd -S localhost -d lahman -b -I -i "lahman Appearances.sql"
type tempout.txt >> finalout.txt
Subscribe to:
Posts (Atom)