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.
| Author |
Topic |
|
pvillaca
Starting Member
2 Posts |
Posted - 2004-06-12 : 01:43:11
|
| Dear friends,I'm desperate. So desperate I googled for "Help SQL" and found this forum. So I'm counting on you.The problem is: I had an Access forum that got too big and slow. So I decided to change it into a MS SQL version. Ok. I created the Database on Enterprise Manager and generated a basic tables setting for my Forum. Then I tried to Import the users, topics, threads, etc from my access forum by going All Tasks - Import - MS Access - choosing the mdb file - Use SQL Authentication - etc, etc. The final message: 18 tables and views were imported successfully. Great.The problem is: the data doesn't show on my forum, which is still empty. When I checked the Tables directory on the database, I found out that everything was repeated: the tblAuthor, for instance, appeared two times: one created by user DBO (windows) and other by me. Then I tried to import the data by doing Windows Authentication. Well, 6 tables weren't created correctly. Error message. Strange thing: the ones that WERE created through Windows Aut. (and that had DBO as User) started to show on the forum - it worked! Problem is: 6 important tables (including the one that cointains users and the Threads one) can't be imported through Windows Aut., only by SQL Authentication (my user ID).So... what can I do??????? |
|
|
kselvia
Aged Yak Warrior
526 Posts |
Posted - 2004-06-12 : 02:49:28
|
| I am not sure I understand completly, but it appears you need to change ownership of some tables from your userid to dbo. From query analyzer, run:EXEC sp_changeobjectowner @objname='yourid.tablename', @newowner=dbofor each of the tables that you own. |
 |
|
|
pvillaca
Starting Member
2 Posts |
Posted - 2004-06-12 : 03:11:40
|
| That did the trick!!! Thanks a lot, man!!!!However, when I initially tried to change the ownership, it didn't let me, saying the dob already had a file with that name. So I tried to delete the original dbo file, but the system didn't let me, saying the file had "references", or something like that. So I renamed the file and THEN changed the ownership to dbo. It worked like a charm.Is there a problem about doing it that way? And how can I delete the original (now renamed) dbo file?Once again, thanks a lot, man. |
 |
|
|
raymondpeacock
Constraint Violating Yak Guru
367 Posts |
Posted - 2004-06-12 : 04:15:33
|
| On your original table it sounds like you implemented some Referencail Integrity such as Foreign Keys. You need to delete the referenced table first, then your main table. Also, you obviously put the references there for a reason in the first place so I'd think about applying it to your newly imported tables as well!Raymond |
 |
|
|
|
|
|
|
|