Solved

SQL 2008

Posted on 2011-02-28
4
281 Views
Last Modified: 2012-05-11
I have about 200 Sp and 300 View and I ned to change the schema to dbo.
I tried to work on the Generate code but it keep give me too many errors because the Dependence. I cant sort on create date and I cant pick the first create is there any other way to generate the code for these views and SP?

Thanks
0
Comment
Question by:DBA2010
4 Comments
 
LVL 28

Expert Comment

by:strickdd
ID: 35000748
Right click on the database, select Tasks, Click "Generate Scripts"

Make sure to enable the scripting of Object Level Permissions

Click Finish and change the schema to the dbo schema and run the script for those creations.
0
 
LVL 15

Expert Comment

by:derekkromm
ID: 35000765
0
 

Author Comment

by:DBA2010
ID: 35001411
why Object Level Permission? What does that mean?
and what about Generate script for Dependent Objects? False or tru? the default is False??

Thanks
0
 
LVL 6

Accepted Solution

by:
anushahanna earned 500 total points
ID: 35003684
>>why Object Level Permission? What does that mean?
SP, Views are considered objects, so are functions, tables etc

>>and what about Generate script for Dependent Objects? False or tru? the default is False??

Say no. Otherwise, it brings in more objects than the SP, Views you want- you will have lot more CREATE Statement. In the destination database, do you have all the dependent objects, if not, say Yes, to make sure to bring together all the dependencies.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question