I created a new schema in SQL Server using
CREATE SCHEMA testschema
I checked database_principals
table using
select * from mssql.sys.database_principals;
I did not find any entry for testschema.
Did I miss something?
I am able to access tables in the dbo
schema. I want to create testschema with same privilege as dbo
.
Connection String for JDBC :
jdbc:sqlserver://192.xxx.xxx.xxx:1433;databaseName=BCHN
IIRC up to SQL Server 2000 schemas and principals were not distinguished. If you work on 2005 or higher, the new schema should display with the statement
select * from sys.schemas
CREATE SCHEMA does not create database principal.
SELECT * FROM sys.schemas
WHERE
name = 'testschema'
As you can see: principal_id = 1 (dbo)
It must be possible to access objects in your schema with [schema_name].[object_name]
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.