rickyr
asked on
Changing a tables id?
Hi.........
I have a Sybase SQL Server 10, running on a Sparc Solaris 2.6.
I have a couple of tables that share a user datatype, TableId which is a smallint.
We have reached 32600 odd, and will soon run out of id's.
I have defncopied and bcp'd the data out,
recreated the table with a different datatype, ItemId
which is an int. Now the interesting bit........
When I update the id of my new table to what my old table was,
Sybase can no longer see it, and the shell for my isql session hangs if I try to access the table.
Question......
How do I recreate this table with a bigger datatype and retain its old id?
Are there any other tables I have to update aswell?
regards
I have a Sybase SQL Server 10, running on a Sparc Solaris 2.6.
I have a couple of tables that share a user datatype, TableId which is a smallint.
We have reached 32600 odd, and will soon run out of id's.
I have defncopied and bcp'd the data out,
recreated the table with a different datatype, ItemId
which is an int. Now the interesting bit........
When I update the id of my new table to what my old table was,
Sybase can no longer see it, and the shell for my isql session hangs if I try to access the table.
Question......
How do I recreate this table with a bigger datatype and retain its old id?
Are there any other tables I have to update aswell?
regards
ASKER
While accessing these new table won't be a problem when referencing the table by name, like you said I have loads of sp's that have the id hardwired. I'd like to know a way of slyly changing the table id so these sp's won't know that I have changed the table.
sorry to reject, but I'm still stuck.
thanks for your time
regards
sorry to reject, but I'm still stuck.
thanks for your time
regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
By the way ,data type for the 'id' in sysobjects table is "int" and this is literally a large value. I don't think the server will run out of id.
However changing the id in system tables is not recommonded by Sybase.
Hope this will help you.
Thanks ...