Red Gate forums :: View topic - Role and Schema creation out of order
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

Role and Schema creation out of order

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
brass



Joined: 08 Aug 2012
Posts: 1

PostPosted: Wed Aug 08, 2012 4:52 pm    Post subject: Role and Schema creation out of order Reply with quote

SQL Compare scripted the schema and role creation out of order. Below is a snip of the beginning of that script. I was using SQL Compare 10.1.0.102 and comparing script folder --> SQL 2008R2 database. Also, I can see that Role creation doesn't have the error check found after all the other actions... though I'm not even sure if a role can be rolled back as I havn't tested. I'm not sure where to report this so here it is:

Code:

<snip>
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
BEGIN TRANSACTION
GO
PRINT N'Creating schemata'
GO
CREATE SCHEMA [ods]
AUTHORIZATION [ods]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
PRINT N'Creating role ods'
GO
CREATE ROLE [ods]
AUTHORIZATION [dbo]
GO
PRINT N'Creating [ods].[xyz]'
GO
CREATE TABLE [ods].[xyz]</snip>
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic 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