Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Database: MS SQL Server
 SQL Indexes and Constraints
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

mastersolutionsllc
Starting Member

6 Posts

Posted - 06 March 2008 :  08:43:04  Show Profile
Unfortunately, Im way more familiar with SQL, and hardly at all with asp, so I apologize in advance if Im going down the wrong trail.

I followed the directions found in another topic to install and set up SQL. I followed it, but when I go into SQL, I dont see any indexes, identity columns, or constraints.

Did I miss a step? Or are there no indexes or constraints and the ID would be generated by the asp code? I didnt add any identity dolumns, but did add some indexes to see what would happen.

I do have the forum working. I added categories etc... so perhaps it isnt needed?

Thanks so much in advance for any pointers.

Sean HEnry

AnonJr
Moderator

United States
5768 Posts

Posted - 06 March 2008 :  08:47:50  Show Profile  Visit AnonJr's Homepage
As long as you let setup.asp create the tables, the indexes etc. should have been created. Just in case you're interested in peeking in at the code to see what should be there, its in inc_create_forum_mssql.asp
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 06 March 2008 :  11:18:17  Show Profile  Visit HuwR's Homepage
as anonjr states, the indexes/keys etc are created by the forums setup script, if creating categories and topics etc is working then the keys must have been created, if not you would be getting a lot of errors
Go to Top of Page

mastersolutionsllc
Starting Member

6 Posts

Posted - 07 March 2008 :  09:27:09  Show Profile
Odd. I might be having a flashback....

Anyhow, it could possibly be tied to me originally creating the database on another server, and having to back it up and resotre it here. I cannto imagine why it wouldnt include allt he indexes and constraints. I will check the asp fiel and see if I can script them back in.

Thanks much...

Sean Henry
Go to Top of Page

mastersolutionsllc
Starting Member

6 Posts

Posted - 24 March 2008 :  10:08:45  Show Profile
I guess in moving the db it didnt bring indexes etc...

I notice the indexing is fairly simple. No clustered indexes etc... Does anyone have any experience making more sophisticated indexes? Perhaps they are really needed if it doesnt get too big?

For what it is worth, I made a script that has the indexes incase someone needs just that. Replace the tablename with the actual prefix

CREATE INDEX TableName_CATEGORY_CAT_ID ON TableName_CATEGORY(CAT_ID)

CREATE INDEX TableName_CATEGORY_CAT_STATUS ON TableName_CATEGORY(CAT_STATUS)

CREATE INDEX TableName_CAT_ID ON TableName_FORUM(CAT_ID)

CREATE INDEX TableName_F_CAT ON TableName_FORUM(CAT_ID)

CREATE INDEX TableName_FORUM_ID ON TableName_FORUM(FORUM_ID)

CREATE INDEX TableName_MEMBERS_MEMBER_ID ON TableName_MEMBERS(MEMBER_ID)

CREATE INDEX TableName_MODERATOR_FORUM_ID ON TableName_MODERATOR(FORUM_ID)


CREATE INDEX TableName_MODERATORS_MEMBER_ID ON TableName_MODERATOR(MEMBER_ID)

CREATE INDEX TableName_REPLY_R_AUTHOR ON TableName_REPLY(R_AUTHOR)

CREATE INDEX TableName_REPLY_CATFORTOP_ID ON TableName_REPLY(CAT_ID, FORUM_ID, TOPIC_ID)


CREATE INDEX TableName_FORUM_ID ON TableName_REPLY(FORUM_ID)


CREATE INDEX TableName_REPLY_ID ON TableName_REPLY(REPLY_ID)

CREATE INDEX TableName_REPLY_TOPIC_ID ON TableName_REPLY(TOPIC_ID)

CREATE INDEX TableName_TOPICS_CAT_ID_FORUM_ID ON TableName_TOPICS(CAT_ID, FORUM_ID)

CREATE INDEX TableName_TOPICS_T_AUTHOR ON TableName_TOPICS(T_AUTHOR)


CREATE INDEX TableName_TOPICS_CAT_ID ON TableName_TOPICS(CAT_ID)

CREATE INDEX TableName_FORUM_ID ON TableName_TOPICS(FORUM_ID)

CREATE INDEX TableName_TOPICS_TOPIC_ID ON TableName_TOPICS(TOPIC_ID)

CREATE INDEX TableName_TOPICS_CAT_FOR_TOP ON TableName_TOPICS(CAT_ID, FORUM_ID, TOPIC_ID)


Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 March 2008 :  11:18:33  Show Profile  Send ruirib a Yahoo! Message
That would mean the database wasn't properly moved. We do suggest running setup.aspp before doing anything else for a reason...
An alternative to that would be to get a DB script that included all the relevant info (indexes included) and use it to create the DB, and import the data after that.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.99 seconds. Powered By: Snitz Forums 2000 Version 3.4.07