November 30, 2009 at 7:51 am
Hi All, can u pls help me out in one litespeed command line issue?
Here goes the issue:
i have a litespeed back-up (.lsb file)! i am going to use C# code to restore the back-up. my code is going to execute xp_restore_database SP which is provided with the LiteSpeed set-up.
Now my questions are
1. Iis there a way to get the approximate size of the files (mdf, ldf and ndf sizes that will be occupied after the restoration is completed) before the actual restore happens?
2. Is there a query to find out how many files are present in a back-up?
3. Can u pls give me the script to put each file in a separate folder while restoring? as in, mdf goes to D drive, ldf goes to T drive and NDF goes to I drive.
Can u pls help me out? If u have the answers of this using T-SQL codes, that would be great sirs!
I use SQL Server 2005! And the Version of SQL Litespeed, i dont knw (sorry)!!
November 30, 2009 at 8:39 am
You can use the RESTORE commands from SQL to get this information, like FILELISTONLY (http://msdn.microsoft.com/en-us/library/ms173778%28SQL.90%29.aspx)
exec xp_sqllitespeed_version should give you the version, which you likely will need.
to send the files to new folders, you would include the WITH MOVE options, and you can read about those in Books Online.
November 30, 2009 at 8:56 am
oh thanks so much Steve.. but the FileListOnly gives a huge number of columns.. i need only the physical and logical file names..can i get it alone?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply