Red Gate forums :: View topic - dbo Schema issue
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control EAP
SQL Source Control EAP forum

dbo Schema issue

Search in SQL Source Control EAP forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
jimithing1980



Joined: 08 Mar 2010
Posts: 8

PostPosted: Mon Mar 08, 2010 11:59 pm    Post subject: dbo Schema issue Reply with quote

It looks like the Source Control system ignores certain default schemas such as dbo. The problem is, we have changed the schema a bit - we have used the following against this schema:

Code:
GRANT VIEW DEFINITION ON SCHEMA:: [dbo] TO [cy_reader]


Due to this, the dbo schema always wants to load into source control, but when you try to load it into source control, an error is thrown likely because the program explicitly ignores the dbo schema and it doesn't see any changes that need to be made (The error says "The array must contain at least one element").

I've sent the error report, but I thought I'd bring it up here since I'm sure others will encounter this soon.
Back to top
View user's profile Send private message
sherr



Joined: 19 Mar 2009
Posts: 125
Location: Cambridge

PostPosted: Tue Mar 09, 2010 12:57 pm    Post subject: dbo Schema issue - Nothing to Commit Error Reply with quote

Thanks for sending in the error report and posting this issue here.

I think you see an error like "Nothing to Commit" because the dbo schema shows up on the Commit list, but then it doesn't actually recognize this change so it thinks there is nothing to commit.

We are currently working this issue. Our internal reference number is SOC-799.

For now, please just ignore this on your commit list. If there are multiple objects to commit, it will NOT error because there will be something else to commit.

There is a manual workaround if you want to get this object off your commit list and you don't expect it to change much. (If it changes a lot, you'll have to re-do this workaround each time.)

Workaround: Manually create the schema file if you are familiar with TSVN:
1. Check out the repository to a working folder (You can right-click on the URL on the Setup Tab and copy it.)
2. In the Security\Schemas directory, create a text file and rename it to dbo.sql
3. Paste in the text from the db version diff pane on the Commit Tab (You can right-click on the diff pane Select All, right-click again and copy.)
This was:
-- Permissions

GRANT VIEW DEFINITION ON SCHEMA:: [dbo] TO [cy_reader]
GO

4. Remove the "-- Permissions" and the empty line from the top of the file
5. Save the file
6. Use TSVN to Add and Commit this change back to the repository
7. In SSMS, refresh your commit list

The dbo schema should no longer appear on the commit list.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group