Database Mirroring, Methods For Keeping Logins Synced.

May 31, 2007

I am in the process of implementing database mirroring. I am trying to get an understanding about manageable ways of keeping sql user logins synced between instances.

I have looked at KB918992 which makes sense for the initial intallation, but what about keeping passwords synced in the long-term. I don't want to have to manually set a users password on the failover every time they change it.

How is everyone else accomplishing this using sql logins (not windows auth)? Pointers to articles and/or documentation would be great.

Thanks.

View 1 Replies


ADVERTISEMENT

Database Mirroring, Client Connections All ODBC So What Methods Are Recommended?

Jun 5, 2006

As stated in the subject I have a situation where if database mirroring is employed for either manual or automatic failover, all the client (including web connections) connections use ODBC not ADO, or OLEDB etc... so what methods are recommended? Client side redirect is not available so I could not employe the "Data Source =A; Failover Partner=B..." option.

Right now the method employed (pre database mirroring and basically employing log shipping on SQL 2000) is to have a DNS alias for the ODBC connection so that if the server were to change in a failover situation the DNS record would have to be altered, so that all the client connections would not have to be reconfigured.

Regards,

Dominic Baines

View 5 Replies View Related

Mirroring And Logins

Oct 5, 2006

I've created some SSIS packages to move logins from the Primary server to the Mirror server. But I'm having a small glitch. Lets say I have a database dbA that's mirrored. I then add a login of some sort, say userA. userA's default database is dbA. When I add that login to the mirrored server, how do I get the default database to be dbA? Currently I'm getting the following error from Alter Login:

ALTER LOGIN [userA] WITH DEFAULT_DATABASE=[dbA]

Msg 954, Level 14, State 1, Line 1
The database "dbA" cannot be opened. It is acting as a mirror database. I'm currently adding the logins with master as the default and then using Alter to attempt setting it. I can mask the error with a TRY block, but if I fail over it seems I'm going to have an issue. Any thoughts on this would be greatly appreciated.

Thanks,

Larry

View 3 Replies View Related

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

SQL 2005 Mirroring And SQL Logins

Feb 5, 2008

Hi all,

I am using SQL 2005 (Enterprise Edition, SP2) Mirroring with a Principal, Mirror and Witness set to High Safety mode and am a little confused!

As far as I understand it, during a failover, although the database content will automatically be available on the Mirror any user accounts will need to be either manually created or manually mapped to the new principal. Is this the case? If so, I can't really see the purpose of using Mirroring (in my scenario anyway).

For example - We principally use the database servers for our web applications which we connect to using ADO.NET. Each database and Web app has a different SQL user account to allow access etc. If we experience a failover this means the users will not be able to use the web app until we have manually recreated/mapped the SQL accounts for each and every database. Surely this is a massive oversight?! Or am I simply getting the wrong end of the stick.

Any help/guidance would be greatly appreciated!

Thanks,

Richard

View 3 Replies View Related

Transferring Logins SSIS Task And DB Mirroring

May 12, 2008



Hi guys,

I want to create an automatic job on SQL 2005 to transfer logins between 2 servers, (Principle and Mirror). If I use the transfer logins task I get the error:


"The database "x" cannot be opened. It is acting as a mirror database."

I guess this is because it is trying to assign the default databases for the logins??

I've also looked at [sp_help_revlogin] procs but that requires manual intervention.

How does everyone else transfer logins in this situation?

Thanks in advance..

View 10 Replies View Related

Database Mirroring | Can Witness Live On Mirroring Server?

May 3, 2008



Server A = primary SQL DBs (mirroring origination)
Server B = failover SQL DBs (mirroring destination)

For database mirroring a witness is required.
Can the witness live in another instance of SQL on server B?

View 7 Replies View Related

Keeping Database As Small As Possible ?

Oct 16, 2006

Hello everyone,



I have a winform application with C# front end and sql express 05 backend.

In this database i have a table that holds manufacturer provided pricing and the manufacturers we work with update pricing constantly.

We have one table called "manufacturerpricing" which we are constantly inserting and deleting pricing records to/from to keep manufacturer pricing up to date. We may insert and delete as many as 2,000,000 records per month into this table.

This works perfectly fine and we have no problems here at all.

But with that being said, I am worried about the size of the database growing out of control due to temporary space etc. The database just keeps getting bigger and bigger.

How do I run some maintenance to keep the database size under control.

I would like to run this automatically from the C# front end so if ther is a stored proc I can call or an C# assembly I can reference that would be ideal.

Any help is greatly appreciated.

View 3 Replies View Related

Mirroring :: Database Mirroring Changes In Application

Oct 12, 2015

Using SQL Server 2008, we would like propose mirroring between two servers of a critical database. Since we initiate, may require to clarify on its purpose and also required changes from application end.Any changes required from OS Level? (I believe both servers IP or Host name should be added in host entries. Mirroring ports should be allowed/open including Principal and mirror server IP Addresses): Windows Team.Any changes required from Application? (Instance name, authentication: user name and its password should be added in web config files): Application Team.Any changes required from Network Team?Also for mirroring both the principal and mirror servers should be with same version, does it only mean SQL Server 2008 versions are enough or does it also mean to say build numbers 10.00.4000 should also be same.URL....

View 5 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 2005: Keeping Track Of Database Changes

Jul 5, 2006

I'm actually taking Microsoft's 2779 and just finished a lab where wekept track of our changes to the database.However, I'm not happy with the scripts interface because it does nottell me the chronological order of my changes to the database.Could someone share with me their technique for keeping track ofdatabase changes?I'm actually thinking a set of tables would be best, because sometimesyou want to know what database object you made a change to and othertimes you want to know when you did something...

View 2 Replies View Related

Purging A Database Data While Keeping The Structure Intact

Oct 15, 2006

Is it possible to purge all records in the database while retaining the the table structures. Even better yet, could I do it on a table by table basis?   If I simply delete all the records the identities for the tables do not revert back to 1.

View 2 Replies View Related

SQL Server 2008 :: Keeping Security On Database Restore?

Feb 17, 2015

I have a database used in SSRS in which I get a backup daily and restore it to database "DATA"

The issue I come across is SSRS has a datareader user(ssrsuser) for access to the "report store" web where users get reports

access gets erased on each restore. Can I add something to my job to restore this user after each restore or keep the settings?

declare @Bakpath varchar(80)
set @bakpath = 'C:EDataExtractedDataextract.bak'
Use Master
Alter Database [Data]
SET SINGLE_USER With ROLLBACK IMMEDIATE
RESTORE DATABASE [Data] FROM DISK = @bakpath --location of .bak file
WITH REPLACE
GO

View 5 Replies View Related

DatabaseMetadata Methods With Catalog Parameters Now Error If Current Database Does Not Match.

May 11, 2007

In the v1.2 CTP version, the DatabaseMetadata methods for getting information about objects in a database (i.e. getTables(), getColumns(), ...) errors if your current database connection is in a different database than the object you are quering.

Is this the intended behavior going forward?

In my case I have access to both database A and database B. My current connection is in database A , but I am looking up object in database B.

ResultSet rs = conn.getDatabaseMetadata.getTables("B","dbo","%",{"TABLES" });


[junit] The database name component of the object qualifier must be the name of the current database.
[junit] com.microsoft.sqlserver.jdbc.SQLServerException: The database name component of the object qualifier must be the name of
the current database.
[junit] at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
[junit] at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
[junit] at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
[junit] at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(Unknown Source)
[junit] at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
[junit] at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
[junit] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
[junit] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
[junit] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQueryInternal(Unknown Source)
[junit] at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getResultSet(Unknown Source)
[junit] at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getResultSet(Unknown Source)
[junit] at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getColumns(Unknown Source)


~Mike Hale

View 8 Replies View Related

SQL 2012 :: Database Mirroring And NT Authority Account For Database Engine?

Dec 2, 2014

I have just finished configuring my first test mirrored environment (High safety mode). I setup the database engine service accounts on each of the servers with domainuser. I inherited a production mirrored environment set up by someone else. On the production servers the database engine service account is NT Authorityuser a local account. I am trying to practice installing Windows updates within a mirrored environment and I not sure how to proceed when the service account is NT Authority user account. should I change the service account to a domainuser?

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

Multiple Database Logins

Jun 17, 2008

Hello EveryoneI am in the process of creating a web application that will allow me to have one place to go to see all of my SQL Databases. I would like to have one of the pages that showed the current status, or maybe next to the name of the server, have the status listed.I know how to create a database connection string using the web.config But I will need to have a query that loops thru a list of database server names, and each of them returning the status. Being able to connect, query the status of the server, show the status of each database. My database connection string will only log into one database. How can I code this to be able to loop thru the list of stored database server names, and then be able to log into each database server?Can I use a separate class with a method, and pass in the name of the server? That means that I would have to have the same user name on all the database servers, wouldn't I ?I am looking for a way to accomplish this. I am open to suggestions. I am coding my web app using C#. ThanksAndrew SQLDBA 

View 2 Replies View Related

Database Users And Logins

Mar 20, 2006

Hi

I can't figure out what the purpose of having seperate users is as I can't actually login to the database using one.

Here is my scenario.

I have a single login called LoginA and I have a database which I want to carve up using schema's. At the database level I need to create a user, associate a login with this user and can set a default schema and specifiy what schemas this USER can access. The login created can access multiple schemas.

So..

I created a database login called loginA.

I created a user for the database called UserA set it's login name to LoginA and

I then created 3 schemas called SchemaA, SchemaB and SchemaC and set their schema owner name to UserA.

I went back to UserA and set their default Schema to SchemaA

How can I login using the new user created as it has no password associated with it. If I login using LoginA then I have no default Schema set becuase the schema is associated with a USER not a LOGIN.

I can understand why you can only have one login account assicated with one user account for each database but I can;t understand why you can specify a user name if you can't use it to login.

Has anyone got any ideas?

Thanks

View 1 Replies View Related

The Database Is Being Closed Before Database Mirroring Is Fully Initialized

Jun 12, 2007

When I issue this command:


ALTER DATABASE foo set PARTNER = 'TCP://10.3.3.1:1234'
I get this error message:




The database is being closed before database mirroring is fully initialized. The ALTER DATABASE command failed.
What does that mean, and how do I fix it?

View 8 Replies View Related

Database Mirroring Hangs On ALTER DATABASE SET PARTNER

Jun 26, 2005

Hi,

View 6 Replies View Related

Losing Logins When Restoring Database

Aug 7, 2000

When I a set of databases from backup all login information is lost. The front end of the application provides a way to create new users, but it is a very long process. I am looking for a script or stored procedure that will help attach the users to the database.

View 3 Replies View Related

Random Failed Logins For Database

Mar 10, 2004

Hi,

We are running MSSQL 2000 on a reasonably powerful dedicated Win2k system Dual 2.4 Xeon Procs, 2 GB of RAM, Ultra 160 SCSI disks.. blah blah blah.

Our primary use this database server is for our Coldfusion Application servers. We host about 50 or so databases.

Of late, we have been experiencing random failed logins for certain databases. These failed logins are logged to the event log on the server. They randomly; queries executed against a datasource configured on our application servers trying to get data from the database fail with a login failure when other times they will succeed. I am confused about this issue. Could an issue where the SQL Server is overloaded cause a login failure for a database?


Errol Neal

View 1 Replies View Related

Syslogins, Database Logins Script.

Dec 15, 2004

Does anyone have a script already which pulls all the logins and what databases they have public/dbo access to? I'm looking for something more than just pulling syslogins/users and their default dbname, I need a list of all the databases they have dbo access to.

Thanks, Jim

View 5 Replies View Related

Database Mirroring Monitor Not Working For One Database

Apr 2, 2008

I set up a new mirror server. Everything is good except that the Database Mirroring Monitor is not working for one of the databases. In the monitor the principal data is showing up as blank

If I look at dbm_monitor_data on the principal most of the data columns (e.g. Send_queue_size) are null where as they have data for the other databases.


Both servers are SQL Server 9.0.2047 Enterprise Edition.


Any idea what might be going on here?


Thanks in advance.

View 3 Replies View Related

Logins Are Not Restored While Restore The Database To Another Server

Apr 8, 2002

Hi I took a Full Backup on Production Server and Restored the Same Database on Testing Server, i am able to see all the Tables Stored Procedure and View except Logins, i am not able to see any logins, there are total 650 Logins under the Database how can i see the logins and how to restore the logins, while i am trying to create any logins it is saying Error Occured login is already existing in the Database..




Bye,
Madhavi

View 3 Replies View Related

SQL 2012 :: Track All Logins Onto A Single Database?

Oct 17, 2014

We have a particular database sat on SQL Server 2012 box along with about 20 other databases.

What I require is a method/Script/Audit that will simply track anyone who logs (successfully / unsuccessful) into this one particular database on the server (The single database is the key as the end user does not want information on any of the other databases that sit on the server), it also has to log time the attempt was made and it must track the logins via SQL Server or the application itself that is attached to the database.

View 1 Replies View Related

Lost Logins Info After Attach Database To A New Machine

Mar 6, 2000

I use detach/attach method to move database to a new SQL Server 7 on MSCS. The security information was lost in the new server. Database Access permission was gone and I failed to select it again because message showed the database role is already exist. The default databases were also posted incorrectly. Would you please to tell me how to fix this type of peoblem or let me know how to move the login info such as login id, password, database permisson to the new server which locates in a different machine.

Thank you very much.

Rich

View 3 Replies View Related

SQL Server Admin 2014 :: Logins With No Database Permissions

Nov 3, 2014

Query to show logins that don't have any permissions within the SQL instance? I'm tasked with doing some cleanup and have found some cases where the database was deleted or moved to another server but the logins that used it were not deleted. I'd like to identify them to research.

For instance a query to show logins that have no permissions in any of the existing databases would be handy. I'm thinking it would be complicated by the need to loop through all of the existing databases and then outer join it to the list of instance level logins. Going to try to write something like that but was hoping that a script already exists.

View 3 Replies View Related

SQL 2012 :: Migrate Logins From A Copy Of Master Database

Jun 18, 2015

I am working on a Login migration issue. I have the Master database from the original database, that I have attached as a User Database, call it OriginalMaster. I also renamed the mdf and ldf files, before attaching, just in case.

I want to select the logins from the OriginalMaster, and using sp_help_revlogin script all the Logins out. I know there were many logins in that database. But what I am seeing, are all the Logins from the Current Master database. Which are only 7 Logins.

How can I select the logins, or script out the Logins from the OriginalMaster database?

View 1 Replies View Related

Permissions To See Server Logins/Create Database Users

Feb 2, 2007

Our company has 2 Database Roles (DBE and DBA). The DBE creates
database schema, performs SQL Server Administration, and manages server
security. The DBA writes data access, ETL, and manages database
security. In 2005, we're struggling with how to allow the DBA to see
all of the logins on the server in order to add them as users of their
database. What permissions does the DBA need to select from any of the
logins on the server to add them to their database?



Michelle

View 1 Replies View Related

Way To Determine Which Logins Have Write Permissions To Database On Sever

Nov 15, 2007

Hi there,

Does anyone know a way (a query perhaps?) to determine which logins have write permissions to a specific database on SQL Server 2005? Ive thought about joining sys.syslogins & sys.sysusers but looking at the columns, not sure which one would render me that info.

Any help is appreciated. Many thanks!

View 1 Replies View Related

What Is Maximum No. Of Concurrent Logins Possible On A SQL Server 2005 Database?

Dec 19, 2006

what is maximum no. of concurrent Logins Possible on a SQL server 2005 Database?

View 3 Replies View Related







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