Set the options to create a foreign key on a primary or a secondary table and choose the Join type based on needs.Ĭlicking the Create script button will open the generated script in the query editor. In the Split table window set the new schema and enter the name for a new table: Select a table in the Object Explorer panel:ġ.1 Under the ApexSQL Refactor menu, under sub-menu Other refactors choose the Split table command:ġ.2 Use the Ctrl + Shift + Alt +O shortcut.There are two ways to split a table in ApexSQL Refactor: Security: splitting data to a separate table restrict access to sensitive data e.g. Performance: in cases where most of the queries retrieve all columns from a table that contains several very wide text or BLOB columns to reduce access times the BLOB columns are split to its own table. The most common reasons for splitting a table in two separate tables are:
Renaming an object using the SQL Server Management Studio Rename feature or the sp_rename stored procedure will not update objects that reference the renamed object by its original name and objects definition will contain the its original name When the script is executed, ApexSQL Refactor will modify all objects’ dependencies to reflect the change. To execute the script, click the Create script button. If an object with a specified schema and name already exists ApexSQL Refactor will prompt a warning message:Ĭlick the Preview button to generate the T-SQL refactoring script in the Preview section:Ĭlicking the Open button will open the generated script in the query editor. In the New name textbox enter a new name of an object:ĪpexSQL Refactor checks for duplicate names. The Safe rename window also offers users an option to change the object’s schema:
Right click an object, a column, or a parameter in the Object Explorer panel and select ApexSQL Refactor -> Safe rename command:
There are three ways to open the Safe rename window: Use the Safe rename feature to increase readability, align database naming conventions, or to clarify the meaning of an object