How To Automate Synchronizing Logins After Failover

Dec 13, 2006

Since the logins/jobs do not get stay in sync between principal and mirror after a failover (when using sql logins), is there a workaround to schedule a job or something to automate dropping, re-creating and autofixing logins?

I've read somewhere that an alert can be setup to run (after a failover) and a job can be executed, but cant seem to get this to work. Does anyone have any helpful hints on a solution to this

View 4 Replies


ADVERTISEMENT

Synchronizing SQL Logins In A DB Mirroring.

Nov 20, 2006

Hello,

I've a DB that is mirrored.

I've actually only one user. I've replicated the user with the sp_help_revlogin Store Procedure to create the logins with the same SID on both SQL servers.

Now the application that is used with this DB will handle per user authentication.

Of course the application will use SQL login for the users connections.

Now, I can easily automate the sp_help_revlogin usage for the creation of new users, but I've another problem. The users can change their passwords through the application.

I'm wondering which process using for this:

Dropping the users on the Mirror server €“ running the sp_help_revlogin on the primary to re-extract the login information and applying the login creation against the mirror server

Checking the modify date of the login in the master DB and dropping this login on the mirror and re-creating it from the primary

Do you have an idea or an advice for this case?

Thank you

Eric

View 1 Replies View Related

Failover Not Working Because Logins Are Not Synched

Aug 9, 2006

I have the failover working fine in the sense that the mirror becomes the principal when I issue a failover. The problem is that the login that I have set for the database becomes invalid and I get no permissions on my stored procs unless I go in and manually change the password for the login. I know the issue is that the logins have different SIDs on the two boxes. How do I sync them up? These machines are not on a domain and are using SQL authentication.

Brad

View 2 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

Lost SQL Logins, But Still Have DB Logins - Script To Recreate SQL Logins?

Jan 21, 2007

ok, first, I know... I forgot to run a backup of the master database, and I forgot to run a script to caputure logins. Not that that is out of the way... I need to recreate the logins under the Securities tab below the databases. All the company databases have the user names and passwords assigned to them, but they are not able to login, because they are not able to authenticate to the SQL server first.

Is there a script that someone has that will copy the company database security info for the users and recreate them in the SQL security tab?

I know that I can rebuild them manually, but I need to delete them first in the application software, then delete them from the databases, and then recreate them in the application software... and as simple as that sounds... it is a slow moving process.

Any assistance would be greatly appreciated.

Thanks,

John

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

Export Logins To Server With Already Existing Logins

Jul 17, 2001

Hello,

I would move a Database to another server. I try to use DTS but I have problems with this process because DB have big tables, I think. I try to use DETACH and ATTACH procedures but logins doesn't export. And more, in new server there are already logins from another DBs.

What's the best way to solve this problem?
Please, help
Thanks

View 3 Replies View Related

Moving DBs From SQL Server Logins To Windows Logins

Apr 3, 2007

I am a systems analyst and work with an app that runs against 2 SQL Server DBs. Though I have some familiarity with SQL Server and SQL, I am not a DBA.

The app executable is tied to a Windows service.
When we install the app, we run a process that builds 2 dbs to include:
Tables, indexes, stored procedures, views and user accounts.
SQL Server is set up for mixed mode authentication.

Normally, the dbs run off the local db user accounts which are tied to local logins with the same names.
We have a client that wants to remove our standard logins so that they can run on only a Windows login.
I know I should be able to tie the db users to a Windows login.
And I can do the same for the service.

But I am at a loss as to how to get this done.
How do you associate db users with a Windows login?
When I have tried sp_change_users_login I get an error that the Windows login does not exist. (Though I have added the Windows account to the DB.)

Hope this all makes sense.

View 2 Replies View Related

Synchronizing Tables

Sep 28, 2007

Hi,I have 2 tables (let's call them tableOld and tableNew) that I'm trying to synchronize. The tables may or may not be on the same server (I'm not sure - let's assume they're on different servers).Given below is the table structures:******************************************************************************* tableOld ------------- tableOld uses a View to access name information.View name = vwUserDetailsColumns in View = Firstname, Lastname, Fullname tableNew--------------- ProjectManagerID (PK, int, not null)  <-- autogeneratedFName (varchar(50), null)LName (varchar(50), null)Inactive (int, null) *********************************************************************** Basically,  I'm trying to write a script so that when a user runs the script that will do something like this: 1) it will add all the names in tableOld to tableNew (only if they don't already exist in tableNew)2) if there is a name in tableNew that does not exist in tableOld (because the name was deleted from tableOld), tableNew will set Inactive = 1 for that name.  Any help is appreciated. Thanks.P.S. Is there a way the script can run automatically any time a user adds or deletes a name from tableOld?  

View 10 Replies View Related

Synchronizing Databases

May 18, 2008

what's the best way to synchronize to mssql databases

(one is 2005 express and one 2005)

View 11 Replies View Related

Synchronizing Databases

Nov 22, 2007

what's the best way to synchronize 2 databases(mssql 2005) on 2 different servers.

View 3 Replies View Related

Synchronizing 2 Tables

May 14, 2007



Hi



I am trying to synchronize two tables on different servers, the one with me with the one is australia.



I have a table called MeriesHBMem on both databases and the one with me gets updated everyday, and then i have to use a program called SQL Delta to synchronize all the new rows. How can i go about doing this using SSIS?



Any help would be greatly appreciated! I though about using a trigger for this, but i don't know how to go about connecting the two servers in the trigger's SQL statement, and besides i also think that a trigger will be a huge performance issue.



Data gets inserted into the table, all i want is a SSIS package to execute every 30min or so and take the new data and insert it into the other database's table



Kind Regards

Carel Greaves

View 1 Replies View Related

Synchronizing Data ?

Feb 25, 2008

Hi
I have two servers, on one i have SQL Server 2000 ( root ) and on the second SQL Server 2005. I need synchronize some data ( not the whole database ) on 2005 but i can't use Analysis Services . What i can do in this situation ?

Dest wishes

View 1 Replies View Related

Synchronizing Tables

Aug 17, 2006

Scenario regarding SQL 2000.
I have the same table on 2 different servers, Server R and Server L.

This table schema is:

ID int not null
Name varchar(50) not null
Password varchar(50) not null
IsUpdate int not null default (0)

People has an application that enables them to change their passwords in the table on Server L.

There is a for update trigger in the table on server L that sets IsUpdate column to 1 when any password has been modified.

The required scenario:
- Synchronizing passwords in the table on server R with passwords in the table on server L.
- Then setting the IsUpdate column in the table on server L to 0 again.

What is the best technology for that?
Please send me a code proposal.

Many Thanks and Best Regards,
Bishoy

View 4 Replies View Related

Synchronizing Databases

May 15, 2007

I have a SQL Server 2005 web database and a local SQL Server 2005 database. I want a tool that can synchronize both the database from the source (web) to the target (local).

View 3 Replies View Related

Synchronizing SQL Server Databases

Apr 4, 2005

Hi,
I have a problem that I have never considered before. I am developing with C#.Net, Visual Studio.Net ans SQL Server on Windows Server 2003.
Recently we have been upgrading our servers and have installed 2 servers (Live and Dev). The live server is Win Server 2003 Standard while the Dev server is 2003 enterprise.
Both servers are running their own versions of SQL Servers (both 2002). What I need to know, is there a way to copy or 'sync' the dev database to the live without over-writing the live data. I need to be able to copy the dev db structure (the tables anf fields) but not over-write the live data with the dev data (the live data changes rapidly and none can be lost). These 'syncs' would happen 2-3 times a month so the 2 db's, at the time of sync, will look very different so a simple copy of the live data to the dev db is not possible.
Does SQL Server have a wizard or utility? I have not been able to find one.
Thanks,
Justin
 

View 4 Replies View Related

Synchronizing Database Access

Feb 18, 2006

I'm writing a site in ASP.NET 2.0.  I have business logic that contains two methods:ModifyUserInDB() // Modifies user data in a SQL 2005 tableandGetUserFromDB() // Gets user data from the SQL 2005 user tableIf the two methods above get executed at the same time by two different users (but on the same record in SQL 2005), how do I prevent the data from being corrupted? Does SQL do this automatically?If I make the methods static, and synchronize them, will it fix the issue? Are static objects the same instance for all users?

View 5 Replies View Related

Multiple Databases Synchronizing

Apr 5, 2004

Hi,

Currently developping a c# database based application, which will be used in different establishments worldwide. I'm currently a bit confused by the ms sql features offered. Because the huge data amount which will be fetched during application use from the database, the best option is probably to put a ms sql server in each establishment to realise quick data fething. Problem is that the servers, which are all running on the same database design have to be synchronised real-time. I read about datareplication with the merge option which I thought was a nice solution. The subscribers can only have read-only rights on these subscriber databases, because the merging doesn't work appropriate i heard, so this is no good solution. Then I read about distributing transaction coordination. Seems a good solution as well, but what happens if a server system crashes for one day and then comes back online? It won't be up to date anymore... Right now I think about a combination of these 2 features. DTC in combination with merge replication, but there must be a better solution. Fact is that a lot of users will be editing data worldwide non stop, and everyone has to be up to date. Because of huge data fetching I don't think it's a good solution to let everyone work worldwide with one single database. Is there a possibility to realise this with ms sql server? Because I'm getting more and more confused... Thx in advance.

View 2 Replies View Related

Synchronizing Access And SQL Server

Sep 15, 2006

Hi,Is it possible to make changes to an Access 2000 database on my desktop, andhave it update those changes to SQL Server 2000 on the web?I have to update stock and prices every night. Right now I am using Access2000, and I just make the changes, and then upload the changed db to theserver, and overwrite the old db.But I am going to be using SQL Server 2000 soon, and I know you don't justoverwrite the db each time.There are about 6 fields that *might* change each night, per record.Is it called replication? How (basically) do I go about it? Are thereprograms out there that will make it easier?Thanks for any advice!J~

View 2 Replies View Related

Synchronizing Stored Procedures

Jul 20, 2005

I'm writing a VB6 app which calls several stored procedures on my SQLServer DB.The first stored procedure must complete its inserts before the secondstored procedure can query the modified table for its results. Myproblem is thatthe second stored procedure occasionally returns a different resultset, acting as if the first stored procedure didn't complete (ordidn't run).So how do I ensure (or test/poll?) that the first stored procedureruns to completion before returning control back to my VB app?Thanks in advance,Ralph

View 9 Replies View Related

Synchronizing Data Between Tables

Apr 22, 2008

I have several situations where I have values stored in multiple tables (yes, I know that isn't a good practice but it is my reality) and I need to make sure that they stay consistent.

The problem is, they can be (and frequently are) updated from both locations.

I was going to use an update trigger on each to update the other but I can see that causing potential deadlocks.

Surely I am not the first person with this problem but I haven€™t been able to find anything in the help files or on the forum.

Any ideas?

View 6 Replies View Related

Synchronizing Data (Error)

Oct 14, 2005

- Synchronizing Data (100%) (Error)
Messages
Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the SQL user is not a valid user on the SQL Server, or the password is incorrect.

View 3 Replies View Related

IIS Synchronizing Data Error

Sep 18, 2006

hi..need help here,
I sometime get error when syncronizing data at New Subscription Wizard, and sometime I dont.but right now i cant sync, this is me error messages :
"Synchronizing Data (Error)
Messages
A request to send data to the computer running IIS has failed. For more information, see HRESULT.
HRESULT 0x80070002 (28037)

The operation could not be completed."

I've turn off the firewall, turn off the antivirus, plug the LAN cable but still error (Maybe it has to do with it).A long time a go I've had this error, and then I decided to reinstall SQL Server and try it again and it work, now it back to me again, do I have to reinstalled it again(hopefully it solved my problem)?or any otherway?

And want to ask about SQL Mobile, When I choose the Merge, the uniqueidentifier will be add at my table right?what should I do at inserting query process, I cant just insert it with NULL value right?
After my subscription doing input data, is it my publications will be automatic updated?
I'm little lost here..need advise

View 1 Replies View Related

Error In Synchronizing Data

Jan 4, 2006

I tried to subscribe to the database that is published on my laptop running on windows XP professional SP2 and using SQL Server 2005. However, in the second step (synchronizing data) the following error message occured:

Synchronizing Data (Error)



Messages

A request to send data to the computer running IIS has failed. For more information, see HRESULT.
HRESULT 0x80072EE2 (28037)


The operation could not be completed.


Anyone can help me on this?

 

View 4 Replies View Related

Synchronizing To Expired Publication

Jun 27, 2007

if a subscriber is offline (for a long time) and has changes, then connects to the server to synchronize but the subscription has expired, what happens to the subscriber's changes? do the changes get lost? do they get merged as normal then an entire new snapshot with the new changes sent back?



thanks,


bryan

View 1 Replies View Related

Synchronizing SQL Server Databases Over The Web

Mar 4, 2008



Hi,

I have a potential client who wants to run three web sites at different locations, each storing data to SQL Server (let's say it will be SQL Server 2005, for the sake of argument). Periodically, but at least once a day, they would like all changes to be made in any server to be reflected in the other two.

As a develeoper, my initial approach would be to write web services that can transmit and recieve changes. Triggers on the database tables would copy data into "shadow" tables and then the web services would periodically wake up and send their changes to the other two servers.

However, before I go down this route, I wondered if any of the standard SQL Server tools (like SSIS) would handle this scenario (maybe with an agent FTPing files between the servers)?

Alternatively, does anyone know of any off-the-shelf partner solutions that can acheive the same result?

Many Thanks,

Chris Boothroyd

View 3 Replies View Related

Synchronizing Sql 2000 And Sql 2005

Apr 19, 2006

Im working on a project. This program will run off of a sql 2005 database. The company that we are selling this too uses sql 2000. They will end up using both. They will enter their data as usual, into the sql 2000, and then I need to get that data from 2000 to the 2005 database, anytime a transaction occurs, I need that transaction to also occur in the 2005 database. The 2000 DB has 4 tables. These 4 tables are split up into different ones in 2005, so I will need to map it just right. (This may sound dumb, but it is what they want so what are ya gonna do?) My question, is there an easy way for sql 2000 to communicate with 2005. I planned on making a trigger in 2000, that triggers a web service, that reads from 2000 and maps it into the right tables in 2005. Is this the best option or are their others Im not thinking of .... thanks.

View 4 Replies View Related

Synchronizing Two MS SQL 2000 Database Server

Mar 25, 2004

Hi All,

I will have to setup two windows 2000 servers at separate locations. Each server will host the MS SQL 2000 database. The data on both database will need to be in sync in real time. Is it possible to do? If yes, any suggestions of how do do it?

Thanks
Khen

View 5 Replies View Related

SQL Server - Synchronizing Database Changes Across Servers

Mar 26, 2008

Can someone recommend a utility (preferably open-source) tosynchronize changes across servers? I need to bring only data over insome cases, and only objects in other cases. Any ideas?Thx!

View 5 Replies View Related

Losing Record After Synchronizing Subscriptions

Feb 18, 2007

Hi


We got a server running SQL server 2000 SP4 with a database that€™s being replicated
There are 17 subscribers running MSDE SP4 using merge replication. Replication is started manualy

Initially we tested this with two subscriptions an everything went well, but now, since 3 months, we are facing a weird problem while sync'ing. We have massive data loss on records that where inserted at the subscribers. Records seem to disappear, but only record that have a foreign key constraint. What I mean is that for example a record is inserted at the table that holds our client records with primary key €˜ClientID€™ and then a record is inserted in a table with actions for that client with a foreign key €˜ClientID€™ referring to the client table. After sync€™ing that client record is inserted correctly in database on the publisher but the records in the table with actions are gone.

As far as I know the tables are correctly formed with identity set not for replication and so on.
Shortly, I can€™t find any problem, a specially when it doesn€™t happen always.


If anyones has faced this and got a solution, please let me know.
Thanks.

Raf


View 3 Replies View Related

Synchronizing SSIS Packages Calls

Feb 26, 2007

I have several SSIS Packages which are called by few different applications. I need to make packages Mutually Exclusive, so that If one is running; calls to any other Package should be put on wait till the running one has finished its execution.
What are the best ways to do this ?


I would sincerely appreciate inputs in this.

View 6 Replies View Related







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