Login Error After Automatic Failover

Nov 29, 2006

I have setup a mirror configuration with a witness to be able to use the automatic failover. The principal is DBSP01, the mirror is DBSP02 and the witness is DBSP03. I have an application running an DBCP01. When the mirroring is working, the application can connect to the database on DBSP01. I disconnect dbsp01 from the network, so that DBSP02 becomes the principal. When I try to connect the application to the database on DBSP02, the login fails. Whithout the mirroring I was able to logon to DBSP02, but as soon as it is part of the mirroring, I'm not able to connect to it anymore, whatever the state of the database is. What could be the problem? Can anybody help?

Remco

View 2 Replies


ADVERTISEMENT

Automatic Failover

May 25, 2008

Hi there,
I am testing the db mirroring, making sure it will auto failover. I've stopped the SQL services on my principal and then I looked at the mirror db is says it's restoring. It stayed like that for 10 min before I enabled the mirroring again. Anyone knows why it's not failing over??????


Here's my setup: SQL 2005 Standard, Server 1 Principal, Server 2 Mirror & Witness.

View 4 Replies View Related

Automatic Failover... Help

Jan 25, 2007

Hi there,

We've recently set up a Principle, Mirror and Witness configuration with the Mirror and Witness in a separate building to the Principle. All three are part of the same domain (DMZ) and are different servers, the buildings are connected via a fiber optic cable. All servers and SQL Server instances are logged in with the same domain admin account DMZesAdmin.

Mirroring is all set-up and the databases are synchronized. Every once in a while some (not all, normally 6 out of 15) databases will switch roles and become active on the mirror. The SQL Server mirroring monitor job then reports:

Date  25/01/2007 12:37:01
Log  Job History (Database Mirroring Monitor Job)

Step ID  1
Server  DMZSQL01
Job Name  Database Mirroring Monitor Job
Step Name  
Duration  00:00:02
Sql Severity  16
Sql Message ID  32038
Operator Emailed  
Operator Net sent  
Operator Paged  
Retries Attempted  0

Message
Executed as user: DMZesadmin. An internal error has occurred in the database mirroring monitor. [SQLSTATE 42000] (Error 32038).  The step failed.

I have no idea, what causes the failover, it could be a slow network or a bad set-up, can anyone give me some ideas of what to do to track down the problem or any experience of what could be causing this, it happens randomly every day or three. No warning and if I go to the mirror and failover back to the principle again then it's all just fine. However I don't want half my databases working on 1 server and half on the other.

Any ideas?

Thanks
Ed



 

UPDATE:

I've just been looking at the logs on my Mirror and at the same time it reports in this order

Error: 1479, Severity: 16, State: 1.

The mirroring connection to "TCP://DMZSQL01.dmz.local:5022" has timed out for database "WARCMedia" after 10 seconds without a response.  Check the service and network connections.

Database mirroring is inactive for database 'WARCMedia'. This is an informational message only. No user action is required.

Recovery is writing a checkpoint in database 'WARCMedia' (41). This is an informational message only. No user action is required.

The mirrored database "WARCMedia" is changing roles from "PRINCIPAL" to "MIRROR" due to Failover.

Database mirroring is inactive for database 'WARCMedia'. This is an informational message only. No user action is required.

...

 

This looks like a time out, is there any way to set the TimeOut threashold for Database mirroring or set retry intervals??

View 5 Replies View Related

Automatic Failover Problem

Sep 7, 2007

Setup Configuration:

3 servers
- PRINCIPAL IP: 10.2.5.31 - DNS Lookup: db-server-2.mosside.choruscall.com
- MIRROR IP: 10.2.5.30 - DNS Lookup: sql-mirror.mosside.choruscall.com
- WITNESS ip: 10.2.5.32 - DNS Lookup: sql-witness.mosside.choruscall.com

Each Server is running Windows Server 2003 Enterprise Edition with SQL Server 2005 Enterprise Edition.
All server instances are enabled for remote connections(By default they are not).
All servers have the flag 1400 traceon and have been restarted.
PORT 5022 is unrestricted on network.

The server instances are connecting via certificates. Each server has an endpoint for the certificates to to connect on.


Certificate Setup Proceedure:

Principal_Host:

1. Create Master Key with Password

2. Create certificate with subject

3. Create endpoint for certificate (Listener_Port = 5022, Listener_ip = all)
to connect on for database_mirroring

4. Backup Certificate (principal_cert.cer)

5. Take backed up certificate to Mirror_Host

(Reapeat Steps 1-5 for Witness and Mirror)


Mirror_Host: Create Certificate on Mirror_Host for inbound connections from Principal:

6.(On Mirror_Host) Create Login for Principal using same password in step 1 (principal_login)

7. Create user for login just created. (principal_user)

8. Create local certificate for Principal on Mirror using certificate generated by principal.

ex: Create Certificate Principal_cert Authorization Principal_user FROM FILE='c:principal_cert.cer'

9. (If an endpoint has been created already on the mirror)Grant connectiion to the login:

ex: Grant connect on endpoint::mirror_endpoint to principal_login

Repeat Steaps 6-9 for Principal and Witness Servers accordingly.


10. Import Database to SQL Server 2005 Principal Instance

11. Backup Database to disk with format

12. Backup Database log file to disk with format

13. Copy backups to mirror

14. Restore Database and log file with norecovery on Mirror_Host

15. Configre Database for Database Mirroring on Principal Server

There are two ways to do this. Via the wizzard or via the Transact-SQL window.
Using the wizzard appears to work since I started using FQDN.

PROBLEM:

After configuration, everythig appears to be correct. That is, the principal displays
that it is the principal and it is synchronized with the mirror. The mirror also displays that it is the
mirror and it is synchronized with the principal and it is in recovery. If I failover manually, the mirror
becomes the principal and the principal becomes the mirror (They form a quarum). If I disconnect the principal
from the network, the mirror is supposed to form a quarum with the witness and promote itself to principal status.
This is not what is happening. The witness recognizes that the principal is down and logs that info into its log file.
The Mirror attempts to contact the witness but cannot log onto the machine. The Mirror Logs the following:

Error: 1438, Severity: 16, State: 2.
The server instance Witness rejected configure request; read its error log file for more information.
The reason 1451, and state 3, can be of use for diagnostics by Microsoft.
This is a transient error hence retrying the request is likely to succeed.
Correct the cause if any and retry.




<<<<<<<MIRROR SERVER >>>>>>>>

2007-09-06 15:08:45.32 spid23s Error: 1438, Severity: 16, State: 2.
2007-09-06 15:08:45.32 spid23s The server instance Witness rejected configure request; read its error log file for more information. The reason 1451, and state 3, can be of use for diagnostics by Microsoft. This is a transient error hence retrying the request is likely to succeed. Correct the cause if any and retry.
2007-09-06 15:09:05.32 spid23s Error: 1438, Severity: 16, State: 2.
2007-09-06 15:09:05.32 spid23s The server instance Witness rejected configure request; read its error log file for more information. The reason 1451, and state 3, can be of use for diagnostics by Microsoft. This is a transient error hence retrying the request is likely to succeed. Correct the cause if any and retry.
2007-09-06 15:09:25.33 spid23s Error: 1438, Severity: 16, State: 2.
2007-09-06 15:09:25.33 spid23s The server instance Witness rejected configure request; read its error log file for more information. The reason 1451, and state 3, can be of use for diagnostics by Microsoft. This is a transient error hence retrying the request is likely to succeed. Correct the cause if any and retry.
2007-09-06 15:09:45.34 spid23s Error: 1438, Severity: 16, State: 2.
2007-09-06 15:09:45.34 spid23s The server instance Witness rejected configure request; read its error log file for more information. The reason 1451, and state 3, can be of use for diagnostics by Microsoft. This is a transient error hence retrying the request is likely to succeed. Correct the cause if any and retry.
2007-09-06 15:10:05.35 spid23s Error: 1438, Severity: 16, State: 2.
2007-09-06 15:10:05.35 spid23s The server instance Witness rejected configure request; read its error log file for more information. The reason 1451, and state 3, can be of use for diagnostics by Microsoft. This is a transient error hence retrying the request is likely to succeed. Correct the cause if any and retry.
2007-09-06 15:10:25.36 spid23s Error: 1438, Severity: 16, State: 2.



<<<<<<< WITNESS SERVER >>>>>>>>

2007-09-06 14:19:55.90 spid52 The Database Mirroring protocol transport is now listening for connections.
2007-09-06 15:07:11.64 spid24s Error: 1479, Severity: 16, State: 1.
2007-09-06 15:07:11.64 spid24s The mirroring connection to "TCP://db-server-2:5022" has timed out for database "APS_SQL_DEV" after 10 seconds without a response. Check the service and network connections.
2007-09-06 15:07:43.20 Server Error: 1474, Severity: 16, State: 1.
2007-09-06 15:07:43.20 Server Database mirroring connection error 4 '64(The specified network name is no longer available.)' for 'TCP://db-server-2:5022'.
2007-09-06 15:08:06.03 spid9s Error: 1474, Severity: 16, State: 1.
2007-09-06 15:08:06.03 spid9s Database mirroring connection error 2 'Connection attempt failed with error: '10060(A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)'.' for 'TCP://db-server-2:5022'.

View 4 Replies View Related

Automatic Failover Failure

Nov 27, 2006

Hello,

we're running a mirrored database with High Availability for Automatic failover including a Witness instance for a web application.

When doing a manual failover on the database in Management studio, the roles are switched correctly and the database is in "Principal, Synchronized" and "Mirror, Synchronized/Restoring" mode. The web application has no problems switching servers by using client failover with the jdbc driver. There is no problem accessing the database with Management Studio.

However, if we stop the SQL service on the Principal server the role is automatically failed over to the Mirror server by the Witness. The database is then in the mode "Principal, Disconnected" which should be fine. However, accessing the database from the web application or with Management Studio yields some strange results. It is not possible to write to the database, and reading from the database works inconsistently (the web application seems like it can do it, but not from the Management Studio).

Starting the SQL service on the former Principal server makes the database go into mode "Mirror, Synchronizing/Restoring" and "Principal, Synchronizing". And it will stay that way indefinitely. There are not that many updates/transactions made to the database that can make it stay in this state, especially if you can't write to the database in the first place.

The next step taken after being stuck in this state is to stop the SQL service on the Mirror (former Principal), restart the service on the Principal (former Mirror). Accessing the database now works. The database is in mode "Principal, Disconnected". Starting the SQL service on the Mirror (former Principal) makes the database go into the normal "Principal, Synchronized" and "Mirror, Synchronized/Restoring" mode. Access to database is normal.

The same erroneous behaviour can be observed by unplugging the network cable on the Principal server, so it seems like we can only get a smooth transition by doing a manual failover.

Any ideas on what might be the problem? Has anybody experienced a similar situation?

View 6 Replies View Related

Recovery :: AG Automatic Failover Using FCI

Jun 24, 2015

I'd like to understand why it is not possible to automatic Failover Availability Groups using Failover Cluster Instances. I think it would be great for DR and HA. Do you understand why that limitation exists?

The link [URL] ....

SQL Server Failover Cluster Instances (FCIs) do not support automatic failover by availability groups, so any availability replica that is hosted by an FCI can only be configured for manual failover.

View 4 Replies View Related

Availability Group Not Ready For Automatic Failover

Dec 21, 2014

I am getting alerts as Availability group not ready for automatic failover , how to check and resolve the issue ?

How to check the databases status whether they are in sync unsync in High availability ?

View 6 Replies View Related

3 Node 2014 AlwaysOn - Automatic Failover?

Jun 30, 2015

I have a 3 node 2014 AlwaysOn setup. The primary and secondary are set for automatic failover. The third node, of course, is manual (until 2016). The 2 nodes with are automatic are sitting in one datacenter, the third is in another. If the first datacenter was to go down, I would manually have to failover to the third node? What's the normal process here for having two datacenters and ensuring the availability group is always available?

View 3 Replies View Related

How Best To Tackle Logins With SQL Authentication After Automatic Failover

Aug 8, 2007

In an sql authentication environment with an automatic failover in database mirroring how to you manage new logins which have been created on the principle since the start of mirroring? Since the master cannot be mirrored, and the mirror database cannot be read during mirroring (except as a snapshot) in order to find the missing logins, I assume that only after failover a script should run to create the new logins and then run sp_change_users_login . The qestions are:

1) should the script create a new login first and then run sp_change_users_login with option update_one , or should sp_change_users_login using option

Auto_Fix create the missing logins?














2) But what is the password of these users? is it initially NULL , as a consequence of sp_change_users_login? What about the SIDs?

3) Or should we bypass sp_change_users_login altogether and use






CREATE LOGIN <loginname> WITH PASSWORD = <password>, SID = <sid for same login on principal server>,...as described in http://blogs.msdn.com/chadboyd/archive/2007/01/05/login-failures-connecting-to-new-principal-after-failover-using-database-mirroring.aspx



4) What is the event that would trigger this script to run after the aitomatic failover ?

Is there a definitive MIcrosoft agreed apon and recommended method to tackle this?



View 3 Replies View Related

SQL 2012 :: AlwaysOn Local HA With Second Site Automatic Failover

Apr 3, 2014

I'm looking for a solution to have cross data center automatic failover in the event of a data center loss for highly critical databases. I would like to have local HA and also automatic failover to the DR site. This does not seem possible with AlwaysOn.

Is my only option for automatic cross data center failover to build a node in one data center and a node in the other data center with a node/FS at a third data center in order to maintain quorum? I'd like to have local HA in the mix but that doesn't seem possible.What pattern for the highest data security and also availability?

View 5 Replies View Related

SQL 2012 :: Availability Group Is Not Ready For Automatic Failover

Dec 19, 2014

how to resolve and trouble shoot the availability group is not ready for automatic failover in sql2012

View 4 Replies View Related

SQL 2012 :: Conditions Required For Automatic Failover On AlwaysOn?

Oct 27, 2015

An automatic failover set exists. This set consists of a primary replica and a secondary replica (the automatic failover target) that are both configured for synchronous-commit mode and set to AUTOMATIC failover.Configured the both AG Group database automatic failover and synchronous-commit mode.But automatic Failover failed also Cluster service not started automatically at Node2. It got connected through AO Listerner after starting Node1. As below SQL Error log during shutdown Node1

Date,Source,Severity,Message
10/27/2015 10:44:20,spid37s,Unknown,AlwaysOn Availability Groups: Waiting for local Windows Server Failover Clustering node to come online. This is an informational message only. No user action is required.
10/27/2015 10:44:20,spid37s,Unknown,AlwaysOn Availability Groups: Local Windows Server Failover Clustering node started.

[code]....

what need to be change existing AO configuration?

View 9 Replies View Related

Getting E-mail Notification After Mirrored Database Automatic Failover

Jul 12, 2007

Hello,

I am a C++/C# developer my SQL skills are very limited.
I have a database set up for mirroring and I would like to get an e-mail notification whenever an Automatic Failover occurs. Can anyone show me how to do this using SQLServer 2005? Please provide T-SQL script sample if possible!



Thanks,



-Agustin

View 7 Replies View Related

SQL Native Client Automatic Failover Only Works When Both Servers Are Plugged In

Dec 9, 2006

I have setup a database mirroring session with witness - MachineA is the principal, MachineB is the mirror, and MachineC is the witness. Each SQL Server instance is hosted on its own machine. The mirroring is working correctly. If I submit data to the database on MachineA, and then unplug the network cable on MachineA, MachineB automatically becomes the principal, and I can see the data that I originally submitted to MachineA on MachineB. All the settings are showing correctly in Management Studio.

My issue is with the SQL Native Client and a front-end application that needs to make use of this database. I have setup my front-end application to use the ODBC client and specified the failover server in both the ODBC setup and the connection string. Here is the connection string that I am using :

Provider=ODBC;Database=master;DSN=MachineA;Failover Partner=MachineB;

Everything works perfectly on my front-end application when MachineA is the principal. If I unplug the network cable on MachineA, MachineB becomes the principal, and the failover occurs correctly on the database side. The problem is that my front-end application is not able to query the database on MachineB.

BUT - if I plug the network cable back in on MachineA (making the database on MachineA the mirror), the front-end application now works and can access the principal database on MachineB. I wrote a quick tester application to verify what I am seeing, and I am convinced that this is what is happening. The mirroring is working perfectly, and everything is setup correctly. The SQL Native Client is setup correctly. The problem is that the automatic failover to MachineB that is built into the SQL Native Client only works if both servers are plugged in.

In this scenario, when I plug both servers in, I know that the front-end app is definitely pulling from MachineB (since the mirror database on MachineA is in recovery mode, it's unavailable, and the front-end app displays the server that it is pulling data from).

Am I using an out-dated SQL Native Client? The version number displayed in the ODBC configuration page is 2005.90.2047.00, and is dated 4/14/2006. Has anyone experienced this issue? I'm guessing that it's a problem in the SQL Native client, since the mirroring really seems to be working correctly.

Thanks,

Bill

View 13 Replies View Related

Replication :: Server 1 And Server 2 In Mirroring Relationship With Automatic Failover

Sep 24, 2015

I'm looking at a setup where they have server1 and server2 in a mirroring relationship with automatic failover. 

Server1 is the principalThey are using transactional replication to replicate asingle databse to server3 is AWS.Distribution database is on Server1All Agents (log reader, snapshot, distributor) run on Server1Server2 has not been set up for replication...My understanding is that in this set up you would normallly place the distribution database on a separate server and enable publication on the mirror, Server2.

What happens if they failover? Replication would stop, and presumably records added while the mirror is the active database would not be marked for replication?How would they recover?  Failback and reinintialize

View 3 Replies View Related

RS - Automatic Login - Pass Parameter

Oct 23, 2007

I'm relatively new to this Reporting Services stuff and am struggling to find a solution to my problem.
Basically, my client has a asp (classic) application and has asked me to integrate it with MS RS. Basically the app has 1000's of individual users who are grouped into "Clients".

Now what I had in mind was something like this.
A user clicks on a link (or button) in the asp app. Behind the scenes this passes through to an asp.net app. The .Net app would automatically log in to reporting services (as some generic user). I would also need to pass through a parameter "Client ID" so when viewing reports etc, the user could only see the data relating to the client they belong to.

If someone could tell me:
1 - If this is possible or am I wasting my time???
2 - Point me in the right direction. If you know of any articles which cover this, that would be fantastic. I haven't managed to find any.

Thanks very much.

View 7 Replies View Related

Cannot Login To Failover Database.

Nov 13, 2007

I setup a mirrored database with a witness server. I can login to the database just fine when I set it up.
The servers are in Active Directory but the account "rps" is an SQL account.

When I failover the database for testing, I cannot login to the mirrored database even though it is now the princpal database and it is syncronized.

Here are the errors I receive.

11/13/2007 15:05:13,Logon,Unknown,Login failed for user 'rps'. [CLIENT: 172.23.10.118],
11/13/2007 15:05:13,Logon,Unknown,Error: 18456<c/> Severity: 14<c/> State: 16.,


Any idea on how to fix this?

View 9 Replies View Related

Login Failed Connecting To New Principal After Failover

Jan 2, 2007

Hello,

I have setup database mirroring on two Windows 2003 R2 x64 servers using SQL Server 2005 SP1 Developer Edition. Our application is connecting to SQL Server using a SQL Server login. The application is using ADO and SQL Native Client to connect to the server. After a failover, our app attempts to reconnect to the database. The reconnect fails with the error:

Cannot open database "db1" requested by the login. The login failed.

The login is not associated with a user in the new principal database. I run sp_change_users_login to reconnect the user and login. sp_change_users_login says that it fixed 1 orphaned user. Our app then reconnects successfully.

I have tried several failovers, and each time I see the same behavior. The association between the login and user gets lost.

The issue is definitely with the login. I tried using sa to connect to the database, and then our app was able to reconnect after a failover.

Is this a known issue with database mirroring? Is it fixed in SP2?

Thanks,

Heather

View 3 Replies View Related

Error: Cannot Open Database Requested In Login 'projectAllocations'. Login Fails. Login Failed For User 'sa'.

Oct 27, 2004

Hi,
Im getting this error when attempting to retrieve data from an sql database.

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 requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'.

Source Error:


Line 13: objConn = New SqlConnection( "Server=LAB303-066NETSDK; Database=projectAllocations; User ID=sa;Password=mypassword")
Line 14: objCmd = New SqlCommand("SELECT * FROM project_descriptions", objConn)
Line 15: objConn.Open()
Line 16: objRdr = objCmd.ExecuteReader()
Line 17: While objRdr.Read()

Source File: C:finalyearproject2sample.aspx Line: 15



Please Help!! Im a beginner to this, so if anyone knows the answer, take baby steps when explaining. Thanks

View 3 Replies View Related

SQL Server Admin 2014 :: AlwaysOn Failover Cluster Session Failover

Oct 29, 2015

1. Once fail over to secondary replica, what will happen to connected session in primary node? can the session fail over to secondary seamlessly or need to re-login. what happen committed transactions which has not write to disk.
2. Assume I have always on cluster with three nodes, if primary fails, how second node make write/ read mode.
3. after fail over done to 2nd secondary node what mode in production(readonly or read write).
4. how to rollback to production primary ,will change data in secondary will get updated in primary.

View 5 Replies View Related

No Failover And Client Crashes ODBC DSN Setting For Failover In Connection String

Mar 3, 2007

We have set up Mirroring with a witness server and everything works fine when we failover from the SQL Management console.

However, if we failover when our Maccola client is connected, the client blows up - clearly because it can no longer connect to the database.

The ODBC DSN used by the Maccola client shows a checkbox for the 'select a failover server' but the checkbox is grayed out.

Also the summary of settings for the DSN at the end of the wizard reveals that the failover to server (y/N) option is set to N.

The default setting for this DSN is 'populate the remaining values by querying the server' but it doesn't appear to be getting the settings for failover from the server or any other interactive DSN settings either. The server is clearly set for mirroring.

Another suspicious item is that the DSN cannot connect to the server with SA permissions, even though the server is set to mixed security and we use the correct authentication.

Is it possible that the client MACHINE is not authenticating with the domain or sql server properly. We are logged into the client with the domain account that is the SQL admin account on the sql server box.

We should be able to interact with the sql server settings through the ODBC DSN on the client shoulnd't we?

Are we missing a service pack on the client?

Thanks,

Kimball

View 1 Replies View Related

Recovery :: AlwaysOn Failover Cluster And Active Sessions Failover Scenario

Oct 29, 2015

1. In alwaysON fail over cluster, Once fail over to secondary replica, what will happen to connected session in primary node? can the session fail over to secondary seamlessly or need to re-login. what happen committed transactions which has not write to disk.

2. Assume I have always on cluster with three nodes, if primary fails, how second node make write/ read mode.

3. After fail over done to 2nd secondary node what mode in production(readonly or read write).

4. How to rollback to production primary ,will change data in secondary will get updated in primary.

View 3 Replies View Related

Error String: Cannot Open Database Requested In Login 'XXXXXXXXXXX'. Login Fails.

Feb 29, 2008

Hi All

I am getting below error while


Error string: Cannot open database requested in login 'XXXXXXXXXXX'. Login fails.


what is possible casue for above problem.

View 5 Replies View Related

Cannot Open Database QuoteSystem Requested By The Login. The Login Failed.-ERROR!!

May 14, 2008

Cannot open database "QuoteSystem" requested by the login. The login failed.Login failed for user 'NT AUTHORITYNETWORK SERVICE'.
Last time I recieved this error I had to add ASPNet, NTAuthority, and myWebSiteUsers USERS under the database properties-->permissions setting for the specific database I am trying to access with the website but this database(QuoteSystem) does not lists any of these objects so I can add them. Does anybody know what I have to do to fix this?
I am using SQL Server 2005.

View 7 Replies View Related

Cannot Open Database Northwind Requested By The Login. The Login Failed............. ERROR

Aug 10, 2005

Please, can anyone tell me why I am getting the undermentioned error message when I develop my application as an IIS Site in Visual Web Developer 2005 Express ? I have already developed and successfully tested it as a 'FileSystem Web Site' .I am using SQLSErver Express 2005 edition and have which I have installed along with the Northwind database as per the download instructions. My IIS software is version 5.1 which I have checked and it is configured to allow Integrated Windows Authentication. the relevant code is (1) web.config file connection strings 
<connectionStrings>
<add name="NorthwindConnectionString"
connectionString="Data Source=.sqlexpress;Initial Catalog=Northwind;Integrated Security=True"
providerName="System.Data.SqlClient"/>
</connectionStrings>(2) the grid view control and sqldatasource 
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="CategoryID"
DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="CategoryID" HeaderText="CategoryID" InsertVisible="False"
ReadOnly="True" SortExpression="CategoryID" />
<asp:BoundField DataField="CategoryName" HeaderText="CategoryName" SortExpression="CategoryName" />
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT [CategoryID], [CategoryName], [Description] FROM [Categories]">
</asp:SqlDataSource>This is the full error message and details: 
Server Error in '/sqlservertest' Application.


Cannot open database "Northwind" requested by the login. The login failed.Login failed for user 'JERRY-3C9615BAAASPNET'. 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 "Northwind" requested by the login. The login failed.Login failed for user 'JERRY-3C9615BAAASPNET'.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 "Northwind" requested by the login. The login failed.
Login failed for user 'JERRY-3C9615BAAASPNET'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +684883
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +207
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1751
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +32
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +601
System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +159
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +346
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +445
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +304
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
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) +1837
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +129
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) +1787


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

View 1 Replies View Related

Application Failover Error

Nov 1, 2006

We currently have a system that uses sql server 2005 mirroring. In testing the application, we fail over the database in the middle of a 2.0 .NET web application. The failover partner is specified in the connection string.
The next request to the web server results in an error page popping up with the message "A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)"
This message only occurs for the first request to the web server, all subsequent requests sucessfully access the new failed over database.
Thanks for any suggestions.

View 6 Replies View Related

Error With Linked Server After Failover

Feb 22, 2007

Hi all,

The following query that uses a linked server is giving me the error message below after I initiate a failover (ALTER DATABASE Northwind SET PARTNER FAILOVER). I have SQL Server 2005 SP2. I think that without the service pack there is another error too.

The query is run from a database other than northwind of course.
select * from DualLink.northwind.dbo.Test1


Please note that:
without a failover it works perfectly
it always work if I try to run it a second time - only the first time it fails.
it fails the first time for each of the open connections. A new connection that was open after the failover will work fine.


A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)

The linked server is defined as

EXEC master.
dbo.sp_addlinkedserver
@server = N'DualLink',
@srvproduct=N'',
@provider=N'SQLOLEDB',
@catalog=N'northwind',
@provstr=N'Server=(local);FailoverPartner=MyIPAddr;'

EXEC master.dbo.sp_addlinkedsrvlogin
@rmtsrvname = 'DualLink',
@useself = false,
@locallogin = 'sa',
@rmtuser = 'sa',
@rmtpassword = 'MyPwd'

Thanks,
Avi

View 1 Replies View Related

Error After Db Failover If Client App Already Connected To Db

Apr 7, 2008

The following looks very much like the problem reported for the JDBC driver.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=688897&SiteID=1
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=191767

----------------------------

I've written a small VB .Net app using Visual Studio 2005 to test mirroring from the client's perspective.

I have a button that does the following: 1) opens a connection to a sql 2005 database (SP2), 2) uses the connection, 3) closes the database connection.

After running this code, but while the client app is still running, I failover the database to the failover partner.

When click my button again, I get the following error: "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)". Checking the Event log on what is now the mirror, I see a string of "18456 Login failed for user 'testuser'"

If I close the app and launch it again, it does the right thing (and connects to the new primary). Also, instead of closing/re-opening the app, if I wait long enough (e.g. 10 minutes), then try again, it connects successfully to the new primary. Finally, instead of closing/re-opening the app if I tweak the connection string (e.g. change the application name) then try to connect again, that also works.

Based on articles I've read online, I've disabled the connection pool in my connection string, but that didn't solve my problem (although I'm getting a different error than if pooling is on).

Here is the connection string I am using:

Data Source=DB1PACS,12345;Failover Partner=DB2PACS,12345;Pooling=False;Initial Catalog=PACSTest_Client;Integrated Security=No;User ID=testuser;Password=*****

Here is the code snippet that I run before and after the failover. Based on the fact that I'm not using Pooling, the ClearAllPools() if overkill. Any help would be appreciated; I've been researching this for days without luck.

I can keep clicking the button that runs this code, and it keeps failing. If I wait long enough (e.g. 10 minutes) and then click the button again, it works. Or I could quit/restart the app, or tweak the connection string.

Dim TestClient_Connection As New SqlClient.SqlConnection(txtConnectionString.Text)

If Me.DataGridView1.Rows.Count > 0 Then Me.Test_ClientDataSet.Clear()

Try

TestClient_Connection.Open()

Me.User_TTableAdapter.Connection = TestClient_Connection
Me.User_TTableAdapter.Fill(Me.Test_ClientDataSet.User_T)

TestClient_Connection.Close()
TestClient_Connection.Dispose()
SqlConnection.ClearAllPools()

Catch sqlex As SqlClient.SqlException

txtErrorMessage.Text = "Error State: " _
+ sqlex.Errors.Item(0).Number.ToString _
+ " Message: " + sqlex.Message

End Try


Similar to the JDBC driver article I mentioned, when using the connection string above (where DB1 is the principal and DB2 is the failover partner) if DB2 is the actual principal when I initially query and close the database connection, then after failover to DB1 my application reconnect just fine.


Thanks

View 8 Replies View Related

Recovery :: Error When Setting Up Failover Cluster

Aug 26, 2015

I'm getting the following error when I go to create a cluster in the Failover Cluster Manager in Windows Server 2008.

"The address 10.10.10.111 is not valid for its associated network"

I'm following the instruction in the book for the 70-462 exam.  There was a step that had me create a DNS A record for the address sql-cluster.contoso.com.  The IP address was mapped to 10.10.10.111.  I'm not sure if this is the culprit but its the only time I used that IP address in the setup.

Below are 2 screenshots.  The first screenshot is the error.  The second screenshot is my DNS console.

View 7 Replies View Related

SQL 2005 High Protection Failover Error

Oct 4, 2007

Hi

I am experiencing a problem while performing failover testing on 2005 Standard.
I have an application which uses an ODBC connection SQL Native Client with a failover partner.

The following is the series of events that cause the problem. I am using a domain admin account whilst testing which has a server login on both servers with the same privileges.

Server A (Principle)
Server B (Mirror)
**Application can connect**

Manual failover

Server A (Mirror)
Server B (Principle)
**Application can connect following a restart**

Server A is switched off

Server B (Principle, disconnected)
**Application continues working**

***restarting the application the following error occurs***

€œConnection Failed
SQLState 08001
SQL Server Error 53
[Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connectionto SQL Server [53].
Connection failed:
SQLState: '08001'
SQL Server Error: 53
[Microsoft][SQL Native Client]An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
Connection failed:
SQLState: 'S1T00'
SQL Server Error: 0
[Microsoft][SQL Native Client]Login timeout expired€œ

Any help with this would be most appreciated

Peter

View 2 Replies View Related

SQL Server Admin 2014 :: Failover Cluster Setup Error

Aug 10, 2015

I have been facing following Error in Failover cluster setup as below. I have prepared 2 node and 2 instance sql server failover cluster on top of windows failover.I have deleted MTCBJINS07 in AD and recreated even after, problem is not solved. MTCBJINS07 is my 2nd sql instance sql server network name.

Cluster network name resource 'SQL Network Name (MTCBJINS07)' failed registration of one or more associated DNS name(s) for the following reason:

DNS bad key.Ensure that the network adapters associated with dependent IP address resources are configured with at least one accessible DNS server.

View 2 Replies View Related

Recovery :: Error Adding Replica To AlwaysOn Failover Cluster?

May 22, 2015

I'm getting an error adding Replica to SQL AlwaysOn failover cluster in the new availability group wizard.  When I enter the name of the target node (secondary replica) server and press connect, I get the following:   

A network-related or instance-specific error occurred while establishing a connection to SQL Server. 

The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2) The system cannot fine the file specified

The SQL Browser service is up and running on the target.  I am using an Azure VM for my SQL instance.  This cluster spans geographies from our on-premise site to Azure via a VPN.  This is a multi-subnet cluster. I'm attempting to create a new AG from the primary replica node and the target is a node on Azure called SSASNodeAz03. 

[URL]

Full error:

Connect to Server
Cannot connect to ssasnodeaz03

Additional information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. 

The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2) The system cannot fine the file specified

View 8 Replies View Related

Setup And Upgrade :: Error During Remove Node From Server Failover Cluster

Jun 24, 2015

I have destroyed the cluster in failover cluster manager and then i am trying to remove node from the sql server installation centre.I am facing the cluster node and cluster service verification errors.I am not able to start the cluster service in services as well.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved