I'm creating web site on local computer. i'm using SQL Server 2005 management studio. I need to copy all data to destination server. Destination server is SQL Server 2005. My problem is
myuser.aspnet_application
myuser.aspnet_Membership ... etc. I need to create like this
dbo.aspnet_application
dbo.aspnet_Membership
How to copy stored procedures and views to destination server?
Launch MS SQL Server Management Studio in your system and go to the Object Explorer. Step 2. Right-click on the database from which you want to move data and then click on Tasks>>Generate Scripts… A Generate and Publish Scripts Wizard will appear on the screen, click on the Next button to proceed.
You can work around this in SQL Server by creating a stored procedure that accesses data in another database and signing the procedure with a certificate that exists in both databases. This gives users access to the database resources used by the procedure without granting them database access or permissions.
In SQL Server Management Studio navigate to your database.
Right click it and select "Tasks" -> "Generate Scripts"
"Next"
Select your database from the list
"Next"
Select "Stored Procedures" "Next"
"Select All" "Next"
"Script to new Query Window" "Next"
"Finish"
Give it a while. Then when complete, at the very top of the script put "use (yourdatabase)"
Execute the use statement.
Execute the whole script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With