I am not sure I understand why some managers do not think that being a DBA is a full time thing and they think that they do not need more than one guy who can manage databases in there spare time. That is just CRAZY!! What is the most important asset to any company these days? I think that the answer is DATA. Where does the data live? That is correct, it lives in the DATABASE. So why would you not think that managing your most important asset is a full time job? Companies spend hundreds of thousands of dollars or more per year on database licensing and hardware costs but then they do not think that the investment of a couple full time DBA’s is worth it? Really, i mean what happens if you lose a critical database or you have corruption in a critical database or a database that you have housing sensitive information gets hacked? How much does that cost? Ask Sony about that and I am sure they will tell you how significant that is. How do you prevent this from happening or at least mitigate your losses if something does happen? You have a DBA staff that can help design and implement security strategies, restore strategies, high availability strategies and Disaster Recovery strategies. This really is a full time job and that is not even taking into consideration things like new deployments and break fix issues that happen every day all the time? We have all heard, “My query is running slow today HELP..” Who fixes that? A DBA…
So please listen to me when I say that you need to hire full time DBA’s and make sure you have enough to handle the work that needs to be done. I have been in a few interviews as of late looking for a new DBA and they are hard to come by. So if you find a good one, make sure that you treat them good and do not overwork them. Staff appropriately and just understand what a big and important undertaking being a DBA is. Do not let your lack of understanding what it means to be a DBA be the reason your company can not recover from a data loss situation. Hire good DBA’s and give them the support and training that they need in order to keep your companies number one asset safe and secure and accessible.
Paul Randal (Blog | Twitter) and Kimberly L Tripp (Blog | Twitter) really make it easy to get the most out of the training. The training is in the Hotel so you do not need to worry about getting anywhere, no traffic worries or having to walk around town to get to class. This really made it nice for me, I was able to sleep in, for me, and still be down in plenty of time for class.
When I arrived down in the conference room for Class breakfast was waiting and or being set up, depending on how early I arrived. This was very nice since I could also eat before the class started so I was not distracted with food during the training. I also had plenty of time to organize my things and get ready for the day of training in plenty of time for class to start. Also during this time Paul and Kimberly are setting up for the day but they are also busy fielding questions and messing around with the class and each other.
Once the time for class to begin it was time and no time was wasted. This was great because I sure did not feel like my money was being wasted with how prompt they were everyday. They provided a Book of all the slides that they covered as well as more slides that they did not go over in class. The amount of information that they provided was just amazing, and none of it is filler…
Another really great thing about the class was the whiteboard. I think this was the first class that had this whiteboard and I was happy that I was in this class. Instead of a traditional whiteboard they used a tablet. This was great because I did not have to try to draw all the diagrams and notes that they were putting on the whiteboard. I was able to just listen, pay attention, and take my own notes as they did the whiteboard. I did not miss out on the instruction because I was copying what they were doing. After the class not only did they send us all the whiteboards that they did but they also went back and put some good notes on the whiteboards for us so that we could make sense of them. this was amazing and I think it adds a lot of Value to the class.
As the class progressed we obviously had a lot of questions and some of them were about the current material and some were off on tangents. This may have been the best part of the class. Not only do they build in time to answer questions, but they do not care what the tangent is. If it is pertinent they will go as far down the “Rabbit Hole” as is needed to answer the question as well as all the other questions that tangent brings up. On a few occasions they did not know the answer, shocking I know, but even then they did not give up on it. They reached out to other resources and found the answer. Just Amazing!!
The only bad thing I can say about my experience is that the chairs get pretty uncomfortable after a few days but really even that is not bad because I was so engrossed by the material that I did not think about it. Paul and Kimberly also do a great job of providing breaks throughout the day. No matter how into this stuff you are it is hard to pay attention for that many hours in a day without a few breaks.
I almost forgot to mention the food. I already mentioned that breakfast was ready when I arrived in the class but I did not talk about how good it was and that Lunch was also very good everyday. Not too mention how convenient it is to have that provided so I do not need to worry about it and be distracted from class or be late after lunch because I went somewhere that took longer then they needed too.
I could go on and on about this week of training and how great it was but that would take forever… Like I said at the beginning this is the BEST TRAINING I have EVER had and I got a lot out of it. I have only been back a few weeks and I am using what I learned already. One big thing that I just setup for one of our developers was table partitioning. They had attempted to get it set up but did things very wrong. Thanks to what I learned at SQLSKILLS I was able to get it set up properly and things are working great.
I really hope to be able to go to week 2 at one of the upcoming events and I would like to thank Paul Randall and Kimberly L Tripp for the amazing week.]]>
In our troubleshooting the error logs lead us down the path of Kerb auth failures. MS agreed with this assessment after looking at the logs and the behavior of the instance. We finally came to a point where the server had to be rebooted in order to continue troubleshooting. I thought I would take this time to also enable the sa account and see if we could get in with an elevated account and just check out some sql server configuration. Unfortunatley I was not able to get the account up during our small window. I brought the server up in single user mode using the -m switch in the startup parameters but when attempting to connect via sqlcmd I got errors saying only one admin was allowed to log in. My time ran out and we had to start back up in multi user mode. The reboot did not resolve the issue and I still have no sa account. After another day of troubleshooting we decide to backup the database after hours and restore to another server that is not having the authentication errors.
After we get that done I can now play with the srever in question and attempt to fix it. I still want to get sa up so I restart in single user mode but still get the connection error using sqlcmd. I disconnect the network and try again and I am in. I enable the account and start up in multi user mode. What I say next was shocking and something that NEVER should have happend. I open up Logins and I show that all of the domain acounts are gone. Some one must have removed them. I added my account back and I can now connect. OUCH talk about a lesson in security. Time to make some changes. More on that later.
But please do not let something like this happen to you. Follow the security best practices so you can prevent this from happening to you. To it from the start and do not back down. I have found that if someone tells you to just let them have sysadmin now and we will lock it down later, IT NEVER HAPPENS!! Be strong. As a DBA you are in charge of making sure that the data is safe, recoverable, and accessible. In order to do this job well, you must set up security accordingly.]]>
I thought it would be nice to have a way to progamatically set those values based on how much memory the server has total. I started tooling around in Powershell using SMO and I found the settings that I was looking for. It is really pretty simple to change theses values as I have tested it on my own local SQL Server. Here is what you need to do.
[System.Reflection.Assembly]::LoadWithPartialName(‘Microsoft.SqlServer.SMO’) | out-null
$s = New-Object (‘Microsoft.SqlServer.Management.Smo.Server’) “ServerName”
$s.Configuration.MinServerMemory.ConfigValue = 1024
$s.Configuration.MaxServerMemory.ConfigValue = 1024
The above code will set both the Min and Max Server memory settings to 1024 MB. This change will not be in affect until you restart sql server. But I now know that I can do this progamatically if I come up with a standard for these settings that is based on something that I can progamatically determine. My first thought is to do this based on the total Memory in the server and then figure out how to set both values. I will post more as I come up with it but I thought this was a nice little tidbit.]]>
Here is an example of what I did to find the files for one specific database:
$files = Invoke-Sqlcmd -ServerInstance “sqlserver” -Database “master” -Query “select name, physical_name from sys.master_files where name like ‘%dbname%’”
$primary = $files.name
$primary_physical = $files.physical_name
$log = $files.name
$log_physical = $files.physical_name
Pretty simple but this will give you the name and physical location of the files that you need. Hope that will help. I actually plan on using this is my Monitoring scripts.]]>
Wish me luck]]>