Download Company Database Name SQL Script

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Commitment ordering wikipedia , lookup

Asynchronous I/O wikipedia , lookup

Global serializability wikipedia , lookup

Serializability wikipedia , lookup

Database wikipedia , lookup

Versant Object Database wikipedia , lookup

Concurrency control wikipedia , lookup

Relational model wikipedia , lookup

Relational algebra wikipedia , lookup

Clusterpoint wikipedia , lookup

Database model wikipedia , lookup

Transcript
Company Database Name:
This script looks for multiple records where the Company.DatabaseName doesn’t have the
same case (ex: SLDemoApp and SLDEMOAPP). Run this script against the system database.
select c.DatabaseName, c.CpnyID from Company c left outer join
sys.databases sd on c.DatabaseName COLLATE Latin1_General_CS_AS=
sd.name COLLATE Latin1_General_CS_AS
where sd.name is null and DatabaseName in (select
c1.DatabaseName from Company c1 left outer join company c2 on
c1.DatabaseName = c2.DatabaseName where
c1.DatabaseName=c2.DatabaseName and c1.DatabaseName COLLATE
Latin1_General_CS_AS != c2.DatabaseName COLLATE
Latin1_General_CS_AS)
To Fix: Update the databasename to be uppercase.