Results 1 to 5 of 5

Thread: Case Sensitive Database Problem

  1. #1
    Join Date
    Aug 2004
    Posts
    52

    Case Sensitive Database Problem

    Hi All,
    I've a database created in MS-SQL Server.
    I want to make this database Case-Sensitive from COMMAND PROMPT only for some reasons.
    I am not able to find the way for the same.
    Can anyone tell me how to make MS-SQL database case sensitive from DOS (command) prompt?

    Thanks in advance.

    Avadhoot

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Can you explain further?. What you are trying to achieve in command line?.

    You can change the collation of database to make it case sensitive but it will make it case sensitive from everywhere (query analyzer, ado, etc).

  3. #3
    Join Date
    Aug 2004
    Posts
    52
    situation is something like this...
    I'vce created a database called YUKONTEST in Yukon (SQL 2005)
    I can make it case sensitive using GUI however for some test automation I want to make entire database CaseSensitive from command line.
    Is it possible? Or what way should I follow? Or do I need to seacrh any specific API for the same?

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You can run

    alter database <DBNAME> collate <COLLATIONNAME>

    using OSQL from command line.

  5. #5
    Join Date
    Aug 2004
    Posts
    52

    Smile

    thanks Very Much
    OSQL utility worked out..
    I used
    osql -E -Q "alter database TESTDB collate SQL_Latin1_General_CP437_CS_AS"

    & It worked out !!!
    Thanks again,....

    Avadhoot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •