Re: Set Identity_Insert On throws error

From: Anith Sen (anith@bizdatasolutions.com)
Date: 06/12/02


From: "Anith Sen" <anith@bizdatasolutions.com>
Date: Wed, 12 Jun 2002 09:23:50 -0500


SET IDENTITY_INSERT execute permissions default to the sysadmin
fixed server role, and the db_owner and db_ddladmin fixed database
roles, and the object owner.

There is no way to grant previleges to SET IDENTITY_INSERT.

- Anith

"Ron Lounsbury" <rlounsbury@123Progeny.net> wrote in message
news:u94gJrhECHA.2432@tkmsftngp02...
> I have a pair of tables in my database that contain current data and
> archived data from the current table. Once a record has not been changed
> for more than 60 days, the record is moved from the current table to the
> archive table. If an archived record is changed, it is moved back to the
> current table. The snag in this (that we juct found) is this: the current
> table has a sequence number column that is an identity column. In the
> archive table it is simply a number, so the transfer from current to
archive
> isn't a problem. We thought we had the transfer back working also, but
just
> discovered a problem. All access is handled by stored procedures, and the
> UpdateRecord SP contains the following line:
> SET IdentityInsert <currentDataTable> on
> This worked fine in development, where the developers all have DBO access
to
> the database, however when we get the QA guys involved, they get the
> following error on the Set Identity_insert line:
>
> Server: Msg 8104, Level 16, State 1, Line 45
> The current user is not the database or object owner of table
> 'tslNarrSessions'. Cannot perform SET operation.
>
> The TSQL help file states that "normal" users don't have permission to do
a
> SET IdentityInsert "By Default". The "By Default" seems to indicate that
it
> can be granted, but I can't see how without granting far too many
priveleges
> to the general users. Can anyone tell me how I can grant permission to
> "public" to only Set IdentityInsert, or is there a better way?
>
> TIA
> Ron Lounsbury
>
>



Relevant Pages

  • Re: code access security
    ... Error 1 CREATE ASSEMBLY for assembly 'GmsSqlClr' failed because assembly ... owner has EXTERNAL ACCESS ASSEMBLY permission and the database has the ... make sure the database owner is mapped to the correct login on ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: low permission cannot convert from A97 to A2000/2003
    ... Delete is a separate permission. ... You need open exclusive permission on the database to ... > The admin user has full privileges. ... > as we wont be importing those files from them, and the contractor will be ...
    (microsoft.public.access.conversion)
  • Re: low permission cannot convert from A97 to A2000/2003
    ... Delete is a separate permission. ... You need open exclusive permission on the database to ... > The admin user has full privileges. ... > as we wont be importing those files from them, and the contractor will be ...
    (microsoft.public.access.security)
  • Re: Windows Power User SQL
    ... The guest user must have connect permission in master and tempdb. ... When I run from the master database for example testing against user bill ...
    (microsoft.public.sqlserver.security)
  • Could not Lock File error
    ... >I'm trying to share an access database with an entire ... >modifying this file with FULL PERMISSION on the parent ... >or not AND ONLY allowing one person to modify it's ... It's called an .LDB file, ...
    (microsoft.public.access.security)