[Feature Request] Change Identity seed in UI

[Feature Request] Change Identity seed in UI

Postby MEngelbyDev » Wed 12 Apr 2017 21:19

Greetings,

When the table object editor is open, and the column properties pane is open, it would be great if in the IDENTITY section, it showed what the current SEED and INCREMENT values are for that table.column. Provided the column type is set to IDENTITY of course.

It would be even better if the SEED could be changed, and then UPDATE Database button was pressed. Or maybe in the Database Explorer context menu, if the appropriate column was clicked on, there was a way to RESEED the IDENTITY interactively.

Right now, I use T-SQL to change my seed value, which isn't hard. It would be an improvement if it could be done through the User Interface.
MEngelbyDev
 
Posts: 20
Joined: Tue 06 Dec 2016 19:49

Re: [Feature Request] Change Identity seed in UI

Postby alexa » Thu 13 Apr 2017 06:25

There are the 'Seed' and 'Increment' properties for a column in the right part of Table Editor.
alexa
Devart Team
 
Posts: 2065
Joined: Fri 24 Jun 2011 14:17

Re: [Feature Request] Change Identity seed in UI

Postby MEngelbyDev » Thu 13 Apr 2017 14:43

Yes. Those are the fields I am referring to. I just tried this morning to change the seed value using that field and it did work. I had assumed they didn't work since they don't seem to change from their initial or user adjusted values. The seed value does not reflect what the current seed is. That was the reason for my confusion.

Given that, it would be nice if the seed value reflected the current value. Since you have a bigger picture of the feature set, there may be a use case for only showing the initial values.

Thanks for the clarification.
MEngelbyDev
 
Posts: 20
Joined: Tue 06 Dec 2016 19:49

Re: [Feature Request] Change Identity seed in UI

Postby alexa » Wed 19 Apr 2017 11:21

Could you please clarify whether you are referring to last_value? If so, for example, in SSMS there is no such a property. What do you need it for?

In case you don't see the actual values of 'seed' and 'identity', please let us know whether you were changing these values with a script. After execution the script, please try clicking the 'Refresh Object' button in the table editor.
alexa
Devart Team
 
Posts: 2065
Joined: Fri 24 Jun 2011 14:17

Re: [Feature Request] Change Identity seed in UI

Postby MEngelbyDev » Wed 19 Apr 2017 19:51

Code: Select all
IDENT_CURRENT( 'table_name' );

Is what I use to get the last identity value that was written to the table at the time of statement execution. If I need to change the seed, I use:
Code: Select all
DBCC CHECKIDENT( 'table_name', RESEED, <new value> );

Or if the increment needs changing, I simply recreate the table with the new values. I am not changing these values in a script. That implies they are being changed via automation. Unless those conditions are carefully controlled, that would be a very bad idea. I personally only change these values on an as-needed basis during new table creation or when the database is in single-user mode for special circumstances.

Regardless, to answer your last question, when the table is altered with the table editor, the 'seed' and 'increment' values are the same as defined in the T-SQL script for table creation.

At the time of my original post, I was curious if the table editor displayed the last value for the identity when the object was refreshed. It does not. I was also curious if I could change the seed and increment with the table editor. That certainly is possible, but only advisable under limited conditions, lest the identity value becomes useless as a primary key.
MEngelbyDev
 
Posts: 20
Joined: Tue 06 Dec 2016 19:49

Re: [Feature Request] Change Identity seed in UI

Postby alexa » Thu 20 Apr 2017 11:12

Thank you for the reply.

We will take this into account.
alexa
Devart Team
 
Posts: 2065
Joined: Fri 24 Jun 2011 14:17


Return to dbForge for SQL Server