Author |
Topic  |
ugger
Junior Member
 
Denmark
127 Posts |
Posted - 06 March 2007 : 01:23:53
|
i want to have 2 forums working side by side on the same server and with different tables. Is it possible to change tablenames only in one file for the forums f.e. the defaultname forum_..... to forum2_....
|
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 06 March 2007 : 04:01:58
|
Yes, you can change those prefixes in config.asp. They're easy enough to spot and the variable names should be self explanatory but post back if you've any questions. While not essential, when setting up 2 forums within the same domain, I also recommend changing the value of the strUniqueID variable in the same file to avoid any potential clashes between cookies & sessions.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
TastyNutz
Junior Member
 
USA
251 Posts |
Posted - 06 March 2007 : 13:04:16
|
I have 2 domains. One is my live site. The other has 3 separate forums, for testing and development. Each is a complete installation. I just place them into distinct folders, e.g.:
mydomain/forum/ mydomain/forum2/forum/ mydomain/forum3/forum/
Works great. And nothing to rename.
|
PowerQuad Disability Support Forum |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 07 March 2007 : 04:12:51
|
That's with separate databases for each, though, isn't it, TN? Ugger wants to run them all off the same database, though, hence the need for the changes. Even when running multiple forums off different databases, I'd still recommend changing the strUniqueId to avoid any cookie issues should you, for example, ever switch to using website cookies.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
ugger
Junior Member
 
Denmark
127 Posts |
Posted - 07 March 2007 : 04:13:13
|
I've done as bescribed by renaming the 3 default lines in config.asp to forum2_ and changed the strUniqueID to another name. It all works okay.
|
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 07 March 2007 : 04:31:05
|
Good stuff 
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
Posted - 07 March 2007 : 13:41:58
|
Would this have any impact on the database access times? I'd like a separate forum for reviews on my site but I'm worried it'll create speed issues. Also, apart from being able to have a different group of categories and forums, would everything else still be shared? I'd like my existing member table etc. to be shared by both forums. |
Bandlink.net - http://www.bandlink.net/ Bandlink Music Forums - http://www.bandlink.net/forum/ |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 07 March 2007 : 14:12:38
|
quote: Originally posted by MarkJH
Would this have any impact on the database access times? I'd like a separate forum for reviews on my site but I'm worried it'll create speed issues.
If you're using Access, you greatly increase the likelihood. If you're using something like MS SQL Server or MySQL, I doubt you'll run into issues. This is a trick that comes in handy if you're running multiple forums, but your host only gives you 1 MS SQL database...
quote: Originally posted by MarkJH
Also, apart from being able to have a different group of categories and forums, would everything else still be shared? I'd like my existing member table etc. to be shared by both forums.
If you leave the members table prefix the same, to the best of my knowledge it will share the members table. Just keep in mind that active.asp will be a little funny since their last visit time will be updated on both forums when they visit just one... |
 |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
Posted - 07 March 2007 : 14:18:35
|
quote: Just keep in mind that active.asp will be a little funny since their last visit time will be updated on both forums when they visit just one...
That's a good point. I guess it's one of those try it and see things. I'm sure there's likely to be the odd quirk in running something like this.  |
Bandlink.net - http://www.bandlink.net/ Bandlink Music Forums - http://www.bandlink.net/forum/ |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 07 March 2007 : 14:44:28
|
There may be a couple other odd quirks related to that "visit date" issue, but as far as I know that's the only real problem with sharing the members table. |
 |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
Posted - 07 March 2007 : 16:21:05
|
Thought I'd give it a shot. Without changing the config.asp members table prefix, I get errors when setting up, as expected.
Problem is, going into the forum, I'm getting:
Microsoft OLE DB Provider for SQL Server error '80040e37'
Invalid object name 'FORUM2_ACTIVE_USERS'.
/reviews/inc_func_common.asp, line 152
My database is MS SQL. Is there a query to mass copy/paste every table with the prefix FORUM_ to FORUM2_ ? |
Bandlink.net - http://www.bandlink.net/ Bandlink Music Forums - http://www.bandlink.net/forum/ |
 |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 12 March 2007 : 04:44:21
|
If you have EM, you could just make generate the script to create the tables and then do an Edit / Replace to change FORUM to FORUM2_. Let me know if you have EM or SQL Server Managemente Studio and I'll tell you how to do it. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
Posted - 12 March 2007 : 07:32:50
|
MarkJH - DTS would be a simpler way to do the data load, and perhaps the setup.asp on the second forum to create the structures - or am I missing something?! |
 |
|
MarkJH
Senior Member
   
United Kingdom
1722 Posts |
Posted - 12 March 2007 : 11:32:22
|
quote: If you have EM, you could just make generate the script to create the tables and then do an Edit / Replace to change FORUM to FORUM2_. Let me know if you have EM or SQL Server Managemente Studio and I'll tell you how to do it.
Rui, I have Enterprise Manager. If you could show me how to do this I'd be grateful. 
quote: MarkJH - DTS would be a simpler way to do the data load, and perhaps the setup.asp on the second forum to create the structures - or am I missing something?!
Maybe for a base Snitz but mine has countless MODs that I'd like to port over to the second forum, without having to reinstall them. |
Bandlink.net - http://www.bandlink.net/ Bandlink Music Forums - http://www.bandlink.net/forum/ |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 12 March 2007 : 14:36:06
|
Mark,
1.In EM, right click over the database where the tables you want, exist. In the popup menu, choose, Generate SQL Script~; 2. In the dialog that shows, on the General tab, click Show All. Then click to check All tables. or click individually in the forum tables you want; 3. Click the Options tab. In the table scripting options group, check "script indexes" and then check "script Primary Keys, Foreign keys..."; 4. Click the Ok button, pick a file name and location. The script will be generated;
5. Open Query Analizer and connect to the server; 6. Using File -> Open, open the script created in 4 in Query Analizer; 7. Using Edit->Replace, replace all the occurrances of FORUM_ by FORUM2_ in the script; 8. Make sure the database name for the database where you want to create the tables is shown in the dropdown above the SQL editing window in Query Analizer. 9. Execute the script.
The new tables with the proper indexes should have been created by now... but you will have a blank database...
You could use DTS to copy the data in the MEMBERS, CONFIG_NEW, FORUM and CATEGORY tables and then delete everything you don't want or need. Just make sure you have enable identity insert checked for each of the tables to be imported.
|
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
Topic  |
|