Every1 help is highly appreciated. But the solution i discovered after many attempts is that I generate 5 different script files 1>database_roles , 2>schema, 3>stored procedures, 4>tables, 5>views through sql server 2005. Then in asp.net i write a function that accept file name to execute script , reading the file with streamreader then executing through executenonquery, i stored all 5 names in array and through for loop i executed the scripts 1 by 1 and it worked fi9. Thanks Every1.