Quantcast
Channel: Database Mirroring forum
Viewing all 1024 articles
Browse latest View live

SQL Always on

$
0
0

Hi

I have server with sql server 2012 I want to add another node and create sql always on  .

what is the steps shall i follow .

Thnaks


MCP MCSA MCSE MCT MCTS CCNA


SQl server log shipping retention

$
0
0

I have log shipping configured on SQL Server 2008 and the logs retention period is 72 hours . Does SQL Server provide such an option that if the copied logs are not restored on the secondary database (reason the restore job could be failing or any such scenario).

The purge job should not delete those trn files, that are yet to be restored .

To my understanding this is impossible could any one of you please inform me regarding this.

I will be grateful for your help.

BACKUP failed to complete the command BACKUP LOG

$
0
0
Getting BACKUP failed to complete the command BACKUP LOG qoemetrics for our Lync Server 2013 SQL 2012 mirror. No backups defined on mirror. Any ideas?

How to create a .mdf SQL Server database from a Data-Tier Application file that has data?

$
0
0

This is a noob question, though I do use SQL Server databases all the time with Entity Framework when I code in C# using Visual Studio 2013.  The development environment is found below at [A].  I am trying to make a clone of a SQL Server 2008 R2 database (.mdf)  that exists online.  I can read, connect and work with this database in Visual Studio 2013, but I wish to make a local copy of the database, as an .MDF file.  Somewhere in my notes I have a way of creating a local copy from an online database when using Visual Studio but I forgot how (it seems, reviewing my notes, that it deals with ADO.NET which is deprecated in Visual Studio 2013 these days, or so it seems).  So I'm looking for another way.  What I did was create (or export) a "Data-Tier Application File" from the online SQL Server database, with data, and it seems to have worked in that this Data-Tier Application file exists on my hard drive and seems to have data in it ("SQL Server Replication Snapshot" is the format it seems).  It contains skeleton code to create a database, but when I tried to execute it with SQL Server 2014 Management Studio, I got a bunch of errors.

So my question is:

1) Can I somehow create a .MDF SQL Server Database from an Data-Tier Application file that has data?  What tool do I use?  I saw this link, http://social.technet.microsoft.com/wiki/contents/articles/2639.how-to-use-data-tier-application-import-and-export-with-a-windows-azure-sql-database.aspx  and it relates to Azure, but is there a tool for C#Visual Studio 2013, standalone?

2) If there's an easy way to create a .mdf SQL Server Database file from an online file, within SQL Server Management Studio?  I don't think so, since it would require Administrator permissions on the online server, which I don't have. I have permission to read, update, delete the online database file, but strangely not to download it (the service I use has a tool for backup, but not for download).

3) same question as 2), but for Visual Studio 2013?  I don't think so, since I notice none of the templates even mentions ADO.NET anymore, but instead they go with Entity Framework.  Using EF I can of course do anything I want with the online database (CRUD), but it remains online.  Maybe there's a switch to make a local copy?  I guess I could write a short program to suck all the data out of the online database and put it into a new, duplicate database having the same tables, that I create on my localhost, but my question here is if there's an easier way than this, maybe a tool or command I can run from inside Visual Studio?

Any advice on any of the above questions is appreciated.

Thank you,

Paul

[A] Microsoft Visual Studio Professional 2013
Version 12.0.21005.1 REL
Microsoft .NET Framework
Version 4.5.51641
 
Microsoft Web Developer Tools 2013   2.0.40926.0
SQL Server Data Tools   12.0.30919.1
Microsoft SQL Server Data Tools

Windows Azure Mobile Services Tools   1.0
Windows Azure Mobile Services Tools

Database mirroring

$
0
0

Hi All

We have  a database mirroing with witnesses server.

We are planning to maintenance activitiy on these servers which requires server reboot.

I wanted to know the steps in which these servers should be rebooted. Should i remove witness server and add it back?

Can i start with witness server, principle server and then mirror server in order of reboot.

Thanks

How To Recover Data From A Corrupt Mdf File?

$
0
0
Hi All,
By mistake i delete database from sql server. Due to which the the mdf and ldf file of the datbase are removed from my system. Then i used file recover utility and retrived my mdf and ldf files.But now i am not able to attach those files into databse. These mdf and ldf files has been corrupted. Now how can i recover my data from those mdf and ldf files.Please answer me if you have any solution on this problem. 

MyFileName.mdf is not a primary database file

$
0
0
While accessing to an .mdf file, I receive this: MyFileName.mdf is not a primary database file. Does it mean the file is corrupted?

Please help in repairing this file. I heard about some manual tricks to fix SQL database corruption, but I'm not aware of it.

Please share it.
Thanks.

sql procedure studAttendace report

$
0
0

i have table StudAttendance

id     cardid            intime             outtime                    updtime             std     div    

1123456789  2014-09-03 19:10   2014-09-03 23:10 2014-03-09 20:01    1  1  
2123456788 2014-09-08 19:10  2014-09-03 23:10     2014-03-09 20:01   1     1
3123456785 2014-03-01 19:12 2014-03-09 23:30     2014-03-09 20:01    1    2

cardid is unique value of each student

intime is student insert school time and outtime is went time

updtime is bulk insert time .txt file to StudAttendance time

I have to design report ssrs so need sql procedure. ssrs design is below

       

studName   CrdID          1  2  3  4  5  6  7  8 ..........31

name1     123456788    p   p  p A  p  p  p  p.........     p

name2    123456785     A   p  p  p  p  p  p  p   .........p

.

.

So plz help






service

$
0
0
how i install sql server agent 2012 and database mail.because it does'nt appear in object explorer

help me out...

$
0
0
TeamWorks Inc. is one of the leading corporate training companies in Asia. The company is
primarily involved in imparting corporate training to its offshore clients located in London, Australia,
and China. Today, under the chairmanship of Lewis Lee, the company has spread across the
world.
The company maintains the details of its employees and clients in the Employee and Client files,
respectively. In addition, the company maintains the details of various projects undertaken in the
Project file. The details stored in the Employee file consist of employee ID, employee name,
gender, phone number, department ID, department name, project ID, and project name. However,
the details stored in the Client file consist of client ID, client name, project ID, and project name. In
addition, the Project file consists of project ID, project name, employee ID, employee name,
department ID, department name, project start date, project end date, and project cost.
Due to the high quality of services it offers, the company has noticed a tremendous increase in the
number of its offshore projects. Consequently, it has become very difficult for the company to
manually maintain the details of various projects undertaken. Therefore, the company has decides
to use an automated project management system. For this, the company approaches SoftTech
Inc. to develop the automated project management system.
At SoftTech Inc., a team of developers have been assigned the task to create the required
application. Harry Butler, being the team leader, analyzes the application and identifies the various
components required to create the application. Being the database developer in the team, you
have been assigned the task to analyze the application and create the required database and
tables.
You need to analyze the various files in the given scenario and perform the following tasks:
1. Identify the various entities that may cause data redundancy. Justify your answer. [5 Marks]
2. Identify the various problems that may arise due to data redundancy. Justify your answer. [5
Marks]

AlwaysOn Failover Doesn't Work with Encrypted Databases

$
0
0

Column level encryption failed with error :

Msg 15581, Level 16, State 7, Line 5Please create a master key in the database or open the master key in the session before performing this operation.Msg 15315, Level 16, State 1, Line 10The key 'ABCCredentialsKey' is not open. Please open the key before using it

after faiover in SQL 2012 AAG?

AlwaysOn AG - Synchronous-commit mode recovering from session timeout

$
0
0

I'd appreciate a bit of clarification please.  We're going to implement AG in synchronous-commit mode, and upon reading the following TechNet Article there's a note that says:

If a synchronous-commit secondary replica times out without confirming that it has hardened the log, the primary marks that secondary replica as failed. The connected state of the secondary replica changes to DISCONNECTED, and the primary replica stops waiting for confirmation from the secondary replica. This behaviour ensures that a failed synchronous-commit secondary replica does not prevent hardening of the transaction log on the primary replica.

All good so far.  Towards the beginning of the document there is a note that reads:

If primary's session-timeout period is exceeded by a secondary replica, the primary replica temporarily shifts into asynchronous-commit mode for that secondary replica. When the secondary replica reconnects with the primary replica, they resume synchronous-commit mode.

So my question is, if a secondary replica changes to DISCONNECTED because the transaction was not hardened, is this the same as a session-timeout which the secondary replica can recover from by entering asynchronous-commit mode until it's caught up and then enters synchronous-commit again?

Also, is there a point at which the DISCONNECTED state has existed for so long that synchronisation essentially fails and you would have to reinitialise (or is it a case that the DBAs need to pick up on this before the log file fills up on the primary replica)?

Many thanks!

Broken Mirroring Configuration

$
0
0

We have a client for whom we configured SQL mirroring for a single GP database.

The client built a new domain controller and created a new domain with the same name as the existing domain.

They then decommissioned the old domain controller and removed the domain (only DC). Both SQL servers were then added to the new domain without removing the mirroring configuration.

Needless to say the mirroring is broke and can't be removed.

Is this a scenario anyone has come across before?

Thanks in advance.

Mirror - Application trying to connect to mirror DB randomly

$
0
0

Hello all,

So we have a couple of SQL Server 2008R2 instances involved on mirroring without witness and operating mode is asynchronous in all cases and we do not use witness, so there is no automatic failover.

After we set put mirroring in place, we started facing connections issue on our applications like this one:

org.apache.torque.TorqueException: org.apache.commons.dbcp.SQLNestedException: Could not retrieve connection info from pool Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user XXXXXX.

After some investigation we saw in the alert log of the mirrored instance errors like this:

Login failed for user XXXXXX. Reason: An error occurred while evaluating the password.

Connection string used on the app side:

torque.dsfactory.service.connection.url = jdbc:sqlserver://SERVER_IP:INSTANCE_PORT;databaseName=DB_NAME;applicationName=AP‌​P_NAME torque.dsfactory.service.connection.user = XXXXXX

So, this makes me think that somehow the application is trying to connect to the mirrored instance instead of connect to the active one. Since all logins are disabled on the mirror side the connection is rejected.

I saw some persons asking the same, but never saw any explanation for this issues. Does anyone had this type of issues and knows what the problem is? I do not see any problem on the mirroring configuration, but I may be wrong...


Creating a 2012 database mirror across different subnets

$
0
0

I'm trying to create a database mirror between to different subnets.  principal server is running sql 2012 and the mirror server on a different subnet is running 2014 server.  i'm using a witness server on the same subnet as the principal server and running sql 2008 on it.  i'm getting the error message 

"The server network addresss "...:5022" can not be reached or does not exist.  check the network address name adn that the ports for the local and remote endpoints are operational(1418)"

what i've read is that this is becuase of htem being on different subnets, is there a way around this?


Michael Duhon


SQL Server 2012 using load balancer

$
0
0
I want to use a load balancer device with two independent SQL server server. how the configuration can be done. IS it possible to use hardware load balancer device so the load could be diverted  to independent servers.

Connection handshake failed

$
0
0

I am attempting to set up mirroring for the first time between two servers.  The servers are on the same domain, I am using the wizard to setup mirroring, i am logged into each server using a domain account that has System Administrator privalges, this ID is a domain admin also, I can connect to each instance via SSMS in both directions, but cannot get the mirroring to work.  When attempting to start mirroring I get this error on the Principle instance.

 

On the mirror instance I get this message in the SQL Server log

Logon,Unknown,Database Mirroring login attempt by user 'MNS\VIPERDB00$.' failed with error: 'Connection handshake failed. The login 'MNS\VIPERDB00$' does not have CONNECT permission on the endpoint. State 84.'.  [CLIENT: 172.16.0.211]

 

MNS is the domain and viperdb00 is the server name

 

Any ideas?

John

backup

$
0
0
Hi everyone i want to take the backup of my sql database(SQL2012), just guide me i know my question seems to be stupid just wanna cross check if i am making any mistake as i am not a db guy

in the Define Backup DB full task window: Create a backup file for every db (this will be my target folder where i will save my backups for example F:\SQL_Backup) and file extension will be bak

 In the Define Maintenace Cleanup task : Search folder and delete files based on on extension(i should select the target folder(F:\SQL_Backup) and file extension will be bak. include first level subfolder box checked.



Database Mirroring Witness does not seem working

$
0
0

Hello,

Database Mirroring Witness does not seem working. When passing the command "SELECT * FROM sys.database_mirroring"

I am getting:

even it was configured...

Any idea?

Thanks,

Dom


System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

Database Start Mirroring failing...

$
0
0

Hello,

I am trying to start the mirroring between two servers and a witness but always failing...

- Same service account on the three servers

- Ports open and working through telnet

tried http://blog.sqlauthority.com/2010/01/11/the-server-network-address-tcpsqlserver5023-can-not-be-reached-or-does-not-exist-check-the-network-address-name-and-that-the-ports-for-the-local-and-remote-endpoints-are-operational-microso/

or

http://blogs.msdn.com/b/grahamk/archive/2008/12/08/database-mirroring-error-1418-troubleshooter.aspx

still erroring...

Any idea?

Thanks,

DOm


System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

Viewing all 1024 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>