Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Primary Keys missing

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-11-06 : 07:58:23
Suz writes "Windows Server 2003 SP1
SQL 2000 SP4

We are running SQL 2000 db on JDEOneworld ERP 8.0. I have been recently trying to make a plan to increase the performance of JDE, which to me meant to look at the database first. I have done things like set up jobs to run weekly optimization jobs, added a few indexes in key tables, and started an overall analysis of all indexes. Upon looking at table design I have found that all the primary keys are missing on the SQL tables. I have gone through the processes of adding them back to the key tables (there are over 1000 tables in the affected database), which did not seem to make any difference in performance. I have found a JDE tool that will add all primary keys back to SQL but when I run the job, it thinks there are already primary keys on the tables when I cannot see them within table design.

Is there a way to tell what primary keys SQL thinks are on each table besides looking at each one individually? Is there a way to drop all primary keys in a database cleanly so they can then be re-created?

Any help will be greatly appreciated!!! Rockin site!!!"

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-11-06 : 08:02:54
quote:
Is there a way to tell what primary keys SQL thinks are on each table besides looking at each one individually?


I don't know about primary key but as per BOL:

quote:
sp_special_columns

Returns the optimal set of columns that uniquely identify a row in the table. Also returns columns automatically updated when any value in the row is updated by a transaction.



Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page
   

- Advertisement -