5

How do I create all the ASP.Net tables, sprocs etc in a database that already has data (non conflicting) in it.

3 Answers 3

12

If you have access to the database, run the following commands in command line:

cd "C:\Windows\Microsoft.NET\Framework\v2.0.50727"
aspnet_regsql

That will start a guide that will help you add all the tables and sprocs to any table you can access from that computer.

Sign up to request clarification or add additional context in comments.

Comments

5

From an article on 4GuysFromRolla, go to the %WINDOWS%\Microsoft.NET\Framework\v2.0.50727\ directory and run

-- To use Windows Authentication (i.e., a "trusted connection"), use:

aspnet_regsql.exe -S <server> -E -d <database> -A all

-- To use SQL Server credentials (a UserID and Password), use:

aspnet_regsql.exe -S <server> -U <login id> -P <password> -d <database> -A all

There is also a wizard to help you through the steps.

1 Comment

Thanks for this. I've been banging my head against the wall with the wizard, which appears to add the functionality but the permissions weren't correct. Command line is the way forward.
2

This should help you:

http://blog.krisvandermast.com/CreateMembershipTablesInAnotherDatabaseThanTheStandardAspnetdbmdf.aspx

1 Comment

This does answer the question, but considering how easy it is it is better (for availability reasons) to actually write the answer than just posting the link. Won't vote you down though, as you did answer the question =)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.