How do I rename the ClubDB database?

Topics: Help
Jun 14, 2007 at 6:57 PM
Edited Jun 14, 2007 at 7:00 PM
I have a problem with renaming my clubDB. My hoster message from their attachment tool indicates that there is already a database name with that name and indictes to try again. I tried to rename the database then it would not run I had to rename it back to the old name for it to work. How can I rename the database so that I don't have to jump through hoops with my hoster.
Jun 14, 2007 at 7:22 PM
Edited Jun 14, 2007 at 7:24 PM

dbarselow wrote:
I have a problem with renaming my clubDB. My hoster message from their attachment tool indicates that there is already a database name with that name and indictes to try again. I tried to rename the database then it would not run I had to rename it back to the old name for it to work. How can I rename the database so that I don't have to jump through hoops with my hoster.



BY now I learned that it is not a practicle to change the name of the database file. I have seen a dicussion about creating a empty database in the contro panel of my hoster and then backing it up then usin the CP attachment to load the .bak file I am going to try this method wish me luck. Actually the learning curve for the control panel is incredibly hard.
Coordinator
Jun 14, 2007 at 7:58 PM
Who is your hoster?

Whoever it is, they probably shouldn't allow SQLExpress databases attached the way the kit comes.

Tell me, what version of Visual Studio are you using (ie: Express, Standard, Professional, Team Suite). Then tell me if you have SQL Management Express installed.

I should probably write something about how to get a db up to a hoster. Maybe for v3.
Jun 14, 2007 at 9:40 PM

z2bass wrote:
Who is your hoster?

Whoever it is, they probably shouldn't allow SQLExpress databases attached the way the kit comes.

Tell me, what version of Visual Studio are you using (ie: Express, Standard, Professional, Team Suite). Then tell me if you have SQL Management Express installed.

I should probably write something about how to get a db up to a hoster. Maybe for v3.


I am using vs 2005 standard I don't think they are using they are using 2000 and 2005
Coordinator
Jun 21, 2007 at 5:06 AM
They probably won't allow SQLExpress databases... its a security hazard of some sort (I don't know the details on that). Look at their docs and see what they say.
Jun 21, 2007 at 6:12 PM
SQLExpress databases shouldn't be allowed by a hoster. The problem with SQLExpress databases is everyone thinks they are like Access databases, just a file based database. What happens with an Express db, when you first try to hit it, it is attached to by SQL Server. And it will remain attached until someone detaches it.

The problem that you ran into is someone previous to you that is on the same web server used the database file as it comes out of the box. Then you try and get yours to work, but SQL Server Express cannot attach it, because the previous person has theirs attached, and SQL Server Express will not allow duplicate names.

If you still want to use SQL Server Express, rename the database file and fix the portions of web.config that say the old name.

I haven't looked into the security parts yet, but theoretically you can access the attached db that the previous user has attached.