Questions tagged [identity]

Creates an identity column in a table. This property is used with the CREATE TABLE and ALTER TABLE Transact-SQL statements.

15 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
2answers
2k views

Availability Group, asynchronous mode, manual/forced failover - handling identity overlap

We have a two replica 2017 Standard Availability Group in asynchronous mode. With a failover (manual/forced, since can't do automatic), we have the potential for overlapping/reused identity values if ...
2
votes
1answer
204 views

Identity management in Transaction replication with updatable subscription

I have migrated my publisher DB to new server yesterday. For migration what I did was removed subscriptions and publication completely backed up DB on which publication was configured restored DB to ...
2
votes
0answers
322 views

Identity in a view treated as ordinary int - migrating from SQL Server 2000 to 2012

I'm migrating a very old platform from a SQL Server 2000 backend and MS Access 2003 as its frontend to SQL Server 2012 backend and MS Access 2010 as the frontend. This obviously means a bit of ...
2
votes
0answers
733 views

SET IDENTITY_INSERT equivalent in Access

In sql server i can explicitly insert value to a identity column of a table by using SET IDENTITY_INSERT ON . For an Access database i am using Autonumber column datatype. For this column i am not ...
1
vote
0answers
65 views

Identity column changing on its own?

I have a situation where a client is using software that writes to a SQL table. The program has been running fine with no issues prior to today. Today, they began receiving errors inserting NULL ...
1
vote
0answers
594 views

Can I simulate a sequence in pre-2012 SQL Server, with separate identity column, in function style?

A database on SQL Server 2005/2008/R2 is currently using an identity column in a separate table as primary key source. The reason is that the application, with NHibernate as ORM, needs to know the PK ...
0
votes
0answers
18 views

Modelling a database structure for multiple user types with multiple entry points

I am working on a project and my task is to design a database. I tried to read as much as possible, but I still have my doubts how to solve it using a optimal solution. I'm designing a database that ...
0
votes
0answers
12 views

sp_help does not reflect reseed on empty table, is that a bug?

Say I create a create a table with an identity, and before inserting any records, perform a reseed. create table dbo.mytest(x bigint identity(1,1), y char(1)) DBCC CHECKIDENT ( 'mytest', RESEED, ...
0
votes
2answers
71 views

pg_restore fails with drop default on identity column

Trying to restore a Postgres 10.6 database via pg_restore, and it seems to want to do a DROP DEFAULT when it should be doing a DROP IDENTITY during the clean phase. See below: pg_restore --verbose -...
0
votes
0answers
50 views

Transactional Replication : Issues with Identity Column in Subscriber

I have an Transactional replication set up form Server A to Server B. I have a table which has an Identity column as a primary key. In my publisher ,for the table tb1,the the identity column,Id1 was ...
0
votes
0answers
20 views

Converting SalesForce IDs for Performance Reasons

I'm writing code for a data warehouse that extracts information from SalesForce. The format of the SalesForce IDs is like so: 001n000000UELLJAA5 Where each digit is a base-62 value denoted by: a-z ...
0
votes
0answers
51 views

After switchover OIM app to standby, getting ORA-01033: ORACLE initialization or shutdown in progress

I have the exact same issue as described here JDBC Connection on Current Primary Database After Switchover: ORA-01033 encountered We have OIM 11gr2PS3 app and 2 node rac DB cluster. When I switchover ...
0
votes
1answer
309 views

Create trigger to ignore user input for Identity Columns

Using the this table definition CREATE TABLE testtable ( id NUMBER GENERATED AS IDENTITY, desc VARCHAR2(30) ); I would like to create a trigger before inserts and updates to ...
0
votes
0answers
215 views

NEXT VALUE FOR SEQUENCE inside a CASE Statement

I want to use a new SEQUENCE each year (See here: 'Id' with the format: YYYYNNNNNN with the NNNNNN part restarting each year ) However you can not use NEXT VALUE FOR inside a CASE statement. ...
0
votes
1answer
27 views

Separate table creation at runtime or add column

I am planning to keep patient data in a patient table. I will have multiple Clients registered with me, and each client will have multiple doctors. Should I make patient table client wise or a single ...