views:

197

answers:

1

I am transferring a database from one hosting provider to another. The current provider uses the domain name as part of the user name. The domain name is a .co.nz domain. So some objects in the database have a fully qualified name of [email protected].

Im trying to alter the schema of these objects to put them into a dbo schema using:

ALTER SCHEMA dbo TRANSFER [email protected]

But i get Error Message 117:

The object name '[email protected]' contains more than the maximum number of prefixes. The maximum is 1.

In another database I get the same error message but the maximum number is 2. So obviously the maximum number of prefixes can be set... somewhere. How do I increase the maximum number of prefixes so I can transfer securables out of the [email protected] and into the dbo schema?

+1  A: 

It's interpreting your dots as different prefixes, while in fact, I'm guessing they're just part of your database name...? In that case, increasing the amount of prefixes allowed is not what you want, but rather something like this:

ALTER SCHEMA dbo TRANSFER [[email protected]].tablename
David Hedlund
Fantastic. Thanks. Out of interest however what determines the number of prefixes allowed in a given database. My understanding is that the limit is 3 as object names in Sql Server use server.database.owner.objectname format. But why would it be set to just 1 for this db?
rism