All Products
Document Center

Create an SQL Server schema

Last Updated: Apr 23, 2019

In DLA, the statements for creating ApsaraDB RDS for SQL Server (SQL Server) and ApsaraDB RDS for PostgreSQL (PostgreSQL) schemas and tables are same to those for ApsaraDB RDS for MySQL. Database is equivalent to schema in MySQL, and thus ApsaraDB RDS for MySQL (MySQL) contains only schema or database. However, SQL Server and PostgreSQL contain both databases and schemas. Therefore, the statement for creating schemas is slightly different from that for MySQL.

Create an SQL Server schema

  1. CREATE SCHEMA `hello_sqlserver_vpc_rds` WITH DBPROPERTIES
  2. (
  3. CATALOG = 'sqlserver',
  4. LOCATION = 'jdbc:sqlserver://;DatabaseName=rds_sqlserver_dbname',
  5. USER='rds_sqlserver_username',
  6. PASSWORD='rds_sqlserver_password',
  7. INSTANCE_ID = 'rds_sqlserver_instance_id',
  8. VPC_ID = 'rds_sqlserver_vpcid'
  9. );

Next step

Create an SQL Server table