SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How did you accumulate and where do you keep your administration scripts (or other scripts for that...


How did you accumulate and where do you keep your administration scripts (or other scripts for that matter)

Author
Message
CapnHector
CapnHector
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3291 Visits: 1789
I have a question for the more experienced DBA's out there. im starting to develop queries and scripts that make administering the sql server instances i have (not many but its good experience for when i may start to look for my first "real" dba job). the question becomes where do you keep your script files (thumbdrive, drop box, 5.25 floppy?) and how did you accumulate them (writing them your self, other people you work with, or out on the net?).

Im now getting more into the administration of the servers instead of just fixing the jobs. (now im doing backup and restores helping in disaster planing and more)


For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden for the best way to ask your question.

For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw

Need to Split some strings? Jeff Moden's DelimitedSplit8K
Jeff Moden's Cross tab and Pivots Part 1
Jeff Moden's Cross tab and Pivots Part 2
George M Parker
George M Parker
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1594 Visits: 1472
capnhector (11/30/2012)
I have a question for the more experienced DBA's out there. im starting to develop queries and scripts that make administering the sql server instances i have (not many but its good experience for when i may start to look for my first "real" dba job). the question becomes where do you keep your script files (thumbdrive, drop box, 5.25 floppy?) and how did you accumulate them (writing them your self, other people you work with, or out on the net?).

Im now getting more into the administration of the servers instead of just fixing the jobs. (now im doing backup and restores helping in disaster planing and more)


Disclaimer: I do NOT work for Red Gate. But I do use their Scripts Manager tool to store many of my favorite scripts. I've linked it to a local folder that points to my SkyDrive so I have access to the raw files from anywhere.

http://www.red-gate.com/supportcenter/Product?p=SQL%20Scripts%20Manager

Most of the scripts I've accumulated over the years have been a combination of things I've written, code from trusted and reliable sources on the internet and from peers and others I've worked with.
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)

Group: General Forum Members
Points: 98909 Visits: 33014
I do work for Red Gate, but was doing this before I got the job.

I keep my personal scripts in the Snippets Manager within SQL Prompt. You can add a quick key to make them pop up on the screen. For shared or institutional scripts, I make sure they go into source control at the organization so that everyone has access to them.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
GSquared
GSquared
SSC Guru
SSC Guru (58K reputation)SSC Guru (58K reputation)SSC Guru (58K reputation)SSC Guru (58K reputation)SSC Guru (58K reputation)SSC Guru (58K reputation)SSC Guru (58K reputation)SSC Guru (58K reputation)

Group: General Forum Members
Points: 58175 Visits: 9730
I keep copies of any script I might need again in SkyDrive.

DropBox, so far as I know, requires an application to be installed locally before you can access your files. SkyDrive allows access directly in the browser. I've worked in plenty of environments where, when I needed a script, I had internet access, but not the ability/desire to install software on the server or on the computer I was using.

Google Docs would probably work as well, but I've been using SkyDrive since before Google Docs existed.

The RedGate tools are great, right up to the point where you have to use a web-based VPN connection from a hotel's "business center" to do something on a server you're responsible for, while you're on vacation and don't have access to your usual workstation or even your home copy of Dev Edition, et al. You'll want your scripts "in the cloud" at that point.

I've also had scripts I built at prior jobs come in handy in later jobs. Again, since I have them in the cloud (SkyDrive in this case), I can simply download, edit, and use. If I had them stored in a script library on a workstation at a company that's out of business, they would be lost.

So, use local script management for convenience when you're at work, but make sure to copy them to some online storage solution. One that allows browser access.

As for where I get them: Many I wrote myself. Some I got from others - on this site or other sites. Some I got from others, then edited for my own use.

What I have in them is a mix of things I find I universally need (like a script for managing index fragmentation and maintenance), things I don't need often but which were a pain to put together in the first place (some CLR objects that are really useful in limited circumstances, but where Google and Bing failed me in finding what I needed), and some things that took a lot of research and trial and error to build (lots of XQuery examples).

Basically, there's no need to keep a script I can reconstruct from scratch with a minute's typing. My usual DBCC CHECKDB script doesn't need to be stored anywhere. It's too simple to just rewrite when I need it. But if it would be in any way an effort to reconstruct, I save it.

For example, I recently had to do a fairly complex XML shred. The documentation on XQuery sucks, and it took hours to figure out how to write the query. Writing it took about 2 minutes, but figuring out what to write, then debugging (largely trial and error), took half a day. Inline comments get added, the file gets a very clear name, and it goes in my online library. I may never use anything like it again, but if I do, I have documentation and sample code now, in a format that is crystal clear to me (since I wrote it). Doing that kind of thing has saved me days, maybe weeks, of work, in many cases. "I know I did this before, but I don't remember how," stops being a significant barrier.

- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
CapnHector
CapnHector
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3291 Visits: 1789
Thanks for the information. i use drop box and they do have a nice web interface just like sky drive. The application lets me keep multiple computers in sync rather easily. (may have to look into Microsoft sky drive though)

GSquared, i like the explanation of what you keep and what you just rewrite when you need it.


For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden for the best way to ask your question.

For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw

Need to Split some strings? Jeff Moden's DelimitedSplit8K
Jeff Moden's Cross tab and Pivots Part 1
Jeff Moden's Cross tab and Pivots Part 2
GSquared
GSquared
SSC Guru
SSC Guru (58K reputation)SSC Guru (58K reputation)SSC Guru (58K reputation)SSC Guru (58K reputation)SSC Guru (58K reputation)SSC Guru (58K reputation)SSC Guru (58K reputation)SSC Guru (58K reputation)

Group: General Forum Members
Points: 58175 Visits: 9730
If you're happy with DropBox, use that. SkyDrive is just another option for it.

Main reason I use SkyDrive is because I've been using it (and hotmail) since before most of these other services existed. Haven't seen a need to change, so haven't bothered. In other words, it's not a serious preference, one way or the other.

- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)

Group: General Forum Members
Points: 98909 Visits: 33014
Thought of one other place where I store a lot of my scripts. My blog. I put more stuff up there than anywhere else, and it's always online when I need it (so far, knock wood).

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
CapnHector
CapnHector
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3291 Visits: 1789
GSquared (12/3/2012)
If you're happy with DropBox, use that. SkyDrive is just another option for it.

Main reason I use SkyDrive is because I've been using it (and hotmail) since before most of these other services existed. Haven't seen a need to change, so haven't bothered. In other words, it's not a serious preference, one way or the other.


i was looking at sky drive and have one from my xbox live (one of the few benifits of playing the 360) and i was liking the office integration for some school work i was working on, that alone may cause to switch.

I to am only using drop box for the same reason, been using it for a while. with the desktop sync software it will be easy (although take some time) to just swap every thing over.


For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden for the best way to ask your question.

For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw

Need to Split some strings? Jeff Moden's DelimitedSplit8K
Jeff Moden's Cross tab and Pivots Part 1
Jeff Moden's Cross tab and Pivots Part 2
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search