Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RE: permissions to sysobjects

Status
Not open for further replies.

cags

Programmer
May 24, 2001
3
GB
I am trying to put a reference contraint to a feild in sysobjects from one of my user tables. I have tried grant references on sysobjects to username in Query Analyzer whilst connected as sa but it just says that granted priveldge REFERENCES is not compatible with this object.
Anyone know how to do this?
 
Which field are you trying to create a constraint on in sysobjects as many of the fields in the sysobjects table are calculated fields which you cannot create a constarint against.

Chris Dukes
 
hi
thanks for responding.
It is the ID field I am trying to get at.
 
Microsoft DO NOT advise using system tables as foreign keys into user tables as they reserve the right to change system tables between releases. Also ID's kept in system tables are Server/database specfic so that if you need to create a new database or move servers, your foreign keys are no longer correct.

After checking SQL Books on line you will find the following:

The REFERENCES permission cannot be granted for a system table.


Hope this helps,

Chris Dukes


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top