different between NT login and standard login in SQLServer**

different between NT login and standard login in SQLServer**

Post by marya » Wed, 16 Jan 2002 20:17:20



Hi

I created an standard login and user and followed theses steps and there was no problem
and at result my created table belongs to 'user1'.
but in 2th try when I wnated to create a windows NT login and followed the 2th steps there
was a problem for me.this problem is : it shows at last step that my table belongs to 'sa' not to 'urezvani' which
created this table!!!!!!  but in 1th try there's no problem and it shows the table 't113' belongs to 'user1'
so, what's wrong here?

1th try  ----->    with success

in Osql:

    exec sp_addlogin 'login1'
    exec sp_adduser 'login1','user1','db_owner'

in VB:

     Set con = CreateObject("adodb.connection")
     Set rs = CreateObject("adodb.recordset")
     Set cmd = CreateObject("adodb.command")

   ' Connect to Database
    con.ConnectionString = "driver={SQL Server};server=parskhazar3;uid=login1;pwd=;database=productstock"
         con.Open

     sql1 = "create table t113(f1 char(1),f2 char(2));"
    cmd.ActiveConnection = con
    cmd.CommandText = sql1
    cmd.CommandType = adCmdText
    cmd.Execute

in Osql:
    exec sp_tables 't113';

   table_owner     ..........
  --------------------
    user1

2th try -----------> not my excepted result!!!!

in Osql:

    exec sp_addlogin 'khazar2.com\rezvani'
    exec sp_adduser 'khazar2.com\rezvani','urezvani','db_owner'

   successed

in VB:

     Set con = CreateObject("adodb.connection")
     Set rs = CreateObject("adodb.recordset")
     Set cmd = CreateObject("adodb.command")

   ' Connect to Database
    con.ConnectionString = "driver={SQL Server};server=parskhazar3;uid=khazar2.com\rezvani;pwd=;database=productstock"
         con.Open

     sql1 = "create table t113(f1 char(1),f2 char(2));"
    cmd.ActiveConnection = con
    cmd.CommandText = sql1
    cmd.CommandType = adCmdText
    cmd.Execute

(  **** successed******)

in Osql:
    exec sp_tables 't113';

   table_owner     ..........
  --------------------
    sa

Thanks

 
 
 

different between NT login and standard login in SQLServer**

Post by John Gose [M » Sat, 19 Jan 2002 09:03:05


Maryam,

Is urezvani a member of the SQL system administrator group?

John Gose
MCDBA
Microsoft SQL Server Support

This posting is provided "AS IS", with no warranties, and confers no rights

Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.

--------------------
| From: maryam <>
| Subject: different between NT login and standard login in SQLServer**

| Date: Tue, 15 Jan 2002 11:17:20 GMT
| Mime-Version: 1.0
| User-Agent: Opera/5.11 (Windows 98; U)  [en]
| Content-Type: text/plain; charset="us-ascii"
| Newsgroups: microsoft.public.sqlserver.connect
| NNTP-Posting-Host: 213.155.47.75
| Lines: 1        
| Path: cpmsftngxa07!tkmsftngxs02!cpmsftngxa09!tkmsftngp01!tkmsftngp05
| Xref: cpmsftngxa07 microsoft.public.sqlserver.connect:26293
| X-Tomcat-NG: microsoft.public.sqlserver.connect
|
| Hi
|
| I created an standard login and user and followed theses steps and there
was no problem
| and at result my created table belongs to 'user1'.
| but in 2th try when I wnated to create a windows NT login and followed
the 2th steps there
| was a problem for me.this problem is : it shows at last step that my
table belongs to 'sa' not to 'urezvani' which
| created this table!!!!!!  but in 1th try there's no problem and it shows
the table 't113' belongs to 'user1'
| so, what's wrong here?
|
|
|
| 1th try  ----->    with success
|
| in Osql:
|
|     exec sp_addlogin 'login1'
|     exec sp_adduser 'login1','user1','db_owner'
|
| in VB:
|      
|      Set con = CreateObject("adodb.connection")
|      Set rs = CreateObject("adodb.recordset")
|      Set cmd = CreateObject("adodb.command")
|
|    ' Connect to Database
|     con.ConnectionString = "driver={SQL
Server};server=parskhazar3;uid=login1;pwd=;database=productstock"
|          con.Open
|    
|      sql1 = "create table t113(f1 char(1),f2 char(2));"
|     cmd.ActiveConnection = con
|     cmd.CommandText = sql1
|     cmd.CommandType = adCmdText
|     cmd.Execute
|    
| in Osql:
|     exec sp_tables 't113';
|
|    table_owner     ..........
|   --------------------
|     user1
|  
|
| 2th try -----------> not my excepted result!!!!
|
| in Osql:
|
|     exec sp_addlogin 'khazar2.com\rezvani'
|     exec sp_adduser 'khazar2.com\rezvani','urezvani','db_owner'
|
|    successed
|
| in VB:
|
|      Set con = CreateObject("adodb.connection")
|      Set rs = CreateObject("adodb.recordset")
|      Set cmd = CreateObject("adodb.command")
|
|    ' Connect to Database
|     con.ConnectionString = "driver={SQL
Server};server=parskhazar3;uid=khazar2.com\rezvani;pwd=;database=productstoc
k"
|          con.Open
|    
|      sql1 = "create table t113(f1 char(1),f2 char(2));"
|     cmd.ActiveConnection = con
|     cmd.CommandText = sql1
|     cmd.CommandType = adCmdText
|     cmd.Execute
|    
| (  **** successed******)
|
| in Osql:
|     exec sp_tables 't113';
|
|    table_owner     ..........
|   --------------------
|     sa
|
|
| Thanks
|
|

 
 
 

1. different between NT login and standard login in SQLServer **

Hi

I created an standard login and user and followed theses steps and there was no problem
and at result my created table belongs to 'user1'.
but in 2th try when I wnated to create a windows NT login and followed the 2th steps there
was a problem for me.this problem is : it shows at last step that my table belongs to 'sa' not to 'urezvani' which
created this table!!!!!!  but in 1th try there's no problem and it shows the table 't113' belongs to 'user1'
so, what's wrong here?

1th try  ----->    with success

in Osql:

    exec sp_addlogin 'login1'
    exec sp_adduser 'login1','user1','db_owner'

in VB:

     Set con = CreateObject("adodb.connection")
     Set rs = CreateObject("adodb.recordset")
     Set cmd = CreateObject("adodb.command")

   ' Connect to Database
    con.ConnectionString = "driver={SQL Server};server=parskhazar3;uid=login1;pwd=;database=productstock"
         con.Open

     sql1 = "create table t113(f1 char(1),f2 char(2));"
    cmd.ActiveConnection = con
    cmd.CommandText = sql1
    cmd.CommandType = adCmdText
    cmd.Execute

in Osql:
    exec sp_tables 't113';

   table_owner     ..........
  --------------------
    user1

2th try -----------> not my excepted result!!!!

in Osql:

    exec sp_addlogin 'khazar2.com\rezvani'
    exec sp_adduser 'khazar2.com\rezvani','urezvani','db_owner'

   successed

in VB:

     Set con = CreateObject("adodb.connection")
     Set rs = CreateObject("adodb.recordset")
     Set cmd = CreateObject("adodb.command")

   ' Connect to Database
    con.ConnectionString = "driver={SQL Server};server=parskhazar3;uid=khazar2.com\rezvani;pwd=;database=productstock"
         con.Open

     sql1 = "create table t113(f1 char(1),f2 char(2));"
    cmd.ActiveConnection = con
    cmd.CommandText = sql1
    cmd.CommandType = adCmdText
    cmd.Execute

(  **** successed******)

in Osql:
    exec sp_tables 't113';

   table_owner     ..........
  --------------------
    sa

Thanks

2. Looking for database selection criteria

3. SQL-Server Login using NT Login Name

4. Is MSDE the solution ?

5. NT Login Fails Becuase SQL Login Exists

6. easy stored procedure questions

7. ADO login uses windows login id

8. ADOX AutoNumber with Access

9. ODBC login uses default database for login

10. OEM login failure( invalid login credentials supplied)

11. QA login succeeds, EM login fails?!

12. Unattended Login ODBC-Login from VB4.0

13. SQL Mail: MAPI login test succeeds, actual login fails