Okay I am using one of the starter sites. I have a folder where the databases are, 2 of them aspnetdb and personal. I am not sure how to proceed. I have copied the site to my host but I am getting a database error. so here are my questions;
Even thought I have never attached the databases to SQL express, are they accually running on it? If that is the case why if I launch SQL studio do I not see them? I know these are stupid questions to most of you and I am sorry. Just trying to learn here.
I am sure your answers will lead to more questions.
ASPNET will automatically create the ASPNETDB under App_Data folder when Personalization or one of the other application services such as roles, membership or profiles are being used for the first time. Also by default, ASP.NET creates the database as
a single SQL Server Express database file that contains the database schema for all of the application services. Using the Web.config file, you can configure your application so that a separate database file is created for personalization. Further, in the
Web.config file, you can specify a SQL Server database to store the application services data instead of using the default SQL Server Express database
I get that - But how do I attach to the database once the entire site is copied to my web server? I cant seem to detach the database from VWD2008 so that I can attached it to SQL Exp and do a backup. This would allow me to send the backup to my host and
they could do a restore.
> I have copied the site to my host but I am getting a database error. so here are my question
I suggest that you read very carefully your hosters FAQ - there is usually some special procedure to follow.
Who is your hoster?
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
I get that - But how do I attach to the database once the entire site is copied to my web server? I cant seem to detach the database from VWD2008 so that I can attached it to SQL Exp and do a backup. This would allow me to send the backup to my host and they
could do a restore.
The reson you are struggling to get a specific answer is that this process depends on your hosting company. My advice would be to have a look at their technical help and see what you can find out. Generally most of the hosting companies that I have dealt
with would require a .bak file - a backup of the database which you will restore onto the SQL server. you will also require a different connection string as the database will not be held within the App_Data folder as you are used to. This process is the bane
of my life - and I'm an experienced SQL DB Admin. The variety of methods that hosts use is a problem, i try to use one host as much as possible - that way I know the process.
I would install SQL Server Management Studio Express on you PC, attach the database(s) that you need and create backups of them. Its likely that you will then be able to restore the backups to the SQL server that you have set up on the host. Although, to
save yourself any loss of time, speak to your hosts first.
I hope this helps, if it answers your question, don't forget to mark it as such for those who come afterwards.
Therein lies the problem. I do have SQL Studio installed but I can not detach ANY of my databases from VWD2008. There is a detach option but then don't detach and if I try to attach them to SQL studio anyways (thinking they really did detach) I get a ton
of permission errors.
Is there some special process that I am missing to attach them to SQL?
Nice! SQL drives me mad somethimes. We will have to work through the errors Im affraid. Firstly, make sure that the permissions on the physical folder where the mdf and ldf files are held lets do anything. Next, close VS and anything else that is connected
to the DB. open management studio and try attaching DB. Let me know the errors and i will try to help you through.
I hope this helps, if it answers your question, don't forget to mark it as such for those who come afterwards.
WayneF
Member
6 Points
30 Posts
Newbe needs some guidence
Jul 08, 2008 11:46 PM|LINK
Okay I am using one of the starter sites. I have a folder where the databases are, 2 of them aspnetdb and personal. I am not sure how to proceed. I have copied the site to my host but I am getting a database error. so here are my questions;
Even thought I have never attached the databases to SQL express, are they accually running on it? If that is the case why if I launch SQL studio do I not see them? I know these are stupid questions to most of you and I am sorry. Just trying to learn here. I am sure your answers will lead to more questions.
Thanks in Advance
Wayne
vinz
All-Star
126916 Points
17922 Posts
MVP
Re: Newbe needs some guidence
Jul 09, 2008 01:26 AM|LINK
ASPNET will automatically create the ASPNETDB under App_Data folder when Personalization or one of the other application services such as roles, membership or profiles are being used for the first time. Also by default, ASP.NET creates the database as a single SQL Server Express database file that contains the database schema for all of the application services. Using the Web.config file, you can configure your application so that a separate database file is created for personalization. Further, in the Web.config file, you can specify a SQL Server database to store the application services data instead of using the default SQL Server Express database
http://msdn.microsoft.com/en-us/library/aa478948.aspx
MessageBox Controls for WebForms | Blog | Twitter | Linkedin
WayneF
Member
6 Points
30 Posts
Re: Newbe needs some guidence
Jul 09, 2008 11:12 AM|LINK
I get that - But how do I attach to the database once the entire site is copied to my web server? I cant seem to detach the database from VWD2008 so that I can attached it to SQL Exp and do a backup. This would allow me to send the backup to my host and they could do a restore.
Sorry for being so ignorant.
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: Newbe needs some guidence
Jul 09, 2008 11:30 AM|LINK
> I have copied the site to my host but I am getting a database error. so here are my question
I suggest that you read very carefully your hosters FAQ - there is usually some special procedure to follow.
Who is your hoster?
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
WayneF
Member
6 Points
30 Posts
Re: Newbe needs some guidence
Jul 09, 2008 08:29 PM|LINK
Stormhosts
vinz
All-Star
126916 Points
17922 Posts
MVP
Re: Newbe needs some guidence
Jul 10, 2008 12:09 AM|LINK
See below for your reference
http://www.studiocoast.com.au/knowledgebase/article-6-aspnet-using-sql-server-instead-of-aspnetdbmdf.aspx
http://dotnetslackers.com/SQL/re-27019_Moving_ASPNETDB_mdf_SQL_Express_to_a_hosted_production_environment.aspx
MessageBox Controls for WebForms | Blog | Twitter | Linkedin
WayneF
Member
6 Points
30 Posts
Re: Newbe needs some guidence
Jul 14, 2008 11:01 AM|LINK
I am still way confused on exact what the steps are for detaching the database or backing it up so tha I can send it to my hosting provider.
chidge
Contributor
2886 Points
530 Posts
Re: Newbe needs some guidence
Jul 14, 2008 11:13 AM|LINK
Hi Wayne,
The reson you are struggling to get a specific answer is that this process depends on your hosting company. My advice would be to have a look at their technical help and see what you can find out. Generally most of the hosting companies that I have dealt with would require a .bak file - a backup of the database which you will restore onto the SQL server. you will also require a different connection string as the database will not be held within the App_Data folder as you are used to. This process is the bane of my life - and I'm an experienced SQL DB Admin. The variety of methods that hosts use is a problem, i try to use one host as much as possible - that way I know the process.
I would install SQL Server Management Studio Express on you PC, attach the database(s) that you need and create backups of them. Its likely that you will then be able to restore the backups to the SQL server that you have set up on the host. Although, to save yourself any loss of time, speak to your hosts first.
Regards,
Gareth Chidgey
Managing Director
PushInternet Ltd
WayneF
Member
6 Points
30 Posts
Re: Newbe needs some guidence
Jul 14, 2008 11:25 AM|LINK
Hey Gareth,
Therein lies the problem. I do have SQL Studio installed but I can not detach ANY of my databases from VWD2008. There is a detach option but then don't detach and if I try to attach them to SQL studio anyways (thinking they really did detach) I get a ton of permission errors.
Is there some special process that I am missing to attach them to SQL?
Thanks a bunch..
Wayne
chidge
Contributor
2886 Points
530 Posts
Re: Newbe needs some guidence
Jul 14, 2008 02:46 PM|LINK
Nice! SQL drives me mad somethimes. We will have to work through the errors Im affraid. Firstly, make sure that the permissions on the physical folder where the mdf and ldf files are held lets do anything. Next, close VS and anything else that is connected to the DB. open management studio and try attaching DB. Let me know the errors and i will try to help you through.
Regards,
Gareth Chidgey
Managing Director
PushInternet Ltd