Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Friday, March 23, 2012

login failed for user (null)

Hi
I have .net app got this error below,
Connection failed: sqlstate:28000 sql server error: 18452 login failed for
user(null). reason: not associated with a trusted SQL server connection
Any ideas
thanksYour SQL Server Authenticaton could be Windows Authentication and a user
tries to connect using his\her SQL Server login.
Another possibility, that user might not be a member of your domain and
tries to connect to your SQL Server instance.
Ekrem nsoy
"mecn" <mecn2002@.yahoo.com> wrote in message
news:e45jDthJIHA.3516@.TK2MSFTNGP02.phx.gbl...
> Hi
> I have .net app got this error below,
> Connection failed: sqlstate:28000 sql server error: 18452 login failed for
> user(null). reason: not associated with a trusted SQL server connection
> Any ideas
> thanks
>|||Yeah, he's right. It's trying to connect with a windows acct that doesn't
have rights in the DB. Either give it rights, or switch to sql auth.
"mecn" wrote:

> Hi
> I have .net app got this error below,
> Connection failed: sqlstate:28000 sql server error: 18452 login failed for
> user(null). reason: not associated with a trusted SQL server connection
> Any ideas
> thanks
>
>|||Or the application is trying to connect using Windows Authentication when no
one is logged in, and it doesn't have a user context. I've seen this when
people set it up using Windows Authentication when they are logged in, and
expect it to work when no one is logged in.
--
Rick Byham (MSFT)
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sean McCown" <SeanMcCown@.discussions.microsoft.com> wrote in message
news:2EA9BABD-7F69-4758-BD14-A7809FAB6657@.microsoft.com...[vbcol=seagreen]
> Yeah, he's right. It's trying to connect with a windows acct that doesn't
> have rights in the DB. Either give it rights, or switch to sql auth.
>
> "mecn" wrote:
>|||Hmm.. Good point!
Thanks for sharing.
Ekrem ?nsoy
"Rick Byham, (MSFT)" <rickbyh@.REDMOND.CORP.MICROSOFT.COM> wrote in message
news:6E02C41D-1A5E-4A9A-9218-BC5BF1746759@.microsoft.com...
> Or the application is trying to connect using Windows Authentication when
> no one is logged in, and it doesn't have a user context. I've seen this
> when people set it up using Windows Authentication when they are logged
> in, and expect it to work when no one is logged in.
> --
> Rick Byham (MSFT)
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> "Sean McCown" <SeanMcCown@.discussions.microsoft.com> wrote in message
> news:2EA9BABD-7F69-4758-BD14-A7809FAB6657@.microsoft.com...
>

Wednesday, March 21, 2012

Login failed for user

Hi!

I need help about this error:

Server Error in '/' Application.

Cannot open database "Baza" requested by the login. The login failed.
Login failed for user 'BETA-SERVER\ASPNET'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: Cannot open database "Baza" requested by the login. The login failed.
Login failed for user 'BETA-SERVER\ASPNET'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[SqlException (0x80131904): Cannot open database "Baza" requested by the login. The login failed.Login failed for user 'BETA-SERVER\ASPNET'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734995 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +47 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.GridView.DataBind() +4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69 System.Web.UI.Control.EnsureChildControls() +87 System.Web.UI.Control.PreRenderRecursiveInternal() +41 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

How can I resolve this?

OR

How can I change user from BET-ASERVER\ASPNET in to BETA-SERVER\Developer (I created that in SQL Server menager, and set default base to "Baza" (That is the base that i need to connect to))

Thanks for all your help;

Sorry about bad english!

change your connection string to use explicit credentials:

Data Source=BETA-SERVER;Initial Catalog=baza;User Id=Developer;Password=************;"

|||

I am using Integrated Security:

Data Source=BETA-SERVER;Initial Catalog=Baza;Integrated Security=True;Pooling=False

any idea?

|||

integrated security means your connecting to sql using the current threads account which in your case is the "ASPNET" account.

you could give th ASPNET account [minimal] permissions to your database.

or you could change the threads security principle to another account. i.,e impersonation

Monday, March 12, 2012

Login Error

Hi

I am using MSDE2000 and ASP.NET. I have 3 data adapters and a dataset. When running the program I get:

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'CGREGORYT2XP\ASPNET'.

Source Error:
Line 257: If Not Page.IsPostBack Then
Line 258:
Line 259: SqlConnection1.Open()
Line 260:
Line 261: SqlDataAdapter1.Fill(Ds1, "employee")

I have used sp_grantdbaccess 'machinename\ASPNET' on PUBS but still get error.

Where am I going wrong??

Thanks

I pressume you have added a user to the SQL Server for CGREGORYT2XP\ASPNET and that the SQL server supports Mixed Mode authentication.

If not check you have a user by selecting "Security", "Logins" in Enterprise Manager you should see a user in the list called CGREGORYT2XP\ASPNET.

Wednesday, March 7, 2012

logical read

Hi

I am trying to tune a sql query. The query return about 300 rows of uniqueindentifier. But in the statistics IO, I see Logical reads of 7228, that does not seems right? I tried to rebuild the index, but the logical read did not help. But I set up the database on another computer, and the IO on this on came down to 10. Is there something wrong with the computer with logical read of 7228

thanks

Pauli

There may not be enough memory available to SQL Server, and the data cache is being flushed.

What is the memory/load differences between the two computers?

|||Are the indexes the same in both databases? It really sounds like you are missing an index in the first database. Even on a machine with memory pressure, that much of a difference in logical IO's points at an index or statistics problem. Are you seeing physical reads when you run the query in the first database?

Monday, February 20, 2012

Logging packages info

Hi!

I want to log package info like when the package starts and ends, and write info to a sql server table. there are of course many ways to do this. I just want some opinions from you if you have some clever ways to do this.

regards geir f

Have you looked at the provided logging capabilities? Right click the control flow, select Logging. We provide many logging types, including logging to SQL server.

Logging packages info

Hi!

I want to log package info like when the package starts and ends, and write info to a sql server table. there are of course many ways to do this. I just want some opinions from you if you have some clever ways to do this.

regards geir f

Have you looked at the provided logging capabilities? Right click the control flow, select Logging. We provide many logging types, including logging to SQL server.