简体   繁体   中英

How to convert database in SQL Server to schema based object in Azure SQL

I'm trying the migrate a database to Azure SQL. As I'm trying to minimize the servers, the challenge is like let's say db name is college, under college db we have table folder and I have a table name "forms". In order to access forms, it will be like college..dbo.forms.

Now I'm trying to migrate the database and tables in Azure SQL. I want the database to be converted into schema based object. Let's say for accessing table "forms" under college, it will be like "college.forms". There will be no separate database "college".

As I know, you could not do that during migrating.

No matter which way you migrate your database to Azure SQL, you all need to do the two steps:

  1. specify the source server and database.
  2. select schema objects.

[dbo] is the default schema in Azure SQL. And a new database will certainly appear in Azure SQL. Reference: SQL Server database migration to Azure SQL Database .

But Azure SQL database supports your create or alter the default schema.

You can see:

  1. CREATE SCHEMA (Transact-SQL) ;
  2. ALTER SCHEMA (Transact-SQL) ;
  3. DROP SCHEMA (Transact-SQL) .

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM