Hi,
I have a question where someone might have a simple answer for it.
We tried to access a database on SQL Server 2014 and run in strange behavior.
So the workflow was this here:
- backing up the database in SQL server 2008R2
- restoring the database in SQL Server 2014
- setting the compatibility level to SQL 2014 (12.0)
- creating a login for a Windows group, assign DB_owner rights in the restored database and assigned a default schema "dbo" for this windows user group.
What then happens is strange:
Our application creates stored procedures on the fly - but in a schema which is equal to the user name, following a name schema DOMAIN\username. When it then executes the stored procedure an error mesaage comes up "the stored procedure <name>
is in different schema than the table <tablename>
After doing some research I found out that this is default behavior on SQL server 2008R2 - there we could not define a default schema when connecting through Windows AD account.
When I use the "data import wizard" and copy all the data into a new, empty database the association to the "dbo" schema is correctly used... the stored procedures are created in "dbo" schema.
So my questions are:
how can I find out about the original compatibility level of the restored database?
is there a command that can remove these remains from SQL 2008R2 times?
IT architect - Terminal servers, virtualizations, SQL servers, file servers, WAN networks and closely related to software devleopment (8 years + experience in VB, C++ and script langugaes), MCP for SQL server and CCAA for Xenapp 6.5