Solved

SQL 2008

Posted on 2011-02-28
4
280 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now