Modify Script to Create User Role on Single Database.

Hi All,
Below is the script to create user role on database. Here problem is when I execute this script, it creates user role for all database within an instance and I want it to create user role only on 2 database say TEST1 and TEST2
Can anyone help me to modify the script? 
--===================================================================================
-- Description
-- Database Type: MSSQL
-- This script creates a role called 'gdmmonitor' for ALL databases.
-- It grants some system catalogs to this role to allow Classification and Assessment on the database.
-- It then adds a user called "sqlguard" to all databases and grants this user gdmmonitor role.
-- before runnign this script
--  you MUST CREATE A SQL LOGIN CALLED 'sqlguard'
--  This sqlguard login doesn't need to be added to any database or given
--  any privilege.  The script will take care of that.
--  Note:
--   If you wish to use a different login name (instead of 'sqlguard') you need to change
--   the value of the variable '@Guardium_user' in the script below; 
--   (Look for the string: "set @Guardium_user = 'sqlguard'" and replace the 'sqlguard')
-- after runnign this script
-- Nothing to do, the script already creates the db user
-- User/Password to use
-- User: sqlguard (or any other name, if changed)
-- Pass: user defined
-- Role: gdmmonitor
--===================================================================================
PRINT '>>>==================================================================>>>'
PRINT '>>> Creating role: "gdmmonitor" at the server level.'
PRINT '>>>==================================================================>>>'
-- Change to the master database
USE master
-- *** If a different login name is desired, define it here. ***
DECLARE @Guardium_user AS varchar(50)
set @Guardium_user = 'sqlguard'
DECLARE @dbName AS varchar(256)
DECLARE @memberName AS varchar(256)
DECLARE @dbVer AS nvarchar(128)
SET     @dbVer = CAST(serverproperty('ProductVersion') AS nvarchar)
SET     @dbVer = SUBSTRING(@dbVer, 1, CHARINDEX('.', @dbVer) - 1)
IF (@dbVer = '8') SET @dbVer = '2000'
ELSE IF (@dbVer = '9')  SET @dbVer = '2005'
ELSE IF (@dbVer = '10')  SET @dbVer = '2008'
ELSE IF (@dbVer = '11')  SET @dbVer = '2012'
ELSE SET @dbVer = '''Unsupported Version'''
IF (@dbVer != '2000')
BEGIN
  -- This privilege is required to peform a specific MSSQL test.
  -- Test name: SQL OLEDB disabled (DisallowAdhocAccess registry key) 
  -- Procedure execute: EXEC master.dbo.sp_MSset_oledb_prop 
  -- Purpose: To display provider property, not changing anything.
  PRINT '==> Granting MSSSQL 2005 and above setupadmin server role'
  EXEC master..sp_addsrvrolemember @loginame = @Guardium_user, @rolename = N'setupadmin'
END
SELECT  @dbName = DB_NAME()
PRINT '==> Starting MSSql ' + @dbVer + ' role creation on database: ' + @dbName
-- find any members of the role if they exist
CREATE TABLE #rolemember (membername VARCHAR(256) NOT NULL)
INSERT INTO #rolemember
SELECT DISTINCT usr.name FROM dbo.sysusers usr, .dbo.sysmembers mbr
WHERE usr.uid = mbr.memberuid
AND mbr.groupuid = (SELECT uid FROM .dbo.sysusers WHERE name = 'gdmmonitor')
--  Drop the Role Members If they exist
IF EXISTS (SELECT count(*) FROM #rolemember)
BEGIN
  PRINT '==> Dropping the gdmmonitor role members on: ' + @dbName
  DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember
  OPEN DropCursor
  FETCH DropCursor INTO @memberName
  WHILE @@Fetch_Status = 0
   BEGIN
    PRINT '==> Dropping member: ''' + @memberName + ''''
    exec('EXEC sp_droprolemember ''gdmmonitor'', ''' + @memberName + ''' ;')
    FETCH DropCursor INTO @memberName
   END
  CLOSE DropCursor
  DEALLOCATE DropCursor
END
-- drop the role if it exists
IF EXISTS (SELECT 1 FROM .dbo.sysusers WHERE name = 'gdmmonitor')
BEGIN
  PRINT '==> Dropping the role gdmmonitor on: ' + @dbName
  exec sp_droprole 'gdmmonitor'
END
-- Create the role
PRINT '==> Creating the role gdmmonitor on: ' + @dbName
exec sp_addrole 'gdmmonitor'
-- Grant select privileges to the role for MSSql Common
PRINT '==> Granting common SELECT privileges on: ' + @dbName
GRANT SELECT ON dbo.spt_values     TO gdmmonitor
GRANT SELECT ON dbo.sysmembers     TO gdmmonitor
GRANT SELECT ON dbo.sysobjects     TO gdmmonitor
GRANT SELECT ON dbo.sysprotects    TO gdmmonitor
GRANT SELECT ON dbo.sysusers       TO gdmmonitor
GRANT SELECT ON dbo.sysconfigures  TO gdmmonitor
GRANT SELECT ON dbo.sysdatabases   TO gdmmonitor
GRANT SELECT ON dbo.sysfiles       TO gdmmonitor
GRANT SELECT ON dbo.syslogins      TO gdmmonitor
GRANT SELECT ON dbo.syspermissions TO gdmmonitor
-- Grant execute privileges to the role for MSSql Common
PRINT '==> Granting common EXECUTE privileges on: ' + @dbName
GRANT EXECUTE ON sp_helpdbfixedrole    TO gdmmonitor
GRANT EXECUTE ON sp_helprotect         TO gdmmonitor
GRANT EXECUTE ON sp_helprolemember     TO gdmmonitor
GRANT EXECUTE ON sp_helpsrvrolemember  TO gdmmonitor
GRANT EXECUTE ON sp_tables             TO gdmmonitor
GRANT EXECUTE ON sp_validatelogins     TO gdmmonitor
GRANT EXECUTE ON sp_server_info       TO gdmmonitor
-- Check if the version is 2005 or greater
IF (@dbVer != '2000')
BEGIN
  -- Grant select privileges to the role for MSSql 2005 and above
  PRINT '==> Granting MSSql 2005 and above SELECT privileges on: ' + @dbName
  GRANT SELECT ON sys.all_objects           TO gdmmonitor
  GRANT SELECT ON sys.database_permissions  TO gdmmonitor
  GRANT SELECT ON sys.database_principals   TO gdmmonitor
  GRANT SELECT ON sys.sql_logins            TO gdmmonitor
  GRANT SELECT ON sys.sysfiles              TO gdmmonitor
  GRANT SELECT ON sys.database_role_members TO gdmmonitor 
  GRANT SELECT ON sys.server_role_members   TO gdmmonitor 
  GRANT SELECT ON sys.configurations        TO gdmmonitor
  GRANT SELECT ON sys.master_key_passwords  TO gdmmonitor
  GRANT SELECT ON sys.server_principals     TO gdmmonitor
  GRANT SELECT ON sys.server_permissions    TO gdmmonitor
  GRANT SELECT ON sys.credentials    
   TO gdmmonitor
  --This is called by master.dbo.sp_MSset_oledb_prop.  
  --By defautl it should have already been granted to public. 
  GRANT EXECUTE ON sys.xp_instance_regread TO GDMMONITOR
  GRANT EXECUTE ON sys.sp_MSset_oledb_prop TO GDMMONITOR 
END
-- Re-add the dropped members
IF EXISTS (SELECT 1 FROM #rolemember)
BEGIN
  PRINT '==> Re-adding the role members on: ' + @dbName
  DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember
  OPEN DropCursor
  FETCH DropCursor INTO @memberName
  WHILE @@Fetch_Status = 0
    BEGIN
     PRINT '==> Re-adding member: ''' + @memberName + ''''
     exec('EXEC sp_addrolemember ''gdmmonitor'', ''' + @memberName + ''' ;')
     FETCH DropCursor INTO @memberName
    END
  CLOSE DropCursor
  DEALLOCATE DropCursor
END
-- END of role creation on database
PRINT '==> END of role creation on: ' + @dbName
PRINT ''
-- Change to the msdb database
USE msdb
set @memberName = ''
SELECT  @dbName = DB_NAME()
PRINT '==> Starting MSSql ' + @dbVer + ' role creation on database: ' + @dbName
-- find any members of the role if it exists
TRUNCATE TABLE #rolemember
INSERT INTO #rolemember
SELECT DISTINCT usr.name FROM .dbo.sysusers usr, .dbo.sysmembers mbr
WHERE usr.uid = mbr.memberuid
AND groupuid = (SELECT uid FROM .dbo.sysusers WHERE name = 'gdmmonitor')
--  Drop the Role Members If they exist
IF EXISTS (SELECT count(*) FROM #rolemember)
BEGIN
  PRINT '==> Dropping the gdmmonitor role members on: ' + @dbName
  DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember
  OPEN DropCursor
  FETCH DropCursor INTO @memberName
  WHILE @@Fetch_Status = 0
   BEGIN
    PRINT '==> Dropping member: ''' + @memberName + ''''
    exec('EXEC sp_droprolemember ''gdmmonitor'', ''' + @memberName + ''' ;')
    FETCH DropCursor INTO @memberName
   END
  CLOSE DropCursor
  DEALLOCATE DropCursor
END
-- drop the role if it exists
IF EXISTS (SELECT 1 FROM .dbo.sysusers WHERE name = 'gdmmonitor')
BEGIN
  PRINT '==> Dropping the gdmmonitor role on: ' + @dbName
  exec sp_droprole 'gdmmonitor'
END
-- Create the role
PRINT '==> Creating the gdmmonitor role on: ' + @dbName
exec sp_addrole 'gdmmonitor'
-- Grant select privileges to the role for MSSql Common
PRINT '==> Granting common SELECT privileges on: ' + @dbName
GRANT SELECT ON dbo.sysobjects     TO gdmmonitor
GRANT SELECT ON dbo.sysusers       TO gdmmonitor
GRANT SELECT ON dbo.sysprotects    TO gdmmonitor
GRANT SELECT ON dbo.sysmembers     TO gdmmonitor
GRANT SELECT ON dbo.sysfiles       TO gdmmonitor
GRANT SELECT ON dbo.syspermissions TO gdmmonitor
GRANT SELECT ON dbo.backupset   TO gdmmonitor
-- Check if the version is 2005 or greater
IF (@dbVer != '2000')
BEGIN
  -- Grant select privileges to the role for MSSql 2005 and above
  PRINT '==> Granting MSSql 2005 and above SELECT privileges on: ' + @dbName
  GRANT SELECT ON sys.all_objects TO gdmmonitor
  GRANT SELECT ON sys.database_permissions TO gdmmonitor
  GRANT SELECT ON sys.database_principals TO gdmmonitor
  GRANT SELECT ON sys.sysfiles TO gdmmonitor
  -- Grant execute privileges to the role for MSSql 2005 or above
  PRINT '==> Granting MSSql 2005 and above EXECUTE privileges on: ' + @dbName
  GRANT EXECUTE ON msdb.dbo.sp_enum_login_for_proxy TO gdmmonitor
  GRANT SELECT ON sys.database_role_members  TO gdmmonitor
END
IF (@dbVer > '2000' and @dbVer < '2012') 
--This sp is not available in SQL 2012
BEGIN
  GRANT EXECUTE ON sp_get_dtspackage TO gdmmonitor
END
-- Re-add the dropped members
IF EXISTS (SELECT count(*) FROM #rolemember)
BEGIN
  PRINT '==> Re-adding the gdmmonitor role members on: ' + @dbName
  DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember
  OPEN DropCursor
  FETCH DropCursor INTO @memberName
  WHILE @@Fetch_Status = 0
    BEGIN
     PRINT '==> Re-adding member: ''' + @memberName + ''''
     exec('EXEC sp_addrolemember ''gdmmonitor'', ''' + @memberName + ''' ;')
     FETCH DropCursor INTO @memberName
    END
  CLOSE DropCursor
  DEALLOCATE DropCursor
END
-- drop the temporary table
DROP TABLE #rolemember
-- END of role creation on database
PRINT '==> END of gdmmonitor role creation on: ' + @dbName
-- Role creation complete
PRINT '<<<==================================================================<<<'
PRINT '<<< END of creating role: "gdmmonitor" at the server level.'
PRINT '<<<==================================================================<<<'
PRINT ''
PRINT '>>>==================================================================>>>'
PRINT '>>> Starting application database role creation'
PRINT '>>>==================================================================>>>'
use master
DECLARE @databaseName AS varchar(80)
DECLARE @executeString AS varchar(7950)
DECLARE @dbcounter as int   
set @dbcounter = 0
DECLARE DatabaseCursor CURSOR FOR SELECT name from sysdatabases where name not in ('master', 'msdb')
and not (status & 1024 > 1)
--read only
and not (status & 4096 > 1)
--single user
and not (status & 512 > 1)
--offline
and not (status & 32 > 1)
--loading
and not (status & 64 > 1)
--pre recovery
and not (status & 128 > 1)
--recovering
and not (status & 256 > 1)
--not recovered
and not (status & 32768 > 1)
--emergency mode
OPEN DatabaseCursor
FETCH DatabaseCursor INTO @databaseName
WHILE @@Fetch_Status = 0
BEGIN
set @dbcounter = @dbcounter + 1     
set @databaseName = '"' + @databaseName + '"'  
set @executeString = ''
set @executeString = 'use ' + @databaseName + ' ' +
         'PRINT ''>>>==================================================================>>>'' ' +
         'PRINT ''>>> Starting MSSql ' + @dbVer + ' role creation on database: ' + @databaseName + ''' ' +
         'PRINT ''>>>==================================================================>>>'' ' +
       '/* Variable @memberNameDBname must be declare within the string or else it will fail */ ' +
       'DECLARE @memberName' + cast(@dbcounter as varchar(5)) + ' as varchar(50) ' +
       '/*find any members of the role if it exists*/ ' +
         'CREATE TABLE #rolemember (membername VARCHAR(256) NOT NULL) ' +
         'INSERT INTO #rolemember ' +
         'SELECT DISTINCT usr.name FROM dbo.sysusers usr, dbo.sysmembers mbr ' +
         'WHERE usr.uid = mbr.memberuid ' +
         'AND groupuid = (SELECT uid FROM dbo.sysusers WHERE name = ''gdmmonitor'') ' +
         '/*Drop the Role Members If they exist*/ ' +
         'IF EXISTS (SELECT * FROM #rolemember) ' +
         'BEGIN ' +
           'PRINT ''==> Dropping the role members on: ' + @databaseName + ''' ' +
           'DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember ' +
           'OPEN DropCursor ' +
           'FETCH DropCursor INTO @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
           'WHILE @@Fetch_Status = 0 ' +
             'BEGIN ' +
             'PRINT ''==> Dropping member: '' + @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
             'exec(''EXEC sp_droprolemember ''''gdmmonitor'''', '''''' + @memberName' + cast(@dbcounter as varchar(5))  + ' + '''''';'') ' +
             'FETCH DropCursor INTO @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
             'END ' +
           'CLOSE DropCursor ' +
           'DEALLOCATE DropCursor ' +
         'END ' +
         '/*drop the role if it exists*/ ' +
         'IF EXISTS (SELECT 1 FROM .dbo.sysusers WHERE name = ''gdmmonitor'') ' +
         'BEGIN ' +
           'PRINT ''==> Dropping the gdmmonitor role on: ' + @databaseName + ''' ' +
           'exec sp_droprole ''gdmmonitor'' ' +
         'END ' +
         '/* Create the role */ ' +
         'PRINT ''==> Creating the gdmmonitor role on: ' + @databaseName + ''' ' +
         'exec sp_addrole ''gdmmonitor'' ' +
         '/* Grant select privileges to the role for MSSql Common */ ' +
         'PRINT ''==> Granting common SELECT privileges on: ' + @databaseName + ''' ' +
         'GRANT SELECT ON dbo.sysmembers     TO gdmmonitor ' +
         'GRANT SELECT ON dbo.sysobjects     TO gdmmonitor ' +
         'GRANT SELECT ON dbo.sysprotects    TO gdmmonitor ' +
         'GRANT SELECT ON dbo.sysusers       TO gdmmonitor ' +
         'GRANT SELECT ON dbo.sysfiles       TO gdmmonitor ' +
               'GRANT SELECT ON dbo.syspermissions TO gdmmonitor ' +
         '/* Check if the version is 2005 or greater */ ' +
         'IF (' + @dbVer + ' != ''2000'') ' +
         'BEGIN ' +
           '/* Grant select privileges to the role for MSSql 2005 and above */ ' +
           'PRINT ''==> Granting MSSql 2005 and above SELECT privileges on: ' + @databaseName + ''' ' +
           'GRANT SELECT ON sys.database_permissions TO gdmmonitor ' +
           'GRANT SELECT ON sys.all_objects          TO gdmmonitor ' +
           'GRANT SELECT ON sys.database_principals  TO gdmmonitor ' +
           'GRANT SELECT ON sys.sysfiles      TO gdmmonitor ' +          
           'GRANT SELECT ON sys.database_role_members  TO gdmmonitor ' +           
         'END ' +
         '/* Re-add the dropped members */ ' +
         'IF EXISTS (SELECT 1 FROM #rolemember) ' +
         'BEGIN ' +
           'PRINT ''==> Re-adding the gdmmonitor role members on: ' + @databaseName + ''' ' +
           'DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember ' +
           'OPEN DropCursor ' +
           'FETCH DropCursor INTO @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
           'WHILE @@Fetch_Status = 0 ' +
             'BEGIN ' +
               'PRINT ''==> Re-adding member: '' + @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
               'exec(''EXEC sp_addrolemember ''''gdmmonitor'''', '''''' + @memberName' + cast(@dbcounter as varchar(5))  + ' + '''''';'') ' +
               'FETCH DropCursor INTO @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
             'END ' +
           'CLOSE DropCursor ' +
           'DEALLOCATE DropCursor ' +
         'END ' +
         '/* drop the temporary table */ ' +
         'DROP TABLE #rolemember ' +
         'PRINT ''<<<==================================================================<<<'' ' +
         'PRINT ''<<< END of role creation on: ' + @databaseName + ''' ' +
         'PRINT ''<<<==================================================================<<<'' ' +
         'PRINT '' ''' +
         'PRINT '' '''
execute (@executeString)
FETCH DatabaseCursor INTO @databaseName
END
CLOSE DatabaseCursor
DEALLOCATE DatabaseCursor
--  Adding user to all the databases
--  and grant gdmmonitor role, only if login exists.
PRINT '>>>==================================================================>>>'
PRINT '>>> Add and Grant gdmmonitor role to: ''' + @Guardium_user + ''''
PRINT '>>> on all databases.'
PRINT '>>>==================================================================>>>'
USE master
/* Check if @Guardium_user is a login exist, if not do nothing.*/
IF NOT EXISTS (select * from syslogins where name = @Guardium_user)
BEGIN
  PRINT ''
  PRINT '************************************************************************'
  PRINT '*** ERROR: Could not find the login: ''' + @Guardium_user + ''''
  PRINT '***        Please add the login and re-run this script.'
  PRINT '************************************************************************'
  PRINT ''
END
ELSE
BEGIN
  DECLARE @counter AS smallint
  set @counter = 0
  --  This loop runs 4 time just to make sure that the @Guardium_user gets added to all db.
  --  99% of the time, this is totally unnecessary.  But in some rare case on SQL 2005
  --  the loop skips some databases when it tried to add the @Guardium_user.
  --  After two to three executions, the user is added in all the dbs.
  --  Might be a SQL Server bug.
  WHILE @counter <= 3
  BEGIN
  set @counter = @counter + 1
    set @databaseName = ''
    set @executeString = ''
    DECLARE DatabaseCursor CURSOR FOR SELECT name from sysdatabases
    where not (status & 1024 > 1)
--read only
    and not (status & 4096 > 1)
--single user
    and not (status & 512 > 1)
--offline
    and not (status & 32 > 1)
--loading
    and not (status & 64 > 1)
--pre recovery
    and not (status & 128 > 1)
--recovering
    and not (status & 256 > 1)
--not recovered
and not (status & 32768 > 1)
--emergency mode    
    OPEN DatabaseCursor
    FETCH DatabaseCursor INTO @databaseName
    WHILE @@Fetch_Status = 0
    BEGIN
    set @databaseName = '"' + @databaseName + '"' 
    set @executeString = ''
    set @executeString = 'use ' + @databaseName + ' ' +
             '/*Check if the login already has access to this database */ ' +
             'IF EXISTS (select * from sysusers where name = ''' + @Guardium_user + ''' and islogin = 1) ' +
             'BEGIN ' +
              '/*Check if login already have gdmmonitor role*/ ' +
              'IF NOT EXISTS (SELECT usr.name FROM dbo.sysusers usr, dbo.sysmembers mbr WHERE usr.uid = mbr.memberuid ' +
            'AND mbr.groupuid = (SELECT uid FROM dbo.sysusers WHERE name = ''gdmmonitor'') ' +
            'AND usr.name = ''' + @Guardium_user + ''') ' +
              'BEGIN ' +
              'PRINT ''==> Granting gdmmonitor role to ' + @Guardium_user + ' on database ' + @databaseName + ''' ' +
              'execute sp_addrolemember ''gdmmonitor''' + ', [' + @Guardium_user + '] ' +
              'PRINT '' ''' +
              'END ' +
             'END ' +
             'IF NOT EXISTS (select * from sysusers where name = ''' + @Guardium_user + ''' and islogin = 1) ' +
             'BEGIN ' +
             'PRINT ''==> Adding user [' + @Guardium_user + '] to database: ' + @databaseName + ''' ' +
             'execute sp_adduser [' + @Guardium_user + '] ' +
             'PRINT ''==> Granting gdmmonitor role to ' + @Guardium_user + ' on database '  + @databaseName + ''' ' +
             'execute sp_addrolemember ''gdmmonitor''' + ', [' + @Guardium_user + '] ' +
             'PRINT '' ''' +
             'END '
    execute (@executeString)
    FETCH DatabaseCursor INTO @databaseName
    END
    CLOSE DatabaseCursor
    DEALLOCATE DatabaseCursor
  END   -- end while
  -- Required for Version 2005 or greater.
  IF (@dbVer != '2000')
  BEGIN
    -- Grant system privileges to the @guardium_user.  This is a requirement for >= SQL 2005
    -- or else some system catalogs will filter our result from assessment test.
    -- This will show up in sys.server_permissions view.
    PRINT '==> Granting catalog privileges to: ''' + @Guardium_user + ''''
    execute ('grant VIEW ANY DATABASE to [' + @Guardium_user + ']' )
    execute ('grant VIEW ANY DEFINITION to [' + @Guardium_user + ']' )
  END
  PRINT '<<<==================================================================<<<'
  PRINT '<<< Finished Adding and Granting gdmmonitor role to: ''' + @Guardium_user + ''''
  PRINT '<<< on all databases.'
  PRINT '<<<==================================================================<<<'
  PRINT ''
END
GO

Thanks a lot Sir... it worked.
Can you also help me in troubleshooting below issue?
This script is working fine on all databases except one MS SQL 2005 database. build of this database is 9.00.3042.00
SA account with highest privileges is been used for script execution. errors received are as follow:
>>>==================================================================>>>
>>> Creating role: "gdmmonitor" at the server level.
>>>==================================================================>>>
==> Granting MSSSQL 2005 and above setupadmin server role
==> Starting MSSql 2005 role creation on database: master
(0 row(s) affected)
==> Dropping the gdmmonitor role members on: master
==> Creating the role gdmmonitor on: master
Msg 15002, Level 16, State 1, Procedure sp_addrole, Line 16
The procedure 'sys.sp_addrole' cannot be executed within a transaction.
==> Granting common SELECT privileges on: master
Msg 15151, Level 16, State 1, Line 117
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 118
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 119
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 120
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 121
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 122
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 123
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 124
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 125
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 126
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
==> Granting common EXECUTE privileges on: master
Msg 15151, Level 16, State 1, Line 130
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 131
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 132
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 133
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 134
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 135
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 136
Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.

Similar Messages

  • How to create Users/Roles for ldap in weblogic without using admin console

    Is it possible to create Users/Roles for ldap in weblogic without using admin console? if possible what are the files i need to modify in DefaultDomain?
    or is there any ant script for creating USers/Roles?
    Regards,
    Raghu.
    Edited by: user9942600 on Jul 2, 2009 1:00 AM
    Edited by: user9942600 on Jul 2, 2009 1:58 AM

    Hi..
    You can use wlst or jmx to perform all security config etc.. same as if it were perfomred from the admin console..
    .e.g. wlst create user
    ..after connecting to admin server
    serverConfig()
    cd("/SecurityConfiguration/your_domain_name/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator")
    cmo.createUser("userName","Password","UserDesc")
    ..for adding/configuring a role
    cd("/SecurityConfiguration/your_domain_name/Realms/myrealm/RoleMappers/XACMLRoleMapper")
    cmo.createRole('','roleName', 'userName')
    ...see the mbean docs for all the different attributes, operations etc..
    ..Mark.

  • Script to create user in OBIEE 10g

    In OBIEE 10g, is it possible to use a script to create users automatically.
    I need this option to import user from the LDAP because if the LDAP are not created in OBI adminsitration tool, they can´t enter in analyticas (BI Server error)

    I suggest you to read
    Oracle9i Database Performance Tuning Guide and Reference
    Release 2 (9.2)
    Part Number A96533-02
    Chapter 7. Using Plan Stability
    ~ Madrid

  • Script to create user OUTLN in 9i

    Hi,
    Note 240478.1 "Script to create user OUTLN in 9i"
    This script create OUTLN user.
    And then should we :
    " issue grants, create tables and indexes."
    The qustion is :
    should we issue grants, create tables and indexes after executing the script ? Then
    create which tables , which indexes ? Does the script it-self do not this
    Many thanks before.

    I suggest you to read
    Oracle9i Database Performance Tuning Guide and Reference
    Release 2 (9.2)
    Part Number A96533-02
    Chapter 7. Using Plan Stability
    ~ Madrid

  • Create user role

    I would like to know if is possible to create user role on the CodldFusion server.
    Your help iand information is great appreciated,
    Regards,
    iccsi,

    See http://forums.adobe.com/message/4907241#4907241

  • Create users , roles, link roles to users

    Hi Experts,
    how do we create users , roles and link roles to users in oracle discoverer?
    If they are the users created in the oracle database, how is discoverer access given to them? EUL5_EUL_USERS has the list of the users and roles for discoverer.
    thanks.

    Hi User,
    Below is the document link step by step process how to give access to end-users here is the topic Viewer and Plus Access with E-Business Suite
    http://ascbi.com/thirdparty_documents.htm_
    Hope it helps you.promptly award points here is the link http://forums.oracle.com/forums/ann.jspa?annID=939
    By,
    KK

  • 9i export file into 11GR2 - import full db or create users, roles.. first?

    I'm moving several 9iR2 databases onto new hardware with 11GR2 64bit.
    One of them has only a couple of users, roles etc. so I pre-create all the tablespaces, users, etc. then import with 11G imp utility using fromuser=user1,user2 etc. in the parfile.
    Another has an application front end that creates a database user for all the application users, and assigns certain roles etc. So I have dozens of users on this database, along with various roles as well. I'm wondering what the best way to approach this one is, so I'm thinking:
    Do I do a import full=y, and let the import create all the users roles etc. ? *I already pre-created all the tablespaces when I created the empty database with DBCA
    Do I generate the ddl for all the users and roles, run it on the new db first, then import with fromuser=user1,user2..?
    Do I import full=y for trial run, then when ready to import final production data, drop users that have data with cascade option, recreate these users and import their schemas only?
    Keep in mind that I am doing several "rehearsals" on this, importing from full exp files on the current production database, for users to test the app against and also to debug my import commands,scripts etc. so this will be a one command process when I am ready to do the final import.
    I'm asking all of this because I'm wondering if its just ok to do full=y when upgrading, (I usually don't)
    I'm assuming all the system etc. tables in the 11G are just left alone when ignore=y parameter is used.

    I tried importing the full database from the 11G gui's import from export files option, but it kept failing, so I imported just the schema's I wanted. That worked ok, and all the database users accounts and roles were also imported, not sure how that happened or if it was when I attempted the full import. In any case I got the database schemas I wanted over, but noticed a lot of invalid views that would not compile, so a further check showed that none of the applications public synonyms came over. Running a simple create script on dba_synonyms on the prod database fixed that and its all good now, but I'm wondering why the synonyms never came across with the import?

  • Script for create user

    Hi,
    I have the following script :
    CREATE USER USER
    IDENTIFIED BY pwd
    DEFAULT TABLESPACE TABLES
    TEMPORARY TABLESPACE TEMP
    PROFILE DEFAULT
    ACCOUNT UNLOCK;
    How can I modify it in order to execute with a parameter (username) , like this :
    SQL>@myscript username
    Many thanks.

    Please read the sqlplus user's guide. It is a must I think.
    http://download.oracle.com/docs/cd/B10501_01/server.920/a90842/ch6.htm#1006806

  • GoldenGate replication of creating users, roles

    System Specs:
    O/S : RHEL 5 (Tikanga)
    RDBMS: 11.2.0.3 (Standalone, ASM, Archivelog)
    GoldenGate v:11.1.1.0 (getting ready to upgrade to v11.1.1.2 (want to utilize the ADD SCHEMATRANDATA and updated sequence support)
    I have read the documentation in GG that says that DDL support Oracle restricted schemas is not supported (including sys and system). From this document a create statement is considered DDL.
    However, I have to think that when a user or role is created on the Source that you want that action replicated to the Targets? So you don't have to rerun the action on the number of targets you have. This is the benefit of replication, correct?
    Without this ability replication is somewhat restrictive.
    Please someone shed some light on how a user/role statement could be replicated?
    Thanks!
    Jason

    Okay, so I reviewed the documentation and need some help in replicating DDL for 2 schemas.
    Here is my Extract and Replicat modules
    EXTRACT EXT1
    USERID ggs_owner, PASSWORD ggs_owner
    RMTHOST db2, MGRPORT 7809
    RMTTRAIL /home/oracle/goldengate/dirdat/gg
    ---ddl---
    DDL INCLUDE MAPPED
    ---dml---
    table schema1.*;
    table exclude schema1.*_sq;
    REPLICAT REP1
    ASSUMETARGETDEFS
    USERID ggs_owner, PASSWORD ggs_owner
    DDL INCLUDE MAPPED
    DDLERROR DEFAULT IGNORE RETRYOP
    REPERROR (1403, DISCARD)
    MAP schema1.*, TARGET schema1.* ;
    MAP schema2.*, TARGET schema2.*;
    My issue is that ddl replication is only working for schema1. No ddl is being replicated with schema2. I know there must be a something small I am overlooking.
    I was successful with
    DDL INCLUDE ALL, EXCLUDE "schema3.*, EXCLUDE "schema4.*", EXCLUDE "schema5.*", etc...
    However, I don't want to list out every schema that could potentially perform ddl. I would think the DDL INCLUDE MAPPED and then include those schemas that you want mapped.
    Any ideas?

  • How to modify the OIDDAS Create User page

    I am using Portal 902 and want users to register themselves to my Portal. I've have enabled Self-Registration but the pages need much cosmetic re-work for my purposes.
    I've discovered how to replace the default db generated SSO Login page with a customized JSP * AND * I wondering if I can do the same to the OIDDAS Create User page.
    I've noticed that the URL for the create user page is http://thebofer.my.domain:7777/oiddas/ui/oracle/ldap/das/admin/AppCreateUserInfoAdmin.
    This file (AppCreateUserInfoAdmin) is a UIX file and the only place I've found it is within "oiddas.ear" located at F:\oracle\ora9ias_portwire\ldap\das\oiddas.ear directory on my Portal host.
    Can I simply unpack the EAR and get the "AppCreateUserInfoAdmin,uix" file into JDev, modify it, then re-package it into the ear and then overwrite the existing ear with this new one? Is this acceptable?
    Also, I'm wondering about the location of the oiddas.ear file. Normally when I deploy to 9iAS the file usually ends up in the F:\oracle\ora9ias_portwire\j2ee\home\applications or the F:\oracle\ora9ias_portwire\Apache\Apache\htdocs. What is the proper deployment process when modifying OIDDAS UIX?
    Are my assumptions correct? Can someone point me in the right direction?Long postings are being truncated to ~1 kB at this time.

    This text is not a translation managed in the DB.  you can modify the aspx page, directly.  web\webcommon\login.aspx

  • Script to Create User and Add profiles

    Instead of using the ODI 10g GUI Console to create users and add them to a profile, Can this task be achieved by scripting ? Either by wlst or JMX or Java Packages ? Please advise and guide me.
    -Thanks,

    Is there any other way for adding Bulk users and assigning them to a profile? Any thoughts Please
    Versions: 10.1.3.5 and 10.1.3.6

  • Script to create tables from  an existing database

    I need a script to create tables without storage parameters from existing database

    Please repost your question in the database forum, General Database Discussions

  • Is it possible to create user-roles associations at run-time?

    basically I need to be able to add a user to a role programmatically before the role-based content is displayed to the user.
    Example: I have a role called 'Manager' created in the portal. When a user logs on, I detect that the user has the attribute 'job title' = 'Manager' so I add the user to the 'Manager' role and the portal shows the content for the 'Manager' role.

    Hi Umesh,
    Yes, we can add users to the Role programatically.We did that.
    Just see the below code to get some idea...
    IUserFactory userFactory = UMFactory.getUserFactory();
    IRoleFactory roleFactory = UMFactory.getRoleFactory();
    IRole role = roleFactory.getRole(roleName);
    String userId = "";
    //Here userIDS is the list of user-id s to assign.
    for (Iterator i = userIDS.keySet().iterator(); i.hasNext();) {
       userId = (String) i.next();
       role.addUserMember(userId);
    Hope this helps you.
    Cheers....
    Satya
    [Pl reward points if this is helpful]

  • Programatically creating users, roles and insert them into Jazn xml

    Hi All,
    I am using ADF 11G and ADF BC to develop my application. Whenever a user is created an entry will go into OID and into DB. Admin will apply the roles and users for that roles through application. Once the administrator assigns the roles, the user need to see the appropriate menus based on the roles assigned.
    If I use ADFSecurity, then I need to redeploy the application each and everytime an user is created and a role assigned to it. But I have to avoid the redeployment step. When ever admin assigns a role while approving the user, the same should be reflected in Jazn, so that I can use the securityContext to generate menus dynamcally.
    Is there a way to do programatically the below:
    1. Creating roles
    2. Assigining Users
    I want to use the functionality of ADFSecurity but programatically.
    Any information/links/guidance is much appreciated.
    Thanks,
    Morgan.

    Morgan,
    You can configure WLS to use OID instead of jaxn.xml file.
    [url http://download.oracle.com/docs/cd/E14571_01/core.1111/e10043/toc.htm]The security guide should be good reading for you.
    Best,
    John

  • Need a script to Create Users and assign Responsibilty

    Hi,
    EBS R12
    DB 10.0.2.4
    I need to create 100 application users and assign a responsibilty with them.I do not want to create a single user everytime using sysadmin responsibilty.Give some idea about it.
    Thanks

    Use FND_USER_PKG API.
    Please see old threads for similar discussion -- http://forums.oracle.com/forums/search.jspa?threadID=&q=FND_USER_PKG&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

Maybe you are looking for

  • Error while deploying decision services on server "bg1ws0044"

    hi' I have followed tutorial provided in the sample in the SOA suite "C:\product\10.1.3.1\OracleAS_1\bpel\samples\demos\ExpenseRequestApproval" for integrating BPEL and business rules, however the after deploying the ant is giving following below err

  • Change Right Alt/Option Key Shortcut

    Hi, I can't figure out how to turn off the shortcut when I press the Right Alt key by itself. Right now when I press the key it puts the window I'm using to the background. The problem is I can't use any of the multi-key shortcuts with the Right Alt

  • I downloaded a trial version and it deleted ALL of my Adobe software. Help!!

    I downloaded a trial version of the new CS because my (purchased) CS6 wouldn't open some files from a friend. It WIPED OUT ALL of my Adobe software - EVEN on my Time Machine backups that go back 3 years. The application icon is greyed out and has a c

  • Upgrade question........ sorry 1 more

    I have A macbook white, early 08. I just bought my upgrade from audiomidi for 99$. im not ready to upgrade my main studio but i want to upgrade my macbook. simple question, will my key still work in my main studio or will i need to upgrade both. I di

  • Holster to standby issue

    my 8900 doesn't seem to be going into standby when I put it in the holster. Does anyone know why this could be?