Solved

Sql Server Problem adding records

Posted on 2008-06-25
4
280 Views
Last Modified: 2012-06-27
I am new to sql server.  I was adding records to tables and was disableing the indentity feature so that it would us the the keys that were already created.  I did something and now I get the error message about usage stats.  Now anytime I try to add or change a record, I get the error message.  Did I enable statistics somehow without adding the table to handle it?  How do I get rid of this?
Thanks
0
Comment
Question by:VonGeist
  • 2
  • 2
4 Comments
 
LVL 3

Expert Comment

by:GHCS_Mark
ID: 21870897
Sounds like you have.  If you are wanting to insert values into a table with an IDENTITY column, you should look at SET IDENTITY_INSERT <tablename> ON.  This will allow you to specify your own identity values when using an INSERT statement.
0
 

Author Comment

by:VonGeist
ID: 21873670
I dont have any problem turning the identity on or off.  The problem is that now anything I do with any of the tables causes the "usagestats" error.  What are usage stats and how do I turn them off? (if that is what I need to do).
Thanks
0
 
LVL 3

Accepted Solution

by:
GHCS_Mark earned 500 total points
ID: 21874106
OK, take a look at http://msdn.microsoft.com/en-us/library/ms175075.aspx.  It does warn that you can end up with issues if you remove statistics incorrectly, so maybe that is what happened in a round about way.

From what I know, statistics are always on as it is what SQL server uses to determine the best execution plan, etc.  
0
 

Author Comment

by:VonGeist
ID: 21874384
Sorry, I may be looking at this the wrong way.  Everytime I do anything with the tables, its looking for and enry in the sysdatabase called "usagestats",  maybe all I need to do is create that.  Does that seem logical and how would I create this since everytime I do anything I get the error.  sounds like a catch 22
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question