1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] Sorting database names on a server in SSMS 2019 in correct numerical order (..., 9, 10,...

Discussão em 'Outras Linguagens' iniciado por Stack, Outubro 1, 2024 às 05:42.

  1. Stack

    Stack Membro Participativo

    I am overseering a server using Microsoft SQL Server Management Studio 2019 with many archive databases and new archive appears every month. Later in the year, database with name ~10 is added and so on. However this database with name 10 is sorted right behind 1, so the list in the end looks like 1, 10, 11, 12, 2, 3, ... (refer to the picture Current database name sorting preview )

    What other approach than naming the databases 01, 02, and so on, can I take?

    • I cannot rename past databases
    • I cannot change individual properties of the past databases
    • I would prefer not to take an approach that changes properties to future databases I create, because apps with different settings may use them and load data into them (I am not sure if such approach exists here, just trying to avoid that in case)

    Thank you!

    I did not try anything, because I don't know what to do. I am expecting the databases to be sorted like ...9, 10, 11, 12, ...

    Continue reading...

Compartilhe esta Página