hola a todos, tengo una consulta que no he podido solventar,
Olvide la clave del usuario manager y mas nadie la tiene por lo que debo cambiarla pero no puedo por el aplicativo, si alguien sabe de algun query que me permita por sql cambiarla se lo agradeceria, un compañero me dio uno pero me da el siguiente error Msg 208, Level 16, State 1, Line 2 Invalid object name ‘OUSR’
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
-- Generic Manager Query for 9.0 and higher
--update OUSR set password = 'C3D43548E2D0D0E09BED6C47F69C6ADBE4BF9AB1', groups = '0', superuser = 'Y', Locked = 'N' where user_code = 'manager'
--update OUSR set password = 'E362C4E2529C756FE51645701C5D10EF15928E6F', groups = '0', superuser = 'Y', Locked = 'N' where user_code = 'manager'
update OUSR set password = 'E362C4E2529C756FE51645701C5D10EF15928E6F', groups = '0', superuser = 'Y', Locked = 'N' , STData='' where user_code = 'manager'
-- run this update so that you don't get the Create Password form when logging on
UPDATE OUSR SET OneLogPwd = 'N' WHERE USER_CODE='manager'
IF EXISTS (SELECT tc.[name] FROM SysColumns tc INNER JOIN SysObjects tso ON tc.id = tso.id WHERE tso.[name] = 'OUSR' AND tc.[name] = 'PwdNeverEx')
Begin
exec('UPDATE OUSR SET PwdNeverEx = ''Y'' WHERE USER_CODE=''manager''')
End
-- Reset Authorization
-- get ALLOWENCES’s character length of current bo version
Declare @loopCount int
SET @loopCount = (
SELECT Top 1 len(cast(ALLOWENCES as varchar(MAX))) as countOfChars
from dbo.OUSR
order by countOfChars desc)
-- encode full authorization
DECLARE @userid int
SET @userid= '1';
IF EXISTS (SELECT tc.[name] FROM SysColumns tc INNER JOIN SysObjects tso ON tc.id = tso.id
WHERE tso.[name] = 'OUSR' AND tc.[name] = 'ALLOWENCES')
BEGIN
DECLARE @auth nvarchar(max)
SET @auth = '';
DECLARE @i int
SET @i = 0
WHILE @i < @loopCount BEGIN
SET @i = @i + 1;
SET @auth = @auth + char(1);
END
-- grand manager with full authorization
Update dbo.OUSR
SET ALLOWENCES = @auth
WHERE USERID = @userid;
Update dbo.usr3
SET permission='F'
WHERE userlink=@userid
END
esto seria para Resetear la Pass de manager, quedaria como al inicio, manager / manager
solo que me advirtio mi companero que despues de que el lo corrio la base le mostraba unos errores, aun que no veo que le peque a otras tablas.