Is there something in SQL Server like USE (for switching databases) that can control the owner prefix used for tables?
For example, we have an application that insists on creating the tables "theServiceAccount.TheTableName"; We really need to get it to put table names under dbo ... so "dbo.TheTableName". We have no good way to change the SQL that the application starts (it is changed), except for the hook when it starts, which allows us to run some SQL. Therefore, it would be great if we could run sql at this point, which would do the following create table (or other operations) by default for dbo instead of the service account used.
I understand that the syntax of create table allows you to specify the owner, but at the moment this is not like an option. From what I can tell, the SQL created by this application never indicates the owner; it just has the table name in SQL that it runs.
Thanks!
source share