Click here to Skip to main content
15,894,907 members
Home / Discussions / Database
   

Database

 
GeneralRe: Help with access Query Pin
Chris Meech8-Mar-10 8:46
Chris Meech8-Mar-10 8:46 
AnswerRe: Help with access Query Pin
Luc Pattyn8-Mar-10 5:25
sitebuilderLuc Pattyn8-Mar-10 5:25 
Questionmultiple tables in datagridview Pin
Enobong Adahada7-Mar-10 20:50
Enobong Adahada7-Mar-10 20:50 
AnswerRe: multiple tables in datagridview Pin
Mycroft Holmes7-Mar-10 22:34
professionalMycroft Holmes7-Mar-10 22:34 
QuestionDAO 12.0 Big Images in Access Pin
Juan Pablo G.C.7-Mar-10 8:57
Juan Pablo G.C.7-Mar-10 8:57 
AnswerRe: DAO 12.0 Big Images in Access Pin
RCoate8-Mar-10 13:35
RCoate8-Mar-10 13:35 
GeneralRe: DAO 12.0 Big Images in Access Pin
Juan Pablo G.C.8-Mar-10 23:46
Juan Pablo G.C.8-Mar-10 23:46 
QuestionMS SQL: how to reorganize identity column values? Pin
michal.kreslik6-Mar-10 11:52
michal.kreslik6-Mar-10 11:52 
Hello,

in one of my tables, I'm using Int32 as a data type for the identity column.

This Int32 identity value is autogenerated. Now it has reached the maximum value for Int32, although the total number of rows is "only" 1.6 billion, because some rows were deleted and because I used an identity seed of 400 million on this column when creating the table for various reasons.

Now, no new rows can be added to the table, because the Int32 autogenerated identity column value is hitting the maximum value for Int32.

One of the options would obviously be to change the data type of the identity column to another data type, let's say Int64 (biginit in MS SQL terms). However, changing Int32 to Int64 on 1.6 billion rows might seem like a small step for a human, but it's a big step for such a database..

Even if I turn off all logging, I switch the recovery model to simple and I delete all indexes on this table, the process of changing Int32 to Int64 on this column fails since there's not enough disk space to make this change. I'm using two 1000 GB hard drivers in RAID0, so the total space is 1000GB and the database with all indexes is 315 GBs big. For some reason, even 700 GBs is not enough for this operation.

Since there are still roughly 500 million values for this Int32 identity column theoretically available, I'm thinking my best bet at this point would be to try to reorganize the identity column values so that they reorder themselves to begin with 1 and will defragment themselves so there will be no holes in the used Int32 values for the identity column.

But I haven't found a way on how to do this. Does anyone know if this is possible?

Thanks very much for any input,
Michal
AnswerRe: MS SQL: how to reorganize identity column values? Pin
i.j.russell6-Mar-10 12:47
i.j.russell6-Mar-10 12:47 
AnswerRe: MS SQL: how to reorganize identity column values? Pin
Gerald Schwab6-Mar-10 16:30
Gerald Schwab6-Mar-10 16:30 
GeneralRe: MS SQL: how to reorganize identity column values? Pin
Mycroft Holmes6-Mar-10 16:45
professionalMycroft Holmes6-Mar-10 16:45 
AnswerRe: MS SQL: how to reorganize identity column values? Pin
PIEBALDconsult7-Mar-10 17:13
mvePIEBALDconsult7-Mar-10 17:13 
GeneralRe: MS SQL: how to reorganize identity column values? Pin
Mycroft Holmes7-Mar-10 18:34
professionalMycroft Holmes7-Mar-10 18:34 
GeneralRe: MS SQL: how to reorganize identity column values? Pin
PIEBALDconsult8-Mar-10 12:01
mvePIEBALDconsult8-Mar-10 12:01 
GeneralRe: MS SQL: how to reorganize identity column values? Pin
Mycroft Holmes8-Mar-10 13:25
professionalMycroft Holmes8-Mar-10 13:25 
GeneralRe: MS SQL: how to reorganize identity column values? Pin
PIEBALDconsult8-Mar-10 17:34
mvePIEBALDconsult8-Mar-10 17:34 
GeneralRe: MS SQL: how to reorganize identity column values? Pin
Mycroft Holmes8-Mar-10 18:32
professionalMycroft Holmes8-Mar-10 18:32 
GeneralRe: MS SQL: how to reorganize identity column values? Pin
michal.kreslik8-Mar-10 22:49
michal.kreslik8-Mar-10 22:49 
GeneralRe: MS SQL: how to reorganize identity column values? Pin
Mycroft Holmes8-Mar-10 23:41
professionalMycroft Holmes8-Mar-10 23:41 
AnswerRe: MS SQL: how to reorganize identity column values? Pin
Mycroft Holmes7-Mar-10 18:36
professionalMycroft Holmes7-Mar-10 18:36 
GeneralRe: MS SQL: how to reorganize identity column values? Pin
michal.kreslik8-Mar-10 1:06
michal.kreslik8-Mar-10 1:06 
GeneralRe: MS SQL: how to reorganize identity column values? Pin
michal.kreslik8-Mar-10 21:54
michal.kreslik8-Mar-10 21:54 
GeneralRe: MS SQL: how to reorganize identity column values? Pin
Mycroft Holmes8-Mar-10 22:27
professionalMycroft Holmes8-Mar-10 22:27 
GeneralRe: MS SQL: how to reorganize identity column values? Pin
michal.kreslik8-Mar-10 22:30
michal.kreslik8-Mar-10 22:30 
GeneralRe: MS SQL: how to reorganize identity column values? Pin
michal.kreslik8-Mar-10 23:57
michal.kreslik8-Mar-10 23:57 

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.