Friday, December 26, 2008

Manage web sessions in database with .net 2.0

This is the utility placed in the .net framwork v2.0 folder within the windows directory.

just run the command and you will get a script to make a db and it will automatically create the required tables and procedured in it.
Just run the command and execute the sql script generated by the command on the target server.

aspnet_regsql.exe
-S servername
-U username
-P password
-ssaddd
/*just add -ssaddd parameter to tell sql that you are going to add the functionalities */
-sqlexportonly c:\sqlscript.txt
/* this will generate the script to the specified path */
-sstype p
/* in sstype paramerter specifying P will mention that you are enforcing persistant database*/

command will be like


aspnet_regsql.exe -S myserver -U username -P password -ssaddd -sqlexportonly c:\sqlscript.txt -sstype p

There are some useful articles which you must read to get some detailed knowledge.


Reference Links :
http://www.developer.com/db/article.php/10920_3595766_3
http://msdn.microsoft.com/en-us/library/ms229862(VS.80).aspx
http://msdn.microsoft.com/en-us/library/h6bb9cz9(VS.71).aspx

No comments: