Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
alejo46
Posting Yak Master
157 Posts |
Posted - 2013-05-27 : 20:08:54
|
Good eveningbecause the filefroups are running out of space there are 2 mantainance procedures to increase filegroups space depending on 2 scenarios:1st scenario OK1.backup the whole table in a flat file2.drop the table2nd scenario (here's the problem)2.1 if the table is large enough in the business logic there is a script the creates a temp table based in a where condition i.e: select * into temp_tablexx from tablexxwhere start_date >= 20130101 and start_date <= 201302282.2 backup the temp_tablexx in a flat file2.3 delete the records based in the where clauseIm not a DBA nor a developer but according the above script (select into) is not time consuming and overheat other processes by creating the temp table?Instead wouldnt it better to backup the records to delete in a flat file ?thanks in advance |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-05-27 : 20:45:51
|
I didn't quite understand the problem you are trying to solve - however, backing up a database table to a flat file is really not ideal for a variety of reasons. The second approach you mentioned can be time consuming because it could potentially require a table scan, and long running transactions. If you are trying to add more disk space or move file groups, see if any of the approaches described on this MSDN page would work for you: http://msdn.microsoft.com/en-us/library/bb522469.aspx |
|
|
alejo46
Posting Yak Master
157 Posts |
Posted - 2013-05-27 : 21:15:48
|
thanks you very much, aid ive got a question: what are some reasons we shouldnt backup to a flat table?2.I read the MSDN page you shared and its quite useful but there must be enough available space in disks, right ?3. in case theres no space left in disks its better to backup the records to delete in a flat file instead creating the temp table ?Thanks in advance |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
|
|
|
|