SQL Error code

Get help on databases - MySQL, Oracle, Access, etc.
Post Reply
TheWall
Registered User
Posts: 23
Joined: 09 Mar 2004, 02:00
Location: Midrand
Contact:

SQL Error code

Post by TheWall »

Hi.

I am moving live DB to a new server. I have got the webpages and DB on the new server. Now im trying to create new data sources in "ODBC data source administrator". when i have typed in the username and password and specified SQL server authentication i get the following error:

"[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'webuser'. Reason: Not associated with a trusted SQL Server connection."

any ideas why the username and password is not excepted???

Can it be that it is not a trusted SQL Connection.

How do i get it a trusted connection?
Kronos
Moderator Emeritus
Posts: 4280
Joined: 28 May 2003, 02:00
Location: Azeroth
Contact:

Post by Kronos »

Make sure that there is a login specified for the user on the server under the security settings.
Image
TheWall
Registered User
Posts: 23
Joined: 09 Mar 2004, 02:00
Location: Midrand
Contact:

Post by TheWall »

Logins is specified... is there anywhere, where you can set trusted connections or something simmular?
Kronos
Moderator Emeritus
Posts: 4280
Joined: 28 May 2003, 02:00
Location: Azeroth
Contact:

Post by Kronos »

You're misinterpreting the error message. The Connection has nothing to do with the fact that the user can't log in, then you would get a "Can't connect to SQL Server" Message. The user simply can't login because the login properties for the user are not properly set up.

Do you run MSDE version or a full version of MS SQL Server?
In Which Tool do you Administer the DB?
Image
TheWall
Registered User
Posts: 23
Joined: 09 Mar 2004, 02:00
Location: Midrand
Contact:

Post by TheWall »

SQL 2000 full version. its running on Win 2003 server and "data sources (ODBC)"
Kronos
Moderator Emeritus
Posts: 4280
Joined: 28 May 2003, 02:00
Location: Azeroth
Contact:

Post by Kronos »

OK, Here's what you do.
Open Enterprise manager.
Make Sure that under your "SQL Server Group"->Security->Logins
There is a login specified for the user.
Then, Under the DB that you are using, Look In the "Users" if the user is specified there, and that it is set up to use SQL Server Authentication.
If you apply these changes and don't get any errors then the user should be correctly set up and you can continue.

Hope this helps. If not I'll Be back tomorrow. Let Me Know.
Cheers
Image
TheWall
Registered User
Posts: 23
Joined: 09 Mar 2004, 02:00
Location: Midrand
Contact:

Post by TheWall »

1: logins is specified.
2: Users is specified inder DB.

(How do you set users up for sql server authentication?)

tested it and still same error!

I found this site

http://www.winnetmag.com/SQLServer/Foru ... did=117684

almost at the bottom

"The "return value" of a COM object method is actually passed to the object as an implicit parameter, so it's technically possible for the object that appears to be the rvalue of an assignment statement to be left in any state following an error. ADO and most other MS COM objects explicitly set the return parameter to nothing on error by convention.

Further, it's possible for the called COM object to consider/manipulate the state of an existing object passed to it as the return parameter. There's a large body of MS sample source that creates a new object and then assigns it with the "return value" of a COM method; in many respects it makes good sense to allocate an object passed by reference as parameter on the caller's side.

If it was a VBS intrinsic data type, and the line errored, you're right, it would still store whatever value it had before it was used in the statement that errored. But realize the special value Nothing is actually an object, and not everything actually is as it appears to be.

Point being that your conjecture that this object might expose the connection string in a property is no more valid than my reference to an actual property, that would exist in [by convention] the unlikely event that an ADO object was created. Maybe the OP has other code that successfully creates the object, who knows? Clearly the information provided is incomplete. "

this doesnt make any sence to me... (new with SQL)

can it be the problem?
Kronos
Moderator Emeritus
Posts: 4280
Joined: 28 May 2003, 02:00
Location: Azeroth
Contact:

Post by Kronos »

If you open the properties dialog for the login you specified, you can choose between windows Authentication and SQL Server Authentication. Windows authentication may require a domain name (e.g. Domain\Username)
SQL Server authentication requires a username and password
Image
TheWall
Registered User
Posts: 23
Joined: 09 Mar 2004, 02:00
Location: Midrand
Contact:

Post by TheWall »

it is set on sql authentication
TheWall
Registered User
Posts: 23
Joined: 09 Mar 2004, 02:00
Location: Midrand
Contact:

Temporary solution

Post by TheWall »

Well we thinks the problem is the sql authentication... We are going to try and install it on a new server and as this machine is a crm server aswell. dont really have a solution but we are now in the proces of moving all the applications around to dedicated servers "SQL server machine" ex. so hopefully everything sorted after that
Post Reply