Re: PK columns dont show up in INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
From: Mark Allison (mark_at_no.tinned.meat.mvps.org)
Date: 01/18/05
- Previous message: Jasper Smith: "Re: Error Granting DB / Role Access"
- In reply to: Soenke Richardsen: "PK columns dont show up in INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE"
- Next in thread: Soenke.Richardsen_at_web.de: "Re: PK columns dont show up in INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE"
- Reply: Soenke.Richardsen_at_web.de: "Re: PK columns dont show up in INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 18 Jan 2005 09:10:55 +0000
Soenke,
This happens when a user tries to get schema information from tables
that they don't own. If you login as myuser it works fine. Can you
create the table as dbo.[TEST]? If you do this then it should work
without issue.
-- Mark Allison, SQL Server MVP http://www.markallison.co.uk Looking for a SQL Server replication book? http://www.nwsu.com/0974973602m.html Soenke Richardsen wrote: > Having a database user 'myuser' beeing a member of the roles 'public' > and 'db_owner' I created the test table: > > if exists (select * from dbo.sysobjects where id = > object_id(N'[myuser].[TEST]') and OBJECTPROPERTY(id, N'IsUserTable') = > 1) > drop table [myuser].[TEST] > GO > > CREATE TABLE [myuser].[TEST] ( > [TEST_ID] [varchar] (2) NOT NULL , > [DESCRIPTION] [varchar] (60) NOT NULL , > CONSTRAINT [TEST_PK] PRIMARY KEY CLUSTERED > ( > [TEST_ID] > ) ON [PRIMARY] > ) ON [PRIMARY] > GO > > However, the primary key constraint 'TEST_PK' does not show up in the > view > > select * from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE > > only foreign keys (from other tables) show up. > > Is this a security issue? > > Using SQL Server 2000 Dev Edition SP3a on Win XP Prof. > > Thank you in advance for your assistance, > > SR
- Previous message: Jasper Smith: "Re: Error Granting DB / Role Access"
- In reply to: Soenke Richardsen: "PK columns dont show up in INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE"
- Next in thread: Soenke.Richardsen_at_web.de: "Re: PK columns dont show up in INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE"
- Reply: Soenke.Richardsen_at_web.de: "Re: PK columns dont show up in INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|