I am new to MS SQL Server.
I have downloaded and installed SQL Server 2005 Express Edition.
I am just learning database programming with this.
But when I read MSDN documents - role, user-name, login-name confuses me.
I tried as following,
1. create database 'eg_database'
2. exec sp_addlogin 'eg_login', 'eg_loginpasswd', 'eg_database'
3. exec sp_adduser 'eg_login', 'eg_user'
after these 3 steps, I tried
sqlcmd -S .\SQLExpress -U 'eg_login'
I was asked for pass word and entered correctly. But I get error only.
Password: Msg 4064, Level 11, State 1, Server SYS1\SQLEXPRESS, Line 1
Cannot open user default database. Login failed.
Msg 18456, Level 14, State 1, Server SURASYS1\SQLEXPRESS, Line 1
Login failed for user 'eg_login'.
What I want to know is,
1. I want to create one new database
2. a new user account to access that database with table create, select, update, delete, alter, insert permission.
3. Any server permissions/configurations have to be done to access from another machine in network or simply "sqlcmd -S sys1\SQLExpress -U username -P password " (how to specify IP address in this syntax instead system name(i.e. sys1).
pls guide me with steps to finish the above things.