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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 give access to a user in particular domain

Author  Topic 

vemulavijay
Starting Member

32 Posts

Posted - 2004-12-06 : 03:20:02
hi,

i have a system named sys1 in a workgroup named SX . it has sql server 2000 installed in it. i have another system named sys2 in a domain. It has sql client. i developed an application and installed in sys2 and trying to access sql sever of sys1.

it gives me an error message saying login failed for user 'null'.

do i have to give some access rights to a particular domain? if so what is the procedure. looking forward for help,

vijay.

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-12-06 : 03:30:38
how are you connecting? enterprise manager, query analyzer, via program?

--------------------
keeping it simple...
Go to Top of Page

vemulavijay
Starting Member

32 Posts

Posted - 2004-12-06 : 03:48:03
the application is developed in .NET. i am connecting it through program using connection string. if the computer is in the same workgroup it works fine. but if application is installed in computer in another domain, if pops the above mentioned error.

vijay.
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-12-06 : 04:17:15
ask your netadmin to establish the trust between the domains, this might be a firewall issue.

--------------------
keeping it simple...
Go to Top of Page

vemulavijay
Starting Member

32 Posts

Posted - 2004-12-06 : 16:44:56
Jen, Thank you for all. My server is in a workgroup(not Domain)'X'. My application is in a network user on different Domain 'Y'. Can I establish Trust Relationship between them. If so please guide us to do this.

Will my application work after doing this.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-12-06 : 16:51:18
No you can not establish a trust relationship between a domain and a workgroup. You can't use Windows authentication with this setup.

Tara
Go to Top of Page

vemulavijay
Starting Member

32 Posts

Posted - 2004-12-06 : 16:56:46
Hi Tara, But We are using Mixed mode authentication. And we are providing the User Name and Password in the connection string. But still it is not working. Any Suggestion. Thanks for all.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-12-06 : 16:58:08
So are you using SQL authentication then in the connection string? If so, please post the connection string.

Tara
Go to Top of Page

vemulavijay
Starting Member

32 Posts

Posted - 2004-12-06 : 17:01:51

Our Connection string is as follows,

connection = new System.Data.SqlClient.SqlConnection();
connection.ConnectionString = "integrated security=SSPI;data source=myserver; persist security info =False;Trusted_Connection= yes;initial catalog=mydb; User id = myName; Password =mypwd;

This is working well if the both the computers are in the same work group. But in the above situations it is failing.

Vijay
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-12-06 : 17:04:05
So you are trying to use Windows Authentication which isn't going to work. You need to use SQL authentication instead. The part that makes it Windows authentication is integrated security=SSPI. I don't remember how to change it to be SQL authentication though.

Tara
Go to Top of Page

vemulavijay
Starting Member

32 Posts

Posted - 2004-12-06 : 17:10:10
Thank you Tara, I will try further.
Go to Top of Page

vemulavijay
Starting Member

32 Posts

Posted - 2004-12-06 : 17:27:50
I have tried with SQL Authentication mode this time which i found to be in the following form.

ConnectionString = "data source=myserver; persist security info =False;Trusted_Connection= yes;initial catalog=mydb; User id = myName; Password =mypwd;

But Still it does not work.

Praveen.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-12-06 : 17:29:46
Did you add the SQL account to SQL Server? Since it is not Windows authentication, the account must exist inside SQL Server.

Tara
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-12-06 : 17:47:12
If you do not want to use Windows Authentication, remove Trusted_Connection and Integrated Security settings from the connection string.
Go to Top of Page

vemulavijay
Starting Member

32 Posts

Posted - 2004-12-06 : 17:51:02
Tara,

No I do not think so. Can you guide me how to do it.

Praveen.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-12-06 : 17:56:52
Read up in SQL Server Books Online on how to create logins and users. If you want to do this from Query Analyzer, you'll need sp_addlogin, sp_grantdbaccess and possibly sp_addrolemember. From Enterprise Manager, you can do it in the Security section. And don't forget permissions!

Tara
Go to Top of Page

vemulavijay
Starting Member

32 Posts

Posted - 2004-12-06 : 18:04:38
Thank you very much Tara and Robvolk. It is working perfectly as have suggested. Thanks a lot once again.

Praveen & Vijay.
Go to Top of Page
   

- Advertisement -