Author |
Topic  |
|
martin_nv
Starting Member
Canada
2 Posts |
Posted - 13 December 2005 : 14:59:50
|
Hi everyone, I'm having problems moving my database from an old server to a new server. It seems that even though the database is created and I can view it in Enterprise Manager properly, it still wants me to "create a new database" when I run setup.asp. Old and new server is SQL server 2000, Win2003, running Snitz 3.4.05.
Here is what I have done:
Copy forum_data.mdf over to new server, as well as the directory that contains all the .asp files.
In Query Analyzer, I ran this command: EXEC sp_attach_single_file_db @dbname = N'forumyay' ,@physname = N'C:\Program Files\Microsoft SQL Server\mssql\data\forum_data.mdf'
Then I went to forum's setup.asp and it gave me: Cannot open database requested in login 'forumyay'. Login fails.
OK so I go to set up a user and password in Enterprise Manager, change strConnString in config.asp then open setup.asp again and then it says: You need to create all the tables in the database before you can start using the forum.
I can't figure out what I'm doing wrong, I think it might be a user/permission thing, but why is it asking me to create a new database? I can see the tables in Enterprise Manager fine and they do contain the data from the old server. Is there some other file that I need to copy over?
Any help or suggestions would be appreciated, Thanks!
|
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 13 December 2005 : 15:03:14
|
My guess would be that you probably should have let Snitz create the database first, then imported the old info in... though I'd wait for one of the resident database geniuses confirmation on that first  |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
martin_nv
Starting Member
Canada
2 Posts |
Posted - 13 December 2005 : 15:47:48
|
Wow thanks for the quick replies guys! 
The problem was indeed that the owner was wrong. I couldn't figure out how to change the owner in E.M. so I used Query Analyzer to execute this command on each table: exec sp_changeobjectowner 'oldowner.forum_a_reply','newowner'
Ran setup.asp and all is fine now... Thanks!!!!
|
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 13 December 2005 : 15:56:28
|
Glad you got it sorted out.  |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
|
Topic  |
|