12.07.2015 Views

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<str<strong>on</strong>g>Soluti<strong>on</strong></str<strong>on</strong>g> <str<strong>on</strong>g>Guide</str<strong>on</strong>g> <str<strong>on</strong>g>for</str<strong>on</strong>g> <str<strong>on</strong>g>Migrating</str<strong>on</strong>g> <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> <strong>on</strong> <strong>UNIX</strong> <strong>to</strong> <strong>SQL</strong> <strong>Server</strong> <strong>on</strong> Windows 149database <strong>to</strong> which they have been migrated. The following statement can beused <strong>to</strong> see the schemas <strong>on</strong> which the user OE has been granted privileges.SELECT ownerFROM dba_tab_privsWHERE grantee = 'OE'UNIONSELECT ownerFROM dba_col_privsWHERE grantee = 'OE'The output of the statement is as follows:OWNERHRSYSIn Chapter 6, the HR schema was migrated <strong>to</strong> the HRDATA database in<strong>SQL</strong> <strong>Server</strong>. SYS is the data dicti<strong>on</strong>ary owner, which translates <strong>to</strong> masterdatabase in <strong>SQL</strong> <strong>Server</strong>. However, because the data dicti<strong>on</strong>ary is dividedbetween the master database and the applicati<strong>on</strong> (user-created) databases,<str<strong>on</strong>g>for</str<strong>on</strong>g> an applicati<strong>on</strong> user, an account in the master database may not benecessary and should be created after proper scrutiny of the securityrequirements.The following commands can be used <strong>to</strong> create a user <str<strong>on</strong>g>for</str<strong>on</strong>g> the OE login in theHRDATA database:Use HRDATAEXEC sp_grantdbaccess@loginame='OE',@name_in_db='OE'2.Create roles through which the privileges will be granted <strong>to</strong> users.Only those roles that are granted <strong>to</strong> users and schemas that are being migratedwill be created in <strong>SQL</strong> <strong>Server</strong>. Also, the role has <strong>to</strong> be created in each of thedatabases with the applicati<strong>on</strong> schema as the owner.The following statement can be used <strong>to</strong> retrieve the roles that have been granted<strong>to</strong> the user OE:SELECT granted_role, admin_opti<strong>on</strong>FROM dba_role_privsWHERE grantee = 'OE'The following is the output <str<strong>on</strong>g>for</str<strong>on</strong>g> the OE user:3.GRANTED_ROLECONNECTRESOURCEADMIN_OPTIONNONOThe CONNECT and RESOURCE roles are both system roles. No applicati<strong>on</strong> rolesare in use <str<strong>on</strong>g>for</str<strong>on</strong>g> this schema. Hence all system and object privileges will be granteddirectly <strong>to</strong> the user. If you want <strong>to</strong> introduce roles in <strong>SQL</strong> <strong>Server</strong>, it should beper<str<strong>on</strong>g>for</str<strong>on</strong>g>med at this point.Grant privileges and/or roles <strong>to</strong> the user.The roles that were identified in Step 2 are granted here.The CONNECT role gives the user the capability <strong>to</strong> c<strong>on</strong>nect <strong>to</strong> the <str<strong>on</strong>g>Oracle</str<strong>on</strong>g>database. In <strong>SQL</strong> <strong>Server</strong>, the same privileges are inherently granted when thelogin and user accounts are created. The RESOURCE role gives the capability <strong>to</strong>create objects in the database. Thereis no role in <strong>SQL</strong> <strong>Server</strong> that provides the

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!