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


Archiving


Archiving

Author
Message
MSSQL_NOOB
MSSQL_NOOB
SSC-Enthusiastic
SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)

Group: General Forum Members
Points: 117 Visits: 173
MSSQL2008 with 1 TB Harddisk space
Databases:
DB1 - data for 2012.
DB1_Arch - data for 2011.
*** Inherited this server; looks like he idea was DB1 is the production; and DB1_Arch is the archive of DB1

Question 1: When I issue the following query
SELECT file_id, name, type_desc, physical_name, size /1024 / 1024 AS gbsize, max_size/1024/1024 AS gbmaxsize
FROM sys.database_files ;


I get 96 gbsize for Data file and 2gb for Log file for DB1.
However, when I do Reports, Standard Reports, Disk Usage on DB1, I get 790 xxx.xx MB for data file size (which is about 770gb) and 18 xxx.xx MB (or about 17gb) in log file size.

Which is right?

Question 2: There's a request to archive 2012 data to DB1_Archive; then make a backup of it to a different file server. Then delete data from the current DB1 database. Immediate issue I'm facing - if DB1 is in fact 770gb, and total disk is only 1 TB; how do I archive to DB1_Archive first before deleting from DB1?? The math for the space just isn't there. Any suggestions?

Thanks
Jason-299789
Jason-299789
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2617 Visits: 3232
Check the index sizes on the source tables, as they can sometimes be left off the target database when archiving.

You could also investigate the use of Page level compression on the Target DB, which depending on the data profile could reduce the size significantly.

You could also look at putting the Target database on different server with more space then use the scripts that you were going to use as sources for SSIS and have the target as the destination.

_________________________________________________________________________
SSC Guide to Posting and Best Practices
ScottPletcher
ScottPletcher
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10598 Visits: 7231

size /1024 / 1024 AS gbsize



That is not the right computation to get gb. "size" is the number/count of 8K pages. So, to get gb from size, you need to do this calc:

CAST(size / 128.0 / 1024 AS int) AS gbsize

SQL DBA,SQL Server MVP(07, 08, 09)[size=2]Prosecutor James Blackburn, in closing argument in the Fatal Vision murders trial: If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them.[/size]
ScottPletcher
ScottPletcher
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10598 Visits: 7231
If the computation "size / 1024 / 1024" yielded 96 gbsize,
the correct computation of "size / 128 / 1024" would yield 8 times that, or:

~768gb

SQL DBA,SQL Server MVP(07, 08, 09)[size=2]Prosecutor James Blackburn, in closing argument in the Fatal Vision murders trial: If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them.[/size]
MSSQL_NOOB
MSSQL_NOOB
SSC-Enthusiastic
SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)

Group: General Forum Members
Points: 117 Visits: 173
Thank you all for the corrections.

Anyone with any comments on how do I archive the database? Since MSSQL doesn't support UNC path for MDF - getting error "the file .mdf is on a network path that is not supported for database file" nor a mapped network drive.
e4d4
e4d4
Mr or Mrs. 500
Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)Mr or Mrs. 500 (587 reputation)

Group: General Forum Members
Points: 587 Visits: 2399
MSSQL_NOOB (1/15/2013)
Thank you all for the corrections.

Anyone with any comments on how do I archive the database? Since MSSQL doesn't support UNC path for MDF - getting error "the file .mdf is on a network path that is not supported for database file" nor a mapped network drive.


Support, from SQL 2008 without Trace Flag 1807 http://www.brentozar.com/archive/2012/01/sql-server-databases-on-network-shares-nas/ but this should be considered as temporary solution.
MSSQL_NOOB
MSSQL_NOOB
SSC-Enthusiastic
SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)

Group: General Forum Members
Points: 117 Visits: 173
Haven't tried this yet http://www.sqlservercentral.com/articles/delete/96780/ because I completed the archiving project a few weeks ago. But will definitely try it the next round of archiving. Thought I post this here for my personal future reference or help anyone that had the same issue I did.
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