I have a huge database with millions of rows all containing SYSTEM_USER value.
The column value is defined as default
CREATE DEFAULT [dbo].[A_User] AS SYSTEM_USER
My idea is to get the ID instead of nvarchar value in order to shrink the table size and have a better query result over ids.
Now, I have few questions:
1. I can get the ID's via USER_ID(SYSTEM_USER), trough default column definition. However If I move the users to another table the values might be different so all things will be mixed up
2. If I use linked servers, (or move the DB to the DR site) will I have problems regarding different IDs
3. If I want to use sysusers table, I cannot write select nor UDF in the default definition.
Is there any more intelligent way to get the same functionality another way or should I use the master database and some login values???