You are on page 1of 2

Setting up Dotnetnuke Database for use by both DNN and SQL Server Management. ----------------------------------------------------------------------------From http://www.dotnetnuke.com/Resources/Blogs/EntryId/1202/DNN-SQLExpress-SQL-S erver-Management-Studio.

aspx ----------------------------------------------------------------------------------------------------------1) Rename the Database.mdb to another name. (This is optional). 2) Open SQL Server Management Studio and do the following ->Attach the database >Right click on the database folder and choose attach. >Click Add button and point to the database you want to attach to. >Click on the "Attach As" column and give it a more friendly name. For this blog purpose we will change it to DotNetNuke_ModDev >In the lower screen delete the line that references the ".ldf" file. T his will be created and you will get an error that it cannot be found if you do not delete it. >Click on the "Current File Path" for the ".mdf" file and update it so i t points to the location of the DNN database you are attaching to. >Click Okay and the database should be attached correctly. (If it doesn' t, Close SQL Server Management, right click it and run as administrator) ->Set up permissions >Adding Login >Click on the security\logins folder. >If the ASPNet user (Network Service in Win2003/Vista/2008/7) exist you can skip this section. >Right click login folder and choose "New Login" >Click the "Search" button, then the "Advance" button, and then the "Find Now". This will bring up a list of user on the computer and select the AS PNet account. >Make sure Windows authentication is checked and click "OK" to add u ser. ->Adding Database User >Click on "YourDatabase\Security\Users folder. >If the ASP.Net user (Network Service in Win2003/Vista/2008/7) exist you can skip this section >Right click the user folder and choose "New User" >Click on the "..." button next to the Login Name, then click on the "Browse" button. >Check the ASPNet user (Network Service in Win2003/Vista/2008/7)and click "OK" button. Click the OK button on the Select Login screen and this w ill add the user. >Under database role membership check one of the following combinati ons. Option #2 is more secure. Click "OK" button when done. >Permission Options #1 dbowner >Permission Options #2 db_datareader db_datewriter db_ddladmin db_securityadmin ->Setting Database Permissions (Only needed it Option #2 is chosen above ) >Right click on the database you attached to and choose "Properties"

>Click on "Permissions" under select a page (upper-left of screen). >Under Explicit permission for {Database Name}, make sure that the G rant box is checked for Execute. 3) Update the connection strings in the DNN web.config file. Do not forget to u se the same connection string in the <ConnectionString> and <AppSettings> sectio n. FROM Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFil ename=|DataDirectory|Database.mdf; TO Data Source=.\SQLExpress;Integrated Security=True;User Instance=False;Database=D otNetNuke_ModDev; 4) Access the DNN web site to run the installation process. You should now have a working DNN site and a SQL Express database that you can a ccess/manipulate using SQL Server Management Studio and still be able to access it from the web site as well. About The Author Shawn Mehaffie Photo Shawn Mehaffie - (United States) The author does not have a biography.

You might also like