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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

142 Developing: Databases — <str<strong>on</strong>g>Migrating</str<strong>on</strong>g> SchemasSELECT textFROM dba_sourceWHERE owner = 'HR'AND NAME = 'ADD_JOB_HISTORY'ORDER BY lineThe output is:TEXTPROCEDURE add_job_his<strong>to</strong>ry( p_emp_id job_his<strong>to</strong>ry.employee_id%type, p_start_date job_his<strong>to</strong>ry.start_date%type, p_end_date job_his<strong>to</strong>ry.end_date%type, p_job_id job_his<strong>to</strong>ry.job_id%type, p_department_id job_his<strong>to</strong>ry.department_id%type)ISBEGININSERT INTO job_his<strong>to</strong>ry (employee_id, start_date,end_date, job_id, department_id)VALUES(p_emp_id, p_start_date, p_end_date, p_job_id, p_department_id);END add_job_his<strong>to</strong>ry;An overview of the ef<str<strong>on</strong>g>for</str<strong>on</strong>g>t in migrating functi<strong>on</strong>s, s<strong>to</strong>red procedures, and packageshas been given in the "S<strong>to</strong>red Programs" secti<strong>on</strong> of this chapter. For a detaileddiscussi<strong>on</strong> of migrating the code, refer <strong>to</strong> the "<str<strong>on</strong>g>Migrating</str<strong>on</strong>g> the Data Access" secti<strong>on</strong>in Chapter 11.10. Create syn<strong>on</strong>yms.Syn<strong>on</strong>yms are used with n<strong>on</strong>-schema users <strong>to</strong> provide locati<strong>on</strong> transparency.Because <strong>SQL</strong> <strong>Server</strong> does not support syn<strong>on</strong>yms, the <strong>SQL</strong> will have <strong>to</strong> bemodified <strong>to</strong> c<strong>on</strong>tain a schema prefix.Note An <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> schema could potentially have objects or properties that are not inuse. Examples of such objects are disabled c<strong>on</strong>straints, invalid views, invalidsyn<strong>on</strong>yms, invalid functi<strong>on</strong>, invalid procedures, and dropped column (not purgedfrom table). Although it is not necessary <strong>to</strong> migrate these objects <strong>to</strong> the newenvir<strong>on</strong>ment, certain clients may differ in this regard.

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

Saved successfully!

Ooh no, something went wrong!