Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

set identity off

 
   Database Help (Home) -> OLAP RSS
Next:  Shutdown function  
Author Message
vinodkus

External


Since: Feb 06, 2008
Posts: 3



(Msg. 1) Posted: Mon Dec 22, 2008 5:51 am
Post subject: set identity off
Archived from groups: microsoft>public>sqlserver>olap (more info?)

dear sir/madam

In an online table, one of field identity set to 1. So its
automatically increment its value to 1.
But I have to set its identity off. But I dont know what is its query.
I have no enterprise manager for its. so please help.

Thanks in advance

 >> Stay informed about: set identity off 
Back to top
Login to vote
Russell Fields

External


Since: Jan 10, 2008
Posts: 608



(Msg. 2) Posted: Mon Dec 22, 2008 10:44 am
Post subject: Re: set identity off [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

If you mean that you wish to insert some data with existing valued in the
identity column then:
SET IDENTITY_INSERT dbname.schemaname.tablename ON
INSERT INTO dbname.schemaname.tablename ... -- code to insert
SET IDENTITY_INSERT dbname.schemaname.tablename OFF

If you mean that you no longer want the identity property on your table,
then you will need to do the following:
1. Create a new table that is just like the old table, but without the
IDENTITY property.
CREATE TABLE NewTableName
(... ) -- full specification for the table.
CREATE INDEX... -- create indexes on the new table also
2. SELECT * INTO NewTableName FROM TableName
3. EXEC sp_rename 'TableName', 'SaveTableName'
4. EXEC sp_rename 'NewTableName', 'TableName'
5. Check and make sure that everything is OK in the new copy of TableName.
6. DROP TABLE SaveTableName

RLF


wrote in message

> dear sir/madam
>
> In an online table, one of field identity set to 1. So its
> automatically increment its value to 1.
> But I have to set its identity off. But I dont know what is its query.
> I have no enterprise manager for its. so please help.
>
> Thanks in advance

 >> Stay informed about: set identity off 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Dim processing errors randomly ? - Hi there, Some times, not always, when I process all dimensions from AM (rightclick on dimensions folder) I get errors like "dimension member is not unique". When I process only that dimenension direclty afterwards it works ok (it's nothin...

format error - i have a calculated measure named "Stock to last Secondry" it shows some values in the following format "1.#J" what is the problem there

MDX and JDBC Driver - Hi all, Anybody know if it possible to connect to an as2000 database and run mdx queries using the microsoft jdbc drivers? thanks, Peter

JAVA API for DSO & DTS - Hi, I am just wondering if there is a JAVA API for accessing the DSO Model in MSFT Analysis Services 2000? Also if there is a JAVA API to access the DTS (Data Transformation Services) Objects in MSAS 2000? Please provide some links if there are any....

h/w and s/w for cube - What are the h/w and s/w requirement for developement and then deployment of the cube? Thanks,
   Database Help (Home) -> OLAP All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]