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.

88Developing: Databases — <str<strong>on</strong>g>Migrating</str<strong>on</strong>g> Schemas●●●●●●Database name. Naming is c<strong>on</strong>strained by the same rules as identifiers. Ameaningful name can be used and need not be the same as the name of the<str<strong>on</strong>g>Oracle</str<strong>on</strong>g> schema being migrated.Database owner. By default, the user who created the database becomes thedatabase owner (dbo). The owner can be changed using sp_changedbowner. Tomimic the <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> schema, a login with the same name as the schema can bemade the database owner. A more detailed account of the implicati<strong>on</strong>s of databaseowner and database object owner is provided in the "Qualifiers and NameResoluti<strong>on</strong>" secti<strong>on</strong> later in this chapter.Filegroups. These are the equivalents of tablespaces. A default primary filegroupis created during the database creati<strong>on</strong>.Primary file. Every database is created with a default primary file bel<strong>on</strong>ging <strong>to</strong> thedefault primary filegroup identifiable by the .mdf file name extensi<strong>on</strong>. The primaryfile c<strong>on</strong>tains startup in<str<strong>on</strong>g>for</str<strong>on</strong>g>mati<strong>on</strong> <str<strong>on</strong>g>for</str<strong>on</strong>g> the database and is used <strong>to</strong> s<strong>to</strong>re user data justas any other datafile. Only the size and growth characteristics can be changed.Sec<strong>on</strong>dary files. Additi<strong>on</strong>al files can be created in a database and associated withthe primary file group or any additi<strong>on</strong>al filegroup. The recommended file nameextensi<strong>on</strong> <str<strong>on</strong>g>for</str<strong>on</strong>g> sec<strong>on</strong>dary files is .ndf.Transacti<strong>on</strong> log. Hold rollback and redo in<str<strong>on</strong>g>for</str<strong>on</strong>g>mati<strong>on</strong> required <strong>to</strong> recover thedatabase. Notice that, unlike <str<strong>on</strong>g>Oracle</str<strong>on</strong>g>, where rollback segments and redo logs arecentral <strong>to</strong> the instance, every database has at least <strong>on</strong>e transacti<strong>on</strong> log.Transacti<strong>on</strong> logs are not part of any filegroup.There are two ways <strong>to</strong> create a new database using Enterprise Manager: using theDatabase Properties dialog and by using the Create Database Wizard. An example ofeach of these procedures is provided here. To create a database using the Database Properties dialog, follow thesesteps:1. Right-click Databases, and then left-click New Database, or right-click <strong>Server</strong>(<strong>Server</strong> Name\Instance Name), then right-click New, and then left-click Database.2. In the Database Properties window, enter the database name in the Generalpane, the datafile and filegroup c<strong>on</strong>figurati<strong>on</strong> in the Data Files pane, and thetransacti<strong>on</strong> log c<strong>on</strong>figurati<strong>on</strong> in the Transacti<strong>on</strong> Log pane. To create a new database using the Create Database Wizard, follow thesesteps:1. Expand a server group, and then expand the server in which <strong>to</strong> create a database.2. On the Tools menu, click Wizards.3. Expand Database.4. Double-click Create Database Wizard.5. Complete the steps in the wizard.<strong>SQL</strong> <strong>Server</strong> also offers the CREATE DATABASE statement <str<strong>on</strong>g>for</str<strong>on</strong>g> creating databases.

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

Saved successfully!

Ooh no, something went wrong!