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.

90Developing: Databases — <str<strong>on</strong>g>Migrating</str<strong>on</strong>g> SchemasCreate Filegroups <str<strong>on</strong>g>for</str<strong>on</strong>g> the TablespacesFilegroups in <strong>SQL</strong> <strong>Server</strong> are similar <strong>to</strong> tablespaces in <str<strong>on</strong>g>Oracle</str<strong>on</strong>g>. They are used <strong>to</strong> logicallygroup s<strong>to</strong>rage. When a database is created in <strong>SQL</strong> <strong>Server</strong>, it has <strong>on</strong>e filegroup bydefault. Based <strong>on</strong> the number of tablespaces that the schema uses, additi<strong>on</strong>al filegroupshave <strong>to</strong> be created in the newly created database.Every database is created with a default primary filegroup that cannot be renamed ordropped. As a result, <strong>on</strong>e of the tablespaces will have <strong>to</strong> map <strong>to</strong> the primary filegroupduring migrati<strong>on</strong>. Additi<strong>on</strong>al sec<strong>on</strong>dary or user filegroups can be created with userspecifiednames.In <str<strong>on</strong>g>Oracle</str<strong>on</strong>g>, tablespaces are created as locally managed or dicti<strong>on</strong>ary managed. The typeof tablespace determines what s<strong>to</strong>rage parameters can be used. Creating filegroups issimilar <strong>to</strong> creating tablespaces under <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> except that a filegroup is added <strong>to</strong> a specific<strong>SQL</strong> <strong>Server</strong> database. Filegroups added <strong>to</strong> a database are called sec<strong>on</strong>dary filegroups,and they can be added <strong>to</strong> any database. Datafiles are added separately from thedefiniti<strong>on</strong> of a filegroup.The following two opti<strong>on</strong>s are available <str<strong>on</strong>g>for</str<strong>on</strong>g> creating a filegroup. To create a filegroup using Enterprise Manager, follow these steps:1. Expand Databases and right-click Properties of the database <strong>to</strong> which thefilegroup has <strong>to</strong> be added.2. In the Database Properties window, left-click the Filegroups pane.3. Type the filegroup name in the next available empty line that follows the filegrouplisting. To add a filegroup <strong>to</strong> a database using T-<strong>SQL</strong>, execute the followingstatement:ALTER DATABASE database_nameADD FILEGROUP filegroup_nameAdd Datafiles <strong>to</strong> FilegroupsS<strong>to</strong>rage has <strong>to</strong> be allocated in the <strong>SQL</strong> <strong>Server</strong> database <strong>to</strong> meet the requirements of theschema being migrated. Datafiles are added <strong>to</strong> filegroups much as datafiles are added <strong>to</strong>tablespaces in <str<strong>on</strong>g>Oracle</str<strong>on</strong>g>.Adding a datafile in <strong>SQL</strong> <strong>Server</strong> is similar <strong>to</strong> the process used in <str<strong>on</strong>g>Oracle</str<strong>on</strong>g>. Thecharacteristics that can be set are related <strong>to</strong> au<strong>to</strong>-growth and are similar in functi<strong>on</strong> <strong>to</strong><str<strong>on</strong>g>Oracle</str<strong>on</strong>g>'s AUTOEXTEND feature. An additi<strong>on</strong>al characteristic that does not exist in <str<strong>on</strong>g>Oracle</str<strong>on</strong>g>is the logical file name.Datafiles can be added <strong>to</strong> the primary filegroup as well as any sec<strong>on</strong>dary filegroups eitherthrough Enterprise Manager or using T-<strong>SQL</strong>. To add a datafile by using Enterprise Manager, follow these steps:1. Expand Databases and right-click Properties of the database <strong>to</strong> which thefilegroup has <strong>to</strong> be added.2. In the Database Properties window, left-click the Data Files pane.3. Add file in<str<strong>on</strong>g>for</str<strong>on</strong>g>mati<strong>on</strong> in the next available empty line in the file listing. In the filegroupcolumn, select the filegroup name from the drop-down list. Also set the growthcharacteristics <str<strong>on</strong>g>for</str<strong>on</strong>g> the file.

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

Saved successfully!

Ooh no, something went wrong!