Click here to Skip to main content
15,890,995 members
Home / Discussions / Database
   

Database

 
AnswerRe: SQL triple-join question Pin
Ian Dennis6-Apr-07 7:42
Ian Dennis6-Apr-07 7:42 
AnswerRe: SQL triple-join question Pin
Hayder Marzouk6-Apr-07 7:46
Hayder Marzouk6-Apr-07 7:46 
AnswerRe: SQL triple-join question Pin
Jaiprakash M Bankolli6-Apr-07 18:10
Jaiprakash M Bankolli6-Apr-07 18:10 
QuestionDatabase isn't updated.. Pin
nadinekamal6-Apr-07 7:06
nadinekamal6-Apr-07 7:06 
AnswerRe: Database isn't updated.. Pin
Colin Angus Mackay6-Apr-07 10:39
Colin Angus Mackay6-Apr-07 10:39 
GeneralRe: Database isn't updated.. Pin
nadinekamal6-Apr-07 12:51
nadinekamal6-Apr-07 12:51 
GeneralRe: Database isn't updated.. Pin
Colin Angus Mackay6-Apr-07 14:58
Colin Angus Mackay6-Apr-07 14:58 
QuestionExcessive unused space Pin
Ian Dennis6-Apr-07 7:03
Ian Dennis6-Apr-07 7:03 
I am currently testing a data import program which deletes records from files in a SQL 2000 database, and then inserts new ones. The database has over 2000 tables, my program affects about 30 of them and there are over one million records that get deleted and reinserted.

During repeated testing, I noticed two events: (1) that the database would expand to fill the space allocated for it, and (2) that after several runs I would start getting SQL timeouts. I also noticed that these two events seem to be linked – when I increased the allocated space, the timeouts would disappear until such point that the database had filled the allocated space again.

When I investigated further (using ‘sp_spaceused’) I found the following:

07.80 Gb Data
01.70 Gb Index
27.10 Gb Unused
36.60 Gb Reserved
01.00 Gb Unallocated
38.60 Gb Database Size

It seems to me that the culprit is that ‘unused’ space. If I could eliminate that, I should be able to get the database down to a manageable size … about 10.5 Gb. I spent some time researching how to do that. I tried various procedures, including DBCC SHRINKFILE, SHRINKDATABASE, UPDATEUSAGE and DBREINDEX scripts, but nothing works. I ran a third-party SQL defrag utility but, although it reported that some tables/indexes could benefit by defragging, after I ran the defrag routine I noticed that nothing actually got defragged. (This could be because it is an eval version - even tho its supposed to be fully functioning, or it could be symptomatic of a larger problem with the database).

At this point I'm stymied. Can anyone help me?

Ian Dennis
Business Analyst, Assets
HANSEN
AnswerRe: Excessive unused space Pin
Marek Grzenkowicz8-Apr-07 9:24
Marek Grzenkowicz8-Apr-07 9:24 
GeneralRe: Excessive unused space Pin
Ian Dennis9-Apr-07 5:31
Ian Dennis9-Apr-07 5:31 
GeneralRe: Excessive unused space Pin
Marek Grzenkowicz9-Apr-07 6:49
Marek Grzenkowicz9-Apr-07 6:49 
GeneralRe: Excessive unused space Pin
Ian Dennis9-Apr-07 7:05
Ian Dennis9-Apr-07 7:05 
GeneralRe: Excessive unused space Pin
Marek Grzenkowicz9-Apr-07 21:43
Marek Grzenkowicz9-Apr-07 21:43 
GeneralRe: Excessive unused space Pin
Ian Dennis11-Apr-07 7:59
Ian Dennis11-Apr-07 7:59 
AnswerRe: Excessive unused space Pin
Ian Dennis11-Apr-07 8:11
Ian Dennis11-Apr-07 8:11 
GeneralRe: Excessive unused space Pin
Marek Grzenkowicz24-Apr-07 1:56
Marek Grzenkowicz24-Apr-07 1:56 
GeneralRe: Excessive unused space Pin
Ian Dennis24-Apr-07 7:41
Ian Dennis24-Apr-07 7:41 
AnswerRe: Excessive unused space Pin
Ian Dennis24-Apr-07 7:39
Ian Dennis24-Apr-07 7:39 
QuestionProblem in inserting large amount of records in MS Access Pin
Affan Toor6-Apr-07 4:50
Affan Toor6-Apr-07 4:50 
AnswerRe: Problem in inserting large amount of records in MS Access Pin
DQNOK6-Apr-07 6:04
professionalDQNOK6-Apr-07 6:04 
QuestionDTS to load the data from csv file in to a table in the database Pin
indian1436-Apr-07 4:43
indian1436-Apr-07 4:43 
Questionwhat is SqlDataAdapter and SqlDataReader? Pin
sathyan_82946-Apr-07 4:15
sathyan_82946-Apr-07 4:15 
AnswerRe: what is SqlDataAdapter and SqlDataReader? Pin
Krish - KP6-Apr-07 4:47
Krish - KP6-Apr-07 4:47 
Questioninserting a row into table from the form data Pin
Raheem MA5-Apr-07 23:52
Raheem MA5-Apr-07 23:52 
AnswerRe: inserting a row into table from the form data Pin
_mubashir6-Apr-07 3:21
_mubashir6-Apr-07 3:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.