Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

TempDB Deleted Accidentally Expand / Collapse
Author
Message
Posted Tuesday, May 3, 2011 10:57 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 10, 2014 9:20 PM
Points: 117, Visits: 465
Comments posted to this topic are about the item TempDB Deleted Accidentally
Post #1102852
Posted Wednesday, May 4, 2011 12:52 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, June 19, 2014 6:18 AM
Points: 68, Visits: 47
Why not just 'create' the G: drive?

- ex: subst g: <anypath>

Then one does not have to run the SQL in Single User mode and such....
Post #1102896
Posted Wednesday, May 4, 2011 12:59 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, November 18, 2013 5:13 AM
Points: 13, Visits: 20
SQL server doesn't care much where you put stuff, only that the path exist
so you could also use good old dos command SUBST e.g.:

Create a folder c:\temp\data whith the correct ntfs permissions
SUBST g: c:\temp\
Start SQL server Service
Start SSMS
move tempdb to somewhere safe
etc.
when finished:
SUBST g: /d

Rob.
Post #1102900
Posted Wednesday, May 4, 2011 1:40 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 6:20 AM
Points: 6,752, Visits: 14,400
the article is correct, subst will not work especially if the service runs under a user account. The steps are perfectly reasonable, although i have to say this topic (starting in single user mode) has been done to death.

For reference, there is no MOVE parameter for ALTER DATABASE you should use MODIFY to alter a file or filegroup. Otherwise very tidy article, well done


-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1102908
Posted Wednesday, May 4, 2011 1:54 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, June 19, 2014 6:18 AM
Points: 68, Visits: 47
Of course - thanks for mentioning this (sometimes one types faster then on thinks )
Post #1102913
Posted Wednesday, May 4, 2011 1:57 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, December 18, 2014 10:12 PM
Points: 358, Visits: 1,066
I've been training to get 70-432 certification and came across this problem as well.

My personal opinion is that not only should you try and move tempdb to another location the default but his must be well documented.
Post #1102914
Posted Wednesday, May 4, 2011 2:19 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 2:03 PM
Points: 2,278, Visits: 3,806
Nice article, but I thought there would be something more than starting sql server in single user mode :)

Mohammed Moinudheen
Post #1102919
Posted Wednesday, May 4, 2011 2:23 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, January 2, 2014 7:30 AM
Points: 37, Visits: 220
Handy article, thanks.

One cannot but admire all the brave DBA's out there who have to live with "a constant fear of losing data because of the mistakes of some developer or support person". Personally, I'm sure I couldn't handle such stress!

Although, by the sound of it, that's not exactly what happended here. More like errare humanum est, eh?



Post #1102923
Posted Wednesday, May 4, 2011 2:56 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 10, 2014 9:20 PM
Points: 117, Visits: 465
Thankyou All for the comments and views.
@ Perry Whittle . I just ment to move the files physically and not syntactically.
@ Grasshopper. I don not think that will be possible as pointed out already.

Tushar
Post #1102934
Posted Wednesday, May 4, 2011 3:49 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, December 15, 2014 10:45 PM
Points: 22, Visits: 81
This reminded me of something that happened a few years ago when working on SQL Server 2000. Same scenario. Following is what I did to resolve the issue:
a) Create a dummy folder (say "X") on a drive having ample space.
b) Created the same folder hierarchy (\X\Foldername) inside this folder as the path of the folder where tempdb was supposed to be located.
c) Mapped this newly created folder (X) as the drive (G-drive in this case).

On starting the SQL Server Service, it created the tempdb on this mapped G-drive which in turn was folder "\X\Foldername".
Post #1102955
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse