Saturday, February 25, 2012

Realllly fundamental...

Since I'm new to SQL server I feel like I should be able to ask this with a straight face and without ridicule...

I'm trying to change the location of log and data files, I have identified a stored procedure that will do this, but neither the book I have nor the Microsoft Knowledge base mentions where to run the stored procedure from...

From where or what application does one call or execute a stored procedure for admin type tasks?? The article lists command line inputs...but I'm not sure where to run this from.Heavens, you can ask almost any question around here with a straight face. We occaisionally get some real doozies!

Ridicule is generally reserved for the awesomely lazy louts trying to get us to do their homework, and a fair degree of abuse between those of us that hang out here... With the homework exception, we rarely abuse people before we get to know them.

To answer your question, the easiest stored procedure that will allow you to move the data/log files around in my opinion is sp_attach_db (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_ae-az_52oy.asp) and the corresponding sp_detach_db (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_da-di_83fm.asp). They can both be executed using the SQL Query Analyzer (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/qryanlzr/qryanlzr_1zqq.asp).

How'd I do ?

-PatP|||You did great, thanks for the help!|||What a stupid answer, Pat.|||What a stupid answer, Pat.Well duh ;)

-PatP|||Oh, now you've started something buster. It's on.|||You guys really shouldn't do this. This is a professional forum and we need to maintain a level of integrity and professionalism corresponding to the seriousness of this environment.

((I can't believe these idiots!!!!!!))

No comments:

Post a Comment