Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Mike2008
Starting Member
11 Posts |
Posted - 2008-10-19 : 16:35:16
|
| I probably miss something .. maybe you guys can help me.I am trying the following using purely TSQL in one query: 1. Create a database called "datatest"2. Create a table in that database also called "datatest"3. Create one column - column name : "datatest", Datatype "Varchar (50)4. Add a string in that table, for example "this is a test"5. Create a user called "datatest" with SQL authentication6. Give that user a password called "p4$$w0rd" (no enforce password policy)7. Default database for this user is "datatest"8. Map the user "datatest" to this database and assign the role db_owner and public9. Create a "Full" backup on the C-Drive10.Create a "Transaction Log" backup on the C-Drive |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2008-10-19 : 16:40:14
|
| Have you considering asking your teacher for help? Or even refering to your textboooks or using Google to do some searching in an attempt to find the answer on your own? We don't answer homework questions for people here. If you show us what you have tried, we can help you out and perhaps guide you in the right direction, but you won't learn anything if we just give you the answers.- Jeffhttp://weblogs.sqlteam.com/JeffS |
 |
|
|
Mike2008
Starting Member
11 Posts |
Posted - 2008-10-19 : 17:08:46
|
| No teacher .. he is probably dead already ( I am in my late 30s) :PI am working in a hosting company and our DBA is sick and we required a test page for a customer and I was the only one awake and on MSN :) But yea .. tried it myself for ages already .. but sorted already use MASTER;create database datatest;Gouse datatest;CREATE TABLE datatest( datatest varchar(50),);GoINSERT INTO dbo.datatest VALUES ('MSSQL / IIS working');GoCREATE LOGIN datatest WITH PASSWORD = 'pentium97' , DEFAULT_DATABASE = datatest, CHECK_EXPIRATION = OFF, CHECK_POLICY = OFFgoCREATE USER [datatest] FOR LOGIN [datatest]GOUSE [datatest]GOEXEC sp_addrolemember N'db_owner', N'datatest'GOOnly backup to go ... |
 |
|
|
Mike2008
Starting Member
11 Posts |
Posted - 2008-10-19 : 17:50:52
|
| Right, thats sorted too. |
 |
|
|
|
|
|