Showing posts with label password. Show all posts
Showing posts with label password. Show all posts

Friday, March 9, 2012

Error Connecting To SQL 2005 through Webservice using SQL Authentication

Running a SQL 2005 Database under a Default instance. i.e. (SERVERNAME) and not (SERVERNAME/SQL2005)

I have a SQL Login sa password.

When I connect to SQL 2005 from anywhere other then the webservice it works fine.

In my webservice i am using System.Data.SqlClient.

SqlConnection, SqlCommand, SqlDataAdapter are being used to called a stored procedure and return the data into a System.Data.DataSet.

I get the following error when calling DataAdapter.Fill(dataSet);

{"TCP Provider: An existing connection was forcibly closed by the remote host.\r\n\r\nLogin failed for user 'sa'."}

I have no resolutions as of yet. Any help would be greatly appreciated.

Did you mean you can connect to the SQL2005 from anywhere with 'sa' login, except webservice? You can check the status of 'sa' login in management studio under Security->Logins, also make sure the Authentication Mode is SQL Server and Windows.|||

I have checked the status of the login for user "sa" and it has access rights and grant levels to everything it needs to.

I have also created a new account specifically for that database which does not work either. Same error.

And yes my SQL 2005 Instance is configured to use both SQL Authentication and Windows Authentication. (Mixed Mode).

Any Ideas?

|||

If you encountered this issue when you're trying to establish encrypted connection , you may take a look at this article:

http://blogs.msdn.com/sql_protocols/archive/2006/07/26/678596.aspx

Wednesday, March 7, 2012

Error connecting to database?

Hi Again,
I have MSDE on ASP1.1 on a PC and have a logon page that uses a stored procedure to check my auth_user table, if logon and password exist then it returns (1) else returns (0).
I used objparams.return to pick up the returned value and either server.transfer to opening page or label text message 'login not valid'. This is insde a try and the catch is another label, 'cannot connect to database'.
Running on my local PC all is fine, transferred SP and table to hosting server, along with web.comfig set to the host servername, uid, password and database. On the host server all errors messages are returned. I have created a connection in my VS7 database manager to the remote host and the same happens after amending my connection string to run on the remote server.
It clearly is the connection string, I am using the <appsettings> add Key to connect as I thought it would mean no change of coding in my pages when moving from Dev PC to Server. I have checked the hosting server setup and used the server name associated with the database (mssql3.securedc.com) , checked uid, password and database settings. Is there something I have missed like permissions, specific security settings on the host server (I have to go through a third party as the hosting is done through a friend of my client)??
Many thanks
Earle
EJW--
Regarding this...

EJW wrote:

...It clearly is the connection string...


...you might want to checkhttp://www.ConnectionStrings.com to make sure you are using the right format.
Furthermore, usually in shared hosting environments, one cannot use "Integrated Security"; so, make sure about that.
Can you post the connection string here?
|||The string is
<add key="strConn" value="server=mssql3.securedc.com;uid=fleetwo_admin;password=XXXXXXXX;database=fleetwo_erfp" />
Should I use uid=sa ? I don't have a password for it.
I am unsure if the problem is in the connection or the deployment. I can find very litttle information on deployment, but basically I have put all my aspx file into my root, the dll files into bin. Should there be files elsewhere (client_ dir?).
I am building the project using my web.config file as that has paths for my PC, and this is different to the web.config file used on the remote server. Can this be an issue?
As a general question, not to you personally:- I made an assumption, probably wrong, that the web.config file was outside the build so that you could deploy on different servers. The .NET product is really useful, but I am finding getting really basic information hard to find, any tutorials on deployment around?
Many thanks
Earle

Friday, February 24, 2012

Error changing SA password

I'm getting the following error when trying to change the
SA password for SQL Server2000 (SP3).
"Error 21776:[SQL_DMO]The name 'dbo' was not found in the
Users collection. If the name is a qualified name, use []
to separate various parts of the name, and try again"
I can't seem to connect under the old or the new
password. Any help would be appreciated.
Thanks
RonAre you a domain admin..? If so connect to SQL via Query Analyser using
Windows Authentication. Then issue the following :-
Examples
A. Change the password of a login without the former password
This example changes the password for the login Victoria to ok.
EXEC sp_password NULL, 'ok', 'Victoria'
--
HTH
Ryan Waight, MCDBA, MCSE
"Ron" <rgowdy@.phcs.com> wrote in message
news:18c201c38695$637b2610$a001280a@.phx.gbl...
> I'm getting the following error when trying to change the
> SA password for SQL Server2000 (SP3).
> "Error 21776:[SQL_DMO]The name 'dbo' was not found in the
> Users collection. If the name is a qualified name, use []
> to separate various parts of the name, and try again"
> I can't seem to connect under the old or the new
> password. Any help would be appreciated.
> Thanks
> Ron|||Just to add to Ryan's reply, you can change the password
with Query Analyzer but you will still have the issue of a
dbo being mapped to a non-existant login - that's what
causes the error. You should still update your databases
using sp_changedbowner so that they are owned by logins that
exist on the server.
-Sue
On Mon, 29 Sep 2003 07:24:27 -0700, "Ron" <rgowdy@.phcs.com>
wrote:
>I'm getting the following error when trying to change the
>SA password for SQL Server2000 (SP3).
>"Error 21776:[SQL_DMO]The name 'dbo' was not found in the
>Users collection. If the name is a qualified name, use []
>to separate various parts of the name, and try again"
>I can't seem to connect under the old or the new
>password. Any help would be appreciated.
>Thanks
>Ron|||I believe Sue is on the money here. See the link below
http://www.google.com/groups?selm=utApDPZeDHA.2080%40TK2MSFTNGP12.phx.gbl&oe=UTF-8&output=gplain
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--
"Ron" <rgowdy@.phcs.com> wrote in message
news:18c201c38695$637b2610$a001280a@.phx.gbl...
> I'm getting the following error when trying to change the
> SA password for SQL Server2000 (SP3).
> "Error 21776:[SQL_DMO]The name 'dbo' was not found in the
> Users collection. If the name is a qualified name, use []
> to separate various parts of the name, and try again"
> I can't seem to connect under the old or the new
> password. Any help would be appreciated.
> Thanks
> Ron