Monday, March 19, 2012
Error when creating new database user
message: Cannot resolve
collation conflict for equal to operation.
I Use SQL_Danish_Pref_CP1_CI_AS as the default collation. Only one user
database has another collation: Danish_Norwegian_CI_AI and the tempdb
database. I don't know why the tempdb has this collation, and if that is the
problem?I'd start checking the collation for below databases:
master
model
tempdb
msdb
If they aren't the same, you have a problem. It isn't supported to have different collations for the
system databases. Somebody made a "hack" to get you there. You would need to sort it out. Suitable
actions depend on what collation each system database has.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"blaairis" <blaairis@.discussions.microsoft.com> wrote in message
news:EC58D0F5-4199-4353-8576-81B6F6BAF41F@.microsoft.com...
> When I try to create a new database user (on any database) I get this error
> message: Cannot resolve
> collation conflict for equal to operation.
> I Use SQL_Danish_Pref_CP1_CI_AS as the default collation. Only one user
> database has another collation: Danish_Norwegian_CI_AI and the tempdb
> database. I don't know why the tempdb has this collation, and if that is the
> problem?|||The master and msdb is ok, but tempdb and model have Danish_Norwegian_CI_AI
It is not possible to change collation in tempdb with alter
database...because it is a system database. What can I do?
"Tibor Karaszi" wrote:
> I'd start checking the collation for below databases:
> master
> model
> tempdb
> msdb
> If they aren't the same, you have a problem. It isn't supported to have different collations for the
> system databases. Somebody made a "hack" to get you there. You would need to sort it out. Suitable
> actions depend on what collation each system database has.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "blaairis" <blaairis@.discussions.microsoft.com> wrote in message
> news:EC58D0F5-4199-4353-8576-81B6F6BAF41F@.microsoft.com...
> > When I try to create a new database user (on any database) I get this error
> > message: Cannot resolve
> > collation conflict for equal to operation.
> > I Use SQL_Danish_Pref_CP1_CI_AS as the default collation. Only one user
> > database has another collation: Danish_Norwegian_CI_AI and the tempdb
> > database. I don't know why the tempdb has this collation, and if that is the
> > problem?
>|||Probably somebody moved files for the model database from another installation. Tempdb is created
based on model on each startup. Hunt down database files from an installation that matches system
and msdb for your model database. You can try to just stop SQL Server and replace the files (backup
first, and save a copy of original model database files).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"blaairis" <blaairis@.discussions.microsoft.com> wrote in message
news:2155EF0D-3115-4B69-854B-1DD0C7A02EDC@.microsoft.com...
> The master and msdb is ok, but tempdb and model have Danish_Norwegian_CI_AI
> It is not possible to change collation in tempdb with alter
> database...because it is a system database. What can I do?
> "Tibor Karaszi" wrote:
>> I'd start checking the collation for below databases:
>> master
>> model
>> tempdb
>> msdb
>> If they aren't the same, you have a problem. It isn't supported to have different collations for
>> the
>> system databases. Somebody made a "hack" to get you there. You would need to sort it out.
>> Suitable
>> actions depend on what collation each system database has.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "blaairis" <blaairis@.discussions.microsoft.com> wrote in message
>> news:EC58D0F5-4199-4353-8576-81B6F6BAF41F@.microsoft.com...
>> > When I try to create a new database user (on any database) I get this error
>> > message: Cannot resolve
>> > collation conflict for equal to operation.
>> > I Use SQL_Danish_Pref_CP1_CI_AS as the default collation. Only one user
>> > database has another collation: Danish_Norwegian_CI_AI and the tempdb
>> > database. I don't know why the tempdb has this collation, and if that is the
>> > problem?
>>|||Also, you could try bringing up the instance in master recovery only and
then attempt to modify the collation using the ALTER DATABASE command.
-T3608
ALTER DATABASE model
COLLATE <collation name>
This may only be a pseudo fix, if it works at all. You will probably need
to do as Tibor suggest, but it is worth a shot if you have trouble finding
such a database.
Another way to acquire a model database with the collation you want would be
to install SQL Server Developer Edition on your workstation and specifying
the collation of the system databases during the installation. You would
then need to patch you workstation installation to the same level as your
production database before you tried to copy the files from your workstation
to the server.
Hope this helps.
Sincerely,
Anthony Thomas
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%239R%23RH3ZFHA.1040@.TK2MSFTNGP10.phx.gbl...
Probably somebody moved files for the model database from another
installation. Tempdb is created
based on model on each startup. Hunt down database files from an
installation that matches system
and msdb for your model database. You can try to just stop SQL Server and
replace the files (backup
first, and save a copy of original model database files).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"blaairis" <blaairis@.discussions.microsoft.com> wrote in message
news:2155EF0D-3115-4B69-854B-1DD0C7A02EDC@.microsoft.com...
> The master and msdb is ok, but tempdb and model have
Danish_Norwegian_CI_AI
> It is not possible to change collation in tempdb with alter
> database...because it is a system database. What can I do?
> "Tibor Karaszi" wrote:
>> I'd start checking the collation for below databases:
>> master
>> model
>> tempdb
>> msdb
>> If they aren't the same, you have a problem. It isn't supported to have
different collations for
>> the
>> system databases. Somebody made a "hack" to get you there. You would need
to sort it out.
>> Suitable
>> actions depend on what collation each system database has.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "blaairis" <blaairis@.discussions.microsoft.com> wrote in message
>> news:EC58D0F5-4199-4353-8576-81B6F6BAF41F@.microsoft.com...
>> > When I try to create a new database user (on any database) I get this
error
>> > message: Cannot resolve
>> > collation conflict for equal to operation.
>> > I Use SQL_Danish_Pref_CP1_CI_AS as the default collation. Only one user
>> > database has another collation: Danish_Norwegian_CI_AI and the tempdb
>> > database. I don't know why the tempdb has this collation, and if that
is the
>> > problem?
>>
Wednesday, February 15, 2012
Error Scripting Procs: Failed to retrieve dependency information
How can I resolve the following error when I try to script out some procs. In SSMS I right click the db and I choose 'Tasks > Generate Script', then I select 10 stored procs (without changing any of the default options). If I don't include the proc mentioned in the error below, then it works OK.
TITLE: Microsoft.SqlServer.SqlEnum
Failed to retrieve dependency information (object_id(System.Int32) 1271727633.object_type(System.Int16) 4.relative_id(System.Int32)
1879729799.relative_type(System.DBNull) .object_name(System.String) usp_SEL_RCEPCompanyHistory.object_schema(System.String)
dbo.relative_name(System.DBNull) .relative_schema(System.DBNull) .).
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
ADDITIONAL INFORMATION:
Specified cast is not valid. (Microsoft.SqlServer.SqlEnum)
Please help us understand what kind of object caused the problem better by running the following queries and telling us what do they return.
select * from sys.objects where object_id = xxxx
select * from sys.sql_dependencies where object_id = xxxx or referenced_major_id=xxxx
select * from sys.assembly_modules where object_id = xxxx
You want to replace xxxx with the number that shows in the error message after relative_id.
Thanks,
Ciprian Gerea
|||
The object is a user-defined aggregate function ('Microsoft.Samples.SqlServer.Concatenate'). I think this problem has already been submitted in feedback here:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125881
|||I set up my machine as directed in the above issue report, using our current sp2 build, and was unable to reproduce the error reported here.
It may be the case that the two feedback items are evidence of two issues, with distinct repro scenarios, but I am assuming that we have fixed this, and that you can expect to see it in the upcoming release of sql server sp2.
|||I was experiencing the same type of error. Your script above was helpful to me in identifying the SQL_dependencies for the procs that was throwing the errors. It turns out in my situation there were procs which were referencing the service queue objects and for what ever reasons it did not like those procs. I excluded those procs from my script generator and it worked.
Error Scripting Procs: Failed to retrieve dependency information
How can I resolve the following error when I try to script out some procs. In SSMS I right click the db and I choose 'Tasks > Generate Script', then I select 10 stored procs (without changing any of the default options). If I don't include the proc mentioned in the error below, then it works OK.
TITLE: Microsoft.SqlServer.SqlEnum
Failed to retrieve dependency information (object_id(System.Int32) 1271727633.object_type(System.Int16) 4.relative_id(System.Int32)
1879729799.relative_type(System.DBNull) .object_name(System.String) usp_SEL_RCEPCompanyHistory.object_schema(System.String)
dbo.relative_name(System.DBNull) .relative_schema(System.DBNull) .).
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
ADDITIONAL INFORMATION:
Specified cast is not valid. (Microsoft.SqlServer.SqlEnum)
Please help us understand what kind of object caused the problem better by running the following queries and telling us what do they return.
select * from sys.objects where object_id = xxxx
select * from sys.sql_dependencies where object_id = xxxx or referenced_major_id=xxxx
select * from sys.assembly_modules where object_id = xxxx
You want to replace xxxx with the number that shows in the error message after relative_id.
Thanks,
Ciprian Gerea
|||
The object is a user-defined aggregate function ('Microsoft.Samples.SqlServer.Concatenate'). I think this problem has already been submitted in feedback here:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125881
|||I set up my machine as directed in the above issue report, using our current sp2 build, and was unable to reproduce the error reported here.
It may be the case that the two feedback items are evidence of two issues, with distinct repro scenarios, but I am assuming that we have fixed this, and that you can expect to see it in the upcoming release of sql server sp2.
|||I was experiencing the same type of error. Your script above was helpful to me in identifying the SQL_dependencies for the procs that was throwing the errors. It turns out in my situation there were procs which were referencing the service queue objects and for what ever reasons it did not like those procs. I excluded those procs from my script generator and it worked.
Error Scripting Procs: Failed to retrieve dependency information
How can I resolve the following error when I try to script out some procs. In SSMS I right click the db and I choose 'Tasks > Generate Script', then I select 10 stored procs (without changing any of the default options). If I don't include the proc mentioned in the error below, then it works OK.
TITLE: Microsoft.SqlServer.SqlEnum
Failed to retrieve dependency information (object_id(System.Int32) 1271727633.object_type(System.Int16) 4.relative_id(System.Int32)
1879729799.relative_type(System.DBNull) .object_name(System.String) usp_SEL_RCEPCompanyHistory.object_schema(System.String)
dbo.relative_name(System.DBNull) .relative_schema(System.DBNull) .).
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
ADDITIONAL INFORMATION:
Specified cast is not valid. (Microsoft.SqlServer.SqlEnum)
|||
Please help us understand what kind of object caused the problem better by running the following queries and telling us what do they return.
select * from sys.objects where object_id = xxxx
select * from sys.sql_dependencies where object_id = xxxx or referenced_major_id=xxxx
select * from sys.assembly_modules where object_id = xxxx
You want to replace xxxx with the number that shows in the error message after relative_id.
Thanks,
Ciprian Gerea
|||The object is a user-defined aggregate function ('Microsoft.Samples.SqlServer.Concatenate'). I think this problem has already been submitted in feedback here:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125881
|||I set up my machine as directed in the above issue report, using our current sp2 build, and was unable to reproduce the error reported here.
It may be the case that the two feedback items are evidence of two issues, with distinct repro scenarios, but I am assuming that we have fixed this, and that you can expect to see it in the upcoming release of sql server sp2.
|||I was experiencing the same type of error. Your script above was helpful to me in identifying the SQL_dependencies for the procs that was throwing the errors. It turns out in my situation there were procs which were referencing the service queue objects and for what ever reasons it did not like those procs. I excluded those procs from my script generator and it worked.
Error Scripting Procs: Failed to retrieve dependency information
How can I resolve the following error when I try to script out some procs. In SSMS I right click the db and I choose 'Tasks > Generate Script', then I select 10 stored procs (without changing any of the default options). If I don't include the proc mentioned in the error below, then it works OK.
TITLE: Microsoft.SqlServer.SqlEnum
Failed to retrieve dependency information (object_id(System.Int32) 1271727633.object_type(System.Int16) 4.relative_id(System.Int32)
1879729799.relative_type(System.DBNull) .object_name(System.String) usp_SEL_RCEPCompanyHistory.object_schema(System.String)
dbo.relative_name(System.DBNull) .relative_schema(System.DBNull) .).
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
ADDITIONAL INFORMATION:
Specified cast is not valid. (Microsoft.SqlServer.SqlEnum)
|||
Please help us understand what kind of object caused the problem better by running the following queries and telling us what do they return.
select * from sys.objects where object_id = xxxx
select * from sys.sql_dependencies where object_id = xxxx or referenced_major_id=xxxx
select * from sys.assembly_modules where object_id = xxxx
You want to replace xxxx with the number that shows in the error message after relative_id.
Thanks,
Ciprian Gerea
|||The object is a user-defined aggregate function ('Microsoft.Samples.SqlServer.Concatenate'). I think this problem has already been submitted in feedback here:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125881
|||I set up my machine as directed in the above issue report, using our current sp2 build, and was unable to reproduce the error reported here.
It may be the case that the two feedback items are evidence of two issues, with distinct repro scenarios, but I am assuming that we have fixed this, and that you can expect to see it in the upcoming release of sql server sp2.
|||I was experiencing the same type of error. Your script above was helpful to me in identifying the SQL_dependencies for the procs that was throwing the errors. It turns out in my situation there were procs which were referencing the service queue objects and for what ever reasons it did not like those procs. I excluded those procs from my script generator and it worked.