Greetings,
I'm trying to migrate a website on shared hosting (Godaddy) from Classic ASP to ASP.Net. Having one major issue.
I have figured out that when you create roles and users in VWDE, it creates a database(aspnetdb.mdf) in the App_Data directory and that is where the informaion is stored. On my shared hosting through Godaddy, you can select "schema features" that sets up your SQL database with all the tables the same (or at least very similar) to the aspnetdb database.
I've been wading through countless posts regarding issues with Godaddy / ASP,Net. Most of the posts are guys having problems with getting a personal starter website running. The resolution involves an .sql file. The the t-SQL statements are cut and pasted into an online tool that godaddy has on their site. This then populates the database. How that file gets created I don't know.
Long story short (oops, too late for that!), how can I export my aspnetdb.mdf data into an .sql file that I can then cut and paste into godaddy's online tool?
Important point -- You cannot connect remotely to the SQL server with godaddy so that option's out.
Please advise,
Thanks
Dave.
So are you wanting to generate sql scripts to duplicate the database you have created locally on Go Daddy's server correct? If you are using enterprise manager you should be able to generate the scripts with a right click option. When I setup membership and roles for a 2.0 site I utilized a free tool I found online somewhere - this tool allowed me to connect directly to my hosting company's sql server and modifiy users directly, but like you said you can't do that with GoDaddy.When I'm in SQL Server Management Studio Exprees, I can attach to the aspnetdb file and see the little bit of data I have in there. When I right click on a table and go "Script Table as >" ! "Insert to >" | "File..." it gives me this:
INSERT INTO [C:\DOCUMENTS AND SETTINGS\COMPAQ_OWNER\MY DOCUMENTS\VISUAL STUDIO 2005\KOKOFEES\APP_DATA\ASPNETDB.MDF].[dbo].[aspnet_Users]
([ApplicationId]
,[UserId]
,[UserName]
,[LoweredUserName]
,[MobileAlias]
,[IsAnonymous]
,[LastActivityDate])
VALUES
(<ApplicationId, uniqueidentifier,>
,<UserId, uniqueidentifier,>
,<UserName, nvarchar(256),>
,<LoweredUserName, nvarchar(256),>
,<MobileAlias, nvarchar(16),>
,<IsAnonymous, bit,>
,<LastActivityDate, datetime,>)
There are 3 rows of data in this table, What am I doing wrong?
Hmm... not really sure. Have you researched the bcp utility? I'm not sure if it's included with the Express edition. Also you can google Bulk Insert and you should get some ideas. Here's a link to a solution in T-SQL that inserts data into a table from text files.
http://www.sqlteam.com/item.asp?ItemID=3207
0 comments:
Post a Comment