Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to create database with user id and password

How to create database with user id and password

Scheduled Pinned Locked Moved Database
databasequestionsql-serversysadmintutorial
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MikeRT
    wrote on last edited by
    #1

    Hi, I am using the sql server for creating the database. I want to create the database which is having userid and password. This I require since I wanted to restrict acces to database and also only authorise user to database can use the userid and password created at time of creation of database. So how can I create the database which is having userid and password? Thanks in advance.. MikeRT:^)

    L I K 3 Replies Last reply
    0
    • M MikeRT

      Hi, I am using the sql server for creating the database. I want to create the database which is having userid and password. This I require since I wanted to restrict acces to database and also only authorise user to database can use the userid and password created at time of creation of database. So how can I create the database which is having userid and password? Thanks in advance.. MikeRT:^)

      L Offline
      L Offline
      luckyve
      wrote on last edited by
      #2

      I think you may work with "security" select your database and go to "security" you can there set logins.

      1 Reply Last reply
      0
      • M MikeRT

        Hi, I am using the sql server for creating the database. I want to create the database which is having userid and password. This I require since I wanted to restrict acces to database and also only authorise user to database can use the userid and password created at time of creation of database. So how can I create the database which is having userid and password? Thanks in advance.. MikeRT:^)

        I Offline
        I Offline
        Imthu
        wrote on last edited by
        #3

        CREATE TABLE [dbo].[TblLogin] ( [Name] [varchar] (50) , [username] [varchar] (20), [passwd] [varchar] (20) , [Email] [varchar] (100) ) GO

        with Regards, Imthiyas Ahamed.A

        1 Reply Last reply
        0
        • M MikeRT

          Hi, I am using the sql server for creating the database. I want to create the database which is having userid and password. This I require since I wanted to restrict acces to database and also only authorise user to database can use the userid and password created at time of creation of database. So how can I create the database which is having userid and password? Thanks in advance.. MikeRT:^)

          K Offline
          K Offline
          Krish KP
          wrote on last edited by
          #4

          what is understand is, you are trying to create a database from your application and you want to have a valid users for it. If so, create database, then create user and assign access permission for accessing the database. however sa user will be able to access the new database. also any other user who have System Administrators role on other database same instance of SQL Server will be able to access the database. to my knowledge this cannot be restricted

          M 1 Reply Last reply
          0
          • K Krish KP

            what is understand is, you are trying to create a database from your application and you want to have a valid users for it. If so, create database, then create user and assign access permission for accessing the database. however sa user will be able to access the new database. also any other user who have System Administrators role on other database same instance of SQL Server will be able to access the database. to my knowledge this cannot be restricted

            M Offline
            M Offline
            MikeRT
            wrote on last edited by
            #5

            Hi, Problem is that the sql server on which i want to create the database is having some password.However as the login id to access the Master is 'sa' and which is universally fix . I can create database using master. But when I want to give userid and password to database I have created I should know the userid and password of sql server. Theirafter I can access the database and change the user of it. That's why I am tinking that if at time of creation If we assign some id and password to database it can be easy. I think it's lot explanatory. Mike

            K 1 Reply Last reply
            0
            • M MikeRT

              Hi, Problem is that the sql server on which i want to create the database is having some password.However as the login id to access the Master is 'sa' and which is universally fix . I can create database using master. But when I want to give userid and password to database I have created I should know the userid and password of sql server. Theirafter I can access the database and change the user of it. That's why I am tinking that if at time of creation If we assign some id and password to database it can be easy. I think it's lot explanatory. Mike

              K Offline
              K Offline
              Krish KP
              wrote on last edited by
              #6

              not getting exactly what you are looking for

              M 1 Reply Last reply
              0
              • K Krish KP

                not getting exactly what you are looking for

                M Offline
                M Offline
                MikeRT
                wrote on last edited by
                #7

                I want to create database on sql server which is having it's own userid and password. The application which is going to create database on sql server do not have the user id and password of sql server. However the userid for Master database is 'sa' and password ''(blank) application can create database using master database. Then since apllication is not aware of userid and password of sql server I am thinking that If we can give userid and password to the database at time of creation then It can be acessible to my application and also provide security as userid and password is with application only. Can it be possible? Mike

                K 1 Reply Last reply
                0
                • M MikeRT

                  I want to create database on sql server which is having it's own userid and password. The application which is going to create database on sql server do not have the user id and password of sql server. However the userid for Master database is 'sa' and password ''(blank) application can create database using master database. Then since apllication is not aware of userid and password of sql server I am thinking that If we can give userid and password to the database at time of creation then It can be acessible to my application and also provide security as userid and password is with application only. Can it be possible? Mike

                  K Offline
                  K Offline
                  Krish KP
                  wrote on last edited by
                  #8

                  what i understood & replied (my 1st reply), is for the same i.e. 1. connect to SQL Server using sa user 2. create new database 3. create new user 4. grand permissions for new user to access the new database 5. after this let application use the new user for accessing the data.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups