Script is not executed, and no error

gfouetgfouet Posts: 3
edited October 21, 2011 7:04AM in SQL Packager Previous Versions
Hello,

I need urgent help with SQL Packager.

I packaged a script (which works perfectly when I run it manually). But when I start the .EXE, packager do its work, says everything is fine, but nothing changed in my database.

Here is the script :
DECLARE @DB NVARCHAR(4000);
DECLARE @SQL NVARCHAR(4000);

SET @DB = DB_NAME();

IF ( EXISTS (SELECT * FROM sys.server_principals WHERE name = N'tlmcom') )
	SET @SQL = 'ALTER LOGIN ';
ELSE
	SET @SQL = 'CREATE LOGIN ';

SET @SQL = @SQL + '[tlmcom] WITH PASSWORD=N''1234'', DEFAULT_DATABASE=[' + @DB + ']' +
			      ', DEFAULT_LANGUAGE=[French], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF';
EXECUTE(@SQL);
GO

EXEC dbo.sp_changedbowner @loginame = N'tlmcom', @map = false
GO

The command line :
SQLcreateuser.exe /server:localhost,3169 /database:tlmcom_VxRx /username:SA /password:4321 /makeupgrade

Is it a bug in Packager ? Or what am I doing wrong ?
Thanks.

Comments

Sign In or Register to comment.