I have some questions regarding databases.
I would like to know the exact command of creating a database with user name and password using SQL Server 2008.
I have used the following command syntax and it works fine but not sure if this is correct syntax:
CREATE DATABASE [Test_DB] ON
( NAME = 'Test_DB', FILENAME = 'C:\Program Files\Microsoft SQL
Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Test_DB.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB
( NAME = 'Test_DB_log', FILENAME = 'C:\Program Files\Microsoft SQL
Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Test_DB_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
CREATE LOGIN user
WITH PASSWORD = 'password',
Another question is where does the user and password are stored and how can I locate them in SQL Server 2005 or 2008?
If I delete the above database, does the user and password are deleted as well? If not why?
Thanks in advance. Looking forward to your replies.