Consultor Eletrônico



Kbase P7262: How to identify and fix if a schema is case-sensitive or not with SQL Server?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/5/2006
Status: Verified

GOAL:

How to identify if a SQL server schema is case sensitive or not?

GOAL:

How to identify if tables and fields within schema holder are case sensitive or not?

GOAL:

How to identify and fix case-sensitive flag to case-insensitive in the SQL Server DataServer Schema holder?

FACT(s) (Environment):

MS SQL Server DataServer

FIX:

There are two ways to identify if schema is case-sensitive

1) Dump the schema holder, review the .df file to see if there is any reference of the term "CASE-SENSITIVE" within the metaschema. If so, then the schema holder is case sensitive.

To remove the case-sensitivity, first make sure that SQL Server is defined as case-insensitive, otherwise these changes will not help. Then remove all entries of this within the .df file


2) Run the following program.

FOR EACH _db WHERE _db-name = 'logical-db-name'.
FOR EACH _file OF _db .
FOR EACH _field OF _file .
DISPLAY _fld-case.
END.
END.
END.

**Change logical-db-name to the appropriate SQL Server logical-name in the schema holder.

If program display "YES", then there is case-sensitivity within the db.

To remove the case-sensitivity, first make sure that SQL Server is defined as case-insensitive, otherwise these changes will not help. Then, run the following program.

FOR EACH _db WHERE _db-name = 'logical-db-name'.
FOR EACH _file OF _db .
FOR EACH _field OF _file .
_fld-case = NO.
END.
END.
END.