List of special characters can not be used in db user password

Badhe, Ganesh 80 Reputation points
2024-01-08T14:40:50.8233333+00:00

Can any one provide me list of special characters which can not be used in database user password.

SQL Server | Other
{count} votes

3 answers

Sort by: Most helpful
  1. Zahid Butt 961 Reputation points
    2024-01-08T18:58:24.6733333+00:00

    Hi,

    I have tried almost every symbol available on my keyboard for password in SQL server 2022 & its working fine. Anyway Microsoft recommendations are as follows:

    Password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords. When password complexity policy is enforced, new passwords must meet the following guidelines:

    The password doesn't contain the account name of the user.

    The password is at least eight characters long.

    The password contains characters from three of the following four categories:

    Latin uppercase letters (A through Z)

    Latin lowercase letters (a through z)

    Base 10 digits (0 through 9)

    Non-alphanumeric characters such as: exclamation point (!), dollar sign ($), number sign (#), or percent (%).

    Passwords can be up to 128 characters long. Use passwords that are as long and complex as possible.

    https://learn.microsoft.com/en-us/sql/relational-databases/security/password-policy?view=sql-server-ver16&redirectedfrom=MSDN

    Regards,

    2 people found this answer helpful.
    0 comments No comments

  2. Olaf Helper 47,436 Reputation points
    2024-01-09T06:42:13.29+00:00

    Additional see

    https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqldriverconnect-function?view=sql-server-ver16

    => Comments => "Because of connection string and initialization file grammar, keywords and attribute values that contain the characters **[]{}(),;?=!@** not enclosed with braces should be avoided*"

    1 person found this answer helpful.

  3. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2024-01-15T21:40:45.4333333+00:00

    Actually I need exact list which should avoid use in database user password. What i see in respective urls is just not working for specific scenario like in DSN

    In DSN? You store a password in a DSN? Does not seemt to be the best of ideas.

    In any case, if you want that list, you will have to determine it yourself by trial and error. I can't imagine that there is such a list. I would not even expect that some characters are entirely outlawed in passwords, but some can be less practical that others and may require escaping some in some contexts.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.