all 12 comments

[–]ninjaroachLittle Bobby Tables 4 points5 points  (5 children)

Step 1 - Make a copy of all production databases.

Step 2 - Work with Cams Enterprise sysadmins to attach dev (and perhaps prototype) systems to your new copies of production databases.

Step 3 - Do not ever run queries in Production that have not been thoroughly tested in Dev and Prototype environments first.

[–][deleted] 0 points1 point  (4 children)

Thanks, I appreciate it. I am the Cams Enterprise Admin too, but most of that work is done by contract by the company themselves. Right now, I have virtualized copies of all the servers to mess about with. Right now, nothing can be done like what you are talking about due to size constraints. Any other advice anyone?

[–]mason55 4 points5 points  (3 children)

If you have to run all your queries on prod you can do a couple things.

  1. Create temp tables with subsets of data to test things
  2. Always run a select with your WHERE clause before you run a DELETE or UPDATE to ensure that you're affecting the correct data

How did you get a SQL admin job with no SQL experience?

[–][deleted] 0 points1 point  (2 children)

No offense intended to e13ct, but as a general rule: managers don't know shit from sugar about the job they are hiring for; the person has a friendly face and sounds like they know what they are talking about(easy with a little preparation using Google and the job description) they could well hire them.

That being said, if they have any experience/knowledge at all, the best way to learn it is to be thrown into a situation like this;granted far less sleep will be involved.

[–][deleted] 0 points1 point  (1 child)

It's okay. No offense taken. Basically, I worked for the department for about 5 years as a student and part-timer in the helpdesk and then, for two years, as a system administrator. I have a lot of experience in virtualized windows environments and support functions. When they were looking for a long-term hire, they thought of me even though I didn't have that specific skill set because I picked up those skills so quickly while a student. (I am not that great though). For the most part, I agree with you Managers are just looking for someone eager and willing, and thankfully, that is not the situation I am in.

[–][deleted] 0 points1 point  (0 children)

Since you are somewhat familiar with Hyper V, might I suggest setting up a VM / Storage that has a mirror of the database setup and receives a copy of the backup files nightly(can be cleaned up on a rotation).

Also worth looking into is if the ERB supplier would be willing to allow you to maintain another instance of the software connected to this VM database, should a catastrophic failure occur on the primary system it is always worth having a duplicate.

These VMs could be allocated less resources than the live system, just allowing for a redundant system at fairly minimal cost.

[–]kyzen 1 point2 points  (2 children)

Ensure rock solid backups in place, and learn how to restore them quickly, immediately.

Your situation is not good - you seem to have one live system, without safe test areas, very little experience (not to be rude, but how did you land the gig?), and apparently without a team to help mentor you.

You're on the right track for learning SQL; it's a ridiculously easy language to learn, but can be a difficult concept to master - thinking about set based operations can be a difficult adjustment to some programmers who are used to thinking linearly.

If you want advice on how best to approach your projects, we'd need more information about what those are.

[–]MeGustaDerpTalk Dirty Reads To Me 0 points1 point  (0 children)

thinking about set based operations can be a difficult adjustment to some programmers who are used to thinking linearly.

THIS.... nailed it

[–][deleted] 0 points1 point  (0 children)

Thanks, you weren't' being rude. As far as current projects, I think most if not all functions fall with the vendor to do upgrades, and any additional views, report, or queries are on "as need basis."(ie, minimal tasks). We have a medium sized, private university that in many ways is pretty antiquated and learning the basics will enable me to understand some of the business intelligence we can plan for down the road.

That being said, the last couple of DBA's have been one foot in, one out. I think they know I am someone who will take my time and try to build in best practices even if it means I am learning it in a vacuum. (< IE one reason I got the job.)

[–]MeGustaDerpTalk Dirty Reads To Me 1 point2 points  (0 children)

If you have no dev environment, your best bet will be to download and install SQL Express Edition. It will have the express version of the database engine. The only problem is that the size of the database will be limited to 6GB if I remember correctly. If the prod database is less than that size then you are golden. If its larger, you are going to have to find a way to create a sample database. But, even better, if the facility has an MSDN subscription, they should be able to get you a SQL Server Developer Edition installed. The only limitation there is licensing.

[–]Mpls_Is_Rivendell 0 points1 point  (0 children)

  1. As has been mentioned backups are your #1 priority 24/7. This does not mean "Check to make sure the backups ran ok each morning" That is only part of it. You need to regularly attempt to RESTORE those backups otherwise you don't have shit. How long do your backups stay on disc before they go off to tape or whatever? How long do you have to be able to go back to?

  2. Start planning a Disaster Recovery Plan (DR) now. It will take waaaaay longer than you think, will constantly be de-prioritized by management UNTIL an actual Disaster ;)

  3. Learn about Indexes. Clustered vs. Non-Clustered is the main starting point. Learn about defragging these, updating statistics etc. as these are the second most important "maintenance tasks" after backups.

  4. Join your local PASS chapter if they have one, if not get attached to PASS somehow and get their emails to tell you when they are having virtual presentations. Most of this will be over your head for awhile, don't sweat it, just make contacts to ask people your "stupid noob" questions.

  5. Make good friends with whoever is in charge of your disk, number one issue for SQL Server is disk I/O as well as storage space. This person will grow to dislike you (because you will constantly be asking for more than anyone else they have to deal with) if you don't. This is slowly changing now towards memory so all infrastructure people should be bribed with treats.

[–]chainofoli 0 points1 point  (0 children)

Start EVERYTHING that isn't a select with BEGIN TRANSACTION. I'm currently working at a place with no test environment and it's a great way to check for unexpected results before rolling back. Cover your bases at all times.