Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2013
    Posts
    3

    Unanswered: First Time password for a database in Sybase

    Hi folks,

    Please help me with the below. I have made a new database in Sybase, and I want to set password for the same. However, when I tried the command 'sp_password' , the output is as shown below.

    1> use imsudb
    2>

    1> sp_password null,tre12345
    2>
    Msg 10315, Level 14, State 1:
    Server 'IMSU2', Procedure 'sp_password', Line 118:
    Invalid caller's password specified, password left unchanged.
    Msg 17720, Level 16, State 1:
    Server 'IMSU2', Procedure 'sp_password', Line 128:
    Error: Unable to set the Password.
    (return status = 1)


    Can you please help as to how to set the password of the same?

    Rgds,
    TS

  2. #2
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    You can use sp_password to change the password of a login, not of a database (a database does not have a password).
    A login can have privileges/a user in/on a database, that is how you control access to a database.
    I'm not crazy, I'm an aeroplane!

  3. #3
    Join Date
    Nov 2013
    Posts
    3
    Quote Originally Posted by Martijnvs View Post
    You can use sp_password to change the password of a login, not of a database (a database does not have a password).
    A login can have privileges/a user in/on a database, that is how you control access to a database.
    Hi there,

    Thanks for reply.

    Background: I have made a new database in sybase, and I want to access this database using below command:

    isql -Usa -Psa12345 -SIMSU2

    But to my agony how to add the password/user to this command?

    In that how command line would know that I want a login session of some XXX database.

    So don't you think that isql utility needs a specific username and password for getting a particular session to a unique database?

    Rgds,
    TS

  4. #4
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    First: what version of Sybase are you using? ASE? IQ? Anywhere?)

    With the isql -Usa -Psa12345 -SIMSU2 command you are trying to connect to the databaseserver IMSU2 using the login 'sa' (the value of the -U option) and password 'sa12345' (the value of the -P option). The SA-login is a kind of superuser that can access everything within a databaseinstance and therefore should not be used by normal users or applications.

    If you want to give someone limited accessto an instance or a database within an instance, you can create a separate login. You grant that login privileges on the database you want it to access by adding a user in that database. To connect to the instance with that new login you use isql -Unew_login -Ppassword_of_new_login -SIMSU2.

    I hope this helped, let me know if you have more questions.
    I'm not crazy, I'm an aeroplane!

Posting Permissions

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