Good evening because the filefroups are running out of space there are 2 mantainance procedures to increase filegroups space depending on 2 scenarios:
1st scenario OK 1.backup the whole table in a flat file 2.drop the table
2nd 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 tablexx where start_date >= 20130101 and start_date <= 20130228 2.2 backup the temp_tablexx in a flat file 2.3 delete the records based in the where clause
Im 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 ?
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
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