Ten en cuenta que siempre se tiene que sacar backup de la DB antes de hacer cualquier cambio.
if exists (SELECT USERID FROM OUSR WHERE USERID != 1 AND USER_CODE = 'manager')
begin
delete from OUSR
where USER_CODE = 'manager'
END
IF NOT EXISTS (SELECT USERID FROM OUSR WHERE USERID = 1)
BEGIN
Update [dbo].[OUSR] set USERID = 1, INTERNAL_K = 1
where userid in (select top 1 userid from [dbo].[OUSR])
END
UPDATE [dbo].[OUSR] SET USER_CODE = 'manager' WHERE USERID = 1
update OUSR set
password = 'C3D43548E2D0D0E09BED6C47F69C6ADBE4BF9AB1'
,groups = '0'
,superuser = 'Y'
,Locked = 'N'
where user_code = 'manager'
Estos SQL hace que defina como contraseña inicial manager/manager
Ten en cuenta que estas modificaciones son iregulares, y podrias perder el soporte con SAP