/*
Script created by SQL Compare version 6.2.1 from Red Gate Software Ltd at 19/06/2008 8:27:25
Run this script on SERCOBA.CODE_CATELSA_CD to make it the same as SERCOBA.CODE_DESARROLLO_v21_CD
Please back up your database before running this script
*/
SET NUMERIC_ROUNDABORT OFF
GO
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#tmpErrors')) DROP TABLE #tmpErrors
GO
CREATE TABLE #tmpErrors (Error int)
GO
SET XACT_ABORT ON
GO
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
GO
IF NOT EXISTS (SELECT * FROM master.dbo.syslogins WHERE loginname = N'Cobalto')
EXEC sp_addlogin N'Cobalto', 'p@ssw0rd'
GO
EXEC sp_grantdbaccess N'Cobalto', N'Cobalto'
GO
BEGIN TRANSACTION
GO
IF EXISTS (SELECT * FROM #tmpErrors) ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT>0 BEGIN
PRINT 'The database update succeeded'
COMMIT TRANSACTION
END
ELSE PRINT 'The database update failed'
GO
DROP TABLE #tmpErrors
GO


SELECT CONVERT(VARBINARY(32), password)
   FROM syslogins 
   WHERE name = 'Cobalto'

 
SELECT  Pwdcompare('0Cosoto8',0x01009C1B8C1DAD1099943EF2A20F4501D1CAA9E813DC299227BE2CFEE95D993AF4A2F4C0AB96808CE758C6998F65)


select pwdencrypt('0Cosoto8') 
