SQL 2012 :: Permissions For Read Only Replica?

Jul 2, 2014

I have an availability group with read only replicas, readable secondary set to yes and allow all incoming connections. I have also configured the read only routing (at least I'm pretty sure this is correct).

If I login to SSMS with a user in the sysadmin role I can view the objects in the read only replica database. If I login with a user in the public role I'm unable to get past the obvious error:

"The database databaseA is not accessbile. (ObjectExplorer)"

I've also tried adding the "ApplicationIntent=ReadOnly" option.

View 4 Replies


ADVERTISEMENT

SQL 2012 :: Failover On 2 Servers AlwaysOn AG With Read-only Secondary Replica

Mar 28, 2014

What happens when an automatic failover occurs, in a two server AlwaysOn Availability Group configuration, where the secondary replica is configured as read-only?

Will it only allow read-only connections, or will it become read-write and can accept INSERT, UPDATES and DELETES when assigned the new role as Primary?

Is it correct that adding a third server/node, that just acts as passive and should be used for automatic failover, to support true HADR, would NOT need another license .. and that licenses would only be required for the previous Primary and Secondary (Read-Only) replicas?

View 3 Replies View Related

SQL 2012 :: Backup On Primary Replica In Case Of Secondary Replica Is Down

Jun 9, 2014

I have 2 SQL Server replicas configured on SQL Server 2012 AlwaysOn. e.g. SQL1 & SQL2.

I have configured backup job on both SQL Server with the following statement. and the job occurs every 10 minutes.

•declare @DBNAME sysname,@sqlstr varchar(500)
set @DBNAME = 'dba'
IF (sys.fn_hadr_backup_is_preferred_replica(@DBNAME)=0)
BEGIN
--Select 'This is not the preferred replica, exiting with success';

[Code] ...

I turned off SQL2 for Windows maintenance. So there is only SQL1 is online. Afterwards. I checked the backup folder and didn't see any new backup files was created after SQL2 was offline. I rerun the job. It still doesn't backup database on the Primary Replica. Then I searched on SQL Server Book online. It says

Prefer Secondary

Specifies that backups should occur on a secondary replica except when the primary replica is the only replica online. In that case, the backup should occur on the primary replica. This is the default option.

According to what it says, it should backup on the Primary Replica.

View 2 Replies View Related

SQL 2012 :: Existing Replica MDF File Size Increased In Size Than New Replica Install

Apr 14, 2015

Here are my scenarios:

We have an application with replicated environment setup on sql server 2012 . Users will have a replica on their machines and they will replicate to the master database. It has 3 subscriptions subscribed to the publications on the master db.

1) We set up a replica(which uses sql server 2012) on a machine with no sql server on it. After the initial synchronization(used replmerge tool) the mdf file has grown to 33gigs and ldf has grown to 41 gigs. I went to sql server management studion . Right click and checked the properties of the local database. over all size is around 84 gb with little empty free space available.

2) We set up a replica(which uses sql server 2012) on a machine with sql server 2008 on it. After the initial synchronization(used replmerge tool) the mdf file has grown to 49 gigs and ldf has grown to 41 gigs. I went to sql server management studio , Right click and checked the properties of the local database. over all size is around 90 gb with 16 gb free space available.

3) We set up a replica(which uses sql server 2012) on a machine with sql server 2012 on it. We have dropped the local database and recreated the local db and did the initial synchronization using replmerge tool. The mdf file has grown to 49 gigs and ldf has grown to 41 gigs. I went to sql server management studio , Right click and checked the properties of the local database. over all size is around 90 gb with 16 gb free space available.

Why it is allocating the space differently? This is effecting our initial replica set up times.

View 0 Replies View Related

SQL Server Admin 2014 :: Read Only On Secondary Replica

May 5, 2014

Assume if i have a connection(Application intent readonly) starts with reading, writing and again reading data for a report. how it will works in SQL 2014 Always availability on?

View 3 Replies View Related

Application With AlwaysOn Read Only Replica In Synchronous Commit

Mar 8, 2015

I am trying to implement a read only replica to move much of the data read for an application to the secondary replica. Initially I had the the primary and secondary set to asynchronous commit. QA brought up an issue with creating entities from the application because after the creation of an entity the application turns around and repopulates the entire aggregate object. Well it seems that the application was reading the secondary replica before the data had been committed. Although I understand the issues that synchronous commits can cause, I went ahead and made the change as I expected it to fix the issue. After changing the primary replica to synchronous we still had the error, so I also changed the secondary although that makes no since, but the issue remains.

View 5 Replies View Related

DB Engine :: Table Triggers On Read-only Secondary Replica?

Jun 30, 2015

I was hoping for some information regarding table triggers. We have databases that are part of an AlwaysOn availability group on SQL Server 2012. Some of the tables have table triggers defined. There are both types of triggers, INSTEAD OF and AFTER INSERT, etc.

From my understanding of how secondary read-only replicas work, I am assuming that these triggers have no impact at all when the database is a read-only secondary replica and they only fire when the database is the primary read-write database.

However, after doing a search on the internet, I have not been able to find a definitive source of information.

View 3 Replies View Related

SQL 2012 :: Change Minimum Permissions To Allow Read Access To Change Tracking Functions

May 12, 2015

Trying to determine what the minimum permissions i can grant to a user so they can see the change tracking data

View 1 Replies View Related

SQL Server Admin 2014 :: AlwaysOn Read-Only Replica Routing

Jun 22, 2015

Having an annoying AG/AO problem with the read only routing side of it.

Let me give some specifics first:

2 SQL Server Instances, Not Clustered.
Availability Group is named 'Ireland'

There is a primary Replica and a Secondary Replica, named:

'IrelandPrimary' and 'IrelandSecondary'

There is a listener configured with the name 'ListenIreland' on Port 14330 (the two 3's are correct)

Read Only Routing URLS are configured as follows:
IrelandPrimary tcp://Ireland.dom.local:49891ALL
IrelandSecondary tcp://Ireland.dom.local:49841ALL

So now my problem:

When I try to connect using the ApplicationIntent=Readonly; or even using -K ReadONLY in sqlcmd I get the error telling me that my connection was actively refused.

This is connecting to the Listener, not the instance itself - that works fine. I'm at a bit of a loss now.

To explain what I am trying to achieve is a for a connection to be redirected to the secondary replica when its set for read-intent.

I've just noticed that it only fails when I specify ApplicationIntent=ReadOnly; If I omit the Intent It connects to the read-write database instead.

View 3 Replies View Related

SQL Server Admin 2014 :: Can Have Secondary Replica As Read / Write Mode?

Oct 14, 2014

We have a reporting database which is refreshed daily from prod backup and later creating new tables/views/indexes as part of the refresh job. Is there a better approach we can implement in sql 2012/2014 for this scenario since we are planning to migrate to sql2014.

View 5 Replies View Related

SQL Server Admin 2014 :: AlwaysOn Read Only Replica - SP Execution Error

Oct 8, 2015

We have always on setup in our environment with read only replica. The primary database has 2 schema one is a dbo and other xyz. We have some store procs created in dbo schema and xyz schema. These store procs are being used by SSRS reports to retrieve the data (select only) no data changes will be made.

when we run the store proc from the read only server the storeprocs in the dbo schema run fine but xyz schema are failing with the message saying failed to update the database as this is a read only...

View 1 Replies View Related

SQL Server Admin 2014 :: Grant User Read Access To Secondary Replica?

Sep 15, 2015

I have 3 servers taking part in an AlwaysOn AG.

I want to grant a user READ access to only one replica, and certainly not to the principle.

How do I go about doing this?

View 4 Replies View Related

SQL 2012 :: Secondary Replica In AG

May 27, 2015

in my secondary server the database which is in restoring state , when i checked in always on dash board "This secondary database is not joined to the availability group" ,

View 3 Replies View Related

SQL 2012 :: Dump Every 1 Minute In Secondary Replica?

Jun 9, 2015

SQL is generating dump every 1 min with error

EXCEPTION_ACCESS_VIOLATION reading address 0000000000000020 at

Server is running SP2 CU2.

View 1 Replies View Related

SQL 2012 :: Setup Replica For Databases For Reporting?

Jun 17, 2015

I would like to setup replica for one of the databases for reporting. The current environment is a 2 node cluster(active/passive). I would like to add a 3rd node that can server as a secondary replica. The secondary replica will be on asynchronous commit mode.

The database that needs to have alwayson setup has column level encryption enabled.

* Do I need to backup and restore the service master key on secondary server in order to have the column level encryption to work on secondary server?

* What would be preferred Quorum settings?

* What is the setting for 'readable secondary' for primary and replica db?

* What should be the setting for 'Connections in Primary Role' for primary and replica db?

* We are trying to setup without a Listner. Do I need to setup AG Listner? Can the application exclusively use the [secondary instance name].[replica DB name] without a listner?

View 2 Replies View Related

Replication :: Remove Secondary Available Replica From 2012?

Oct 14, 2015

Environment:-

Windows 2012 R2,
SQL 2012 (Primary Replica)
SQL 2012 (Seondary Replica)
SQL 2012 (Secondary Replica over WAN site)

There are database replicating on three SQL servers. WAN line is having performance issue because of limited bandwidth I have to remove SQL secondary replica over WAN site temporarily and add it again later when the WAN line is upgraded with between bandwidth What is the best practice to remove secondary replica and replicating database and add later from SQL management studio without interruptions on databases?

View 6 Replies View Related

SQL 2012 :: AlwaysOn Secondary Replica - Resolving State

May 21, 2013

I have an AlwaysOn Availability group configured between 2 nodes (Synchronous)

Automatic failover was working fine until recently

I can failover between the nodes manually but automatic failover doesn't seem to be working. In my earlier test, I would shut down the SQL Service on the primary and within seconds, the secondary replica would take over. Recently I have performed the same test and the secondary replica enters the resolving state and the DB in unavailable.

I have tried everything here: [URL] ....

The only change I made was changing the availability mode from Synchronous to Asynchronous - Could that be the cause?

View 3 Replies View Related

SQL 2012 :: Clustering AlwaysOn - Primary And Secondary Replica

Apr 11, 2014

Looking for info on ole/requirement of primary and secondary replica under SQL Server 2012 AlwaysOn.

View 4 Replies View Related

SQL 2012 :: How To Change Backup Replica In AlwaysOn Cluster

May 6, 2014

How can we change the backup replica in Always on Cluster. I am not able to take backup because of this.

View 7 Replies View Related

SQL 2012 :: AlwaysOn Async Replica Back To Sync

Aug 19, 2014

After failing over to the DR replica. All databases are out of sync. DR replicas were setup as async the other 2 are set up as sync. Is this by design. No data has been updated to any of these as they are test dbs. So all dbs should be the same, no data loss.

View 0 Replies View Related

Recovery :: Adding Second Replica To 2012 AG / Cannot Click Next Button

Oct 21, 2015

Trying to add a second replica to my SQL 2012 AG. for some reason i cant click the next button.

View 3 Replies View Related

SQL 2012 :: Setup Snapshot Replication On High Availability Replica?

Jul 9, 2014

We have a vendor that is exposing our database via a High Availability replica. They are geographically far away from us though so we would like to extract portions of the database over to our side for our reporting /warehousing purposes. I was curious if it is possible to setup snapshot replication on a high availability group?

View 0 Replies View Related

SQL 2012 :: VLFs On AlwaysOn Primary Replica After Log Backup From Secondary

Aug 6, 2014

I was working on a job to send me info each morning about database file free space and was noticing some odd things when looking at the log file VLFs for one of my databases in an AlwaysOn availability group.When I run DBCC LOGINFO on the secondary replica for this database, I get what I expect and most VLFs have a status of 0 (indicating the VLFs are reusable or unused). When I run DBCC LOGINFO on the primary replica, all of the VLFs have a status of 2 (active or recoverable).

Since log backups on the secondary replica in AlwaysOn still truncate the log in the primary replica, I would expect that the VLFs in the primary replica would also be mostly in a reusable or unused state. My log file sizes are the same size on each server and my backups are completing successfully. what might be causing the VLFs on the primary replica to have a status of 2 in DBCC LOGINFO when taking log backups from the secondary replica?

View 6 Replies View Related

SQL 2012 :: Identify Whether Files Are In Read / Write Or Read Only

Mar 24, 2015

How to identify whether the files are in read write or read only?

View 1 Replies View Related

SQL 2012 :: AlwaysOn Availability Group Replica Ends Up With User Account As Owner

Sep 5, 2014

Setting up a test AlwaysOn Availability Group for one database.

However, whenever I restore the database to the replica server and join it, it ends up with my user account as the owner of the database.

Obviously I do not want a user account as the database owner, but since it is read-only I cannot modify it directly. If I were able to fail the AG over to the replica, I could change the owner then, but I cannot due to business requirements. this AG is to essentially serve as a replacement to log shipping.

I tried doing the backups and restores using EXECUTE AS login = 'sa', and yet it still shows up as my user account.

View 2 Replies View Related

SQL 2012 :: Read Committed For Read Only Database?

Jun 27, 2014

i have a database which get refreshed every day from client's data . and we need to pull heavy data from them every day as reports . so only selects happens on that database.

we do daily population of some table in some other databases from this daily refreshed DB.

will read uncommitted or NOLOCK with select queries to retrieve data faster.

there will be no dirty read as there are NO DML operation in that database so for SELECT which happens concurrently on these tables , will NOLOCK work?

View 2 Replies View Related

SQL 2012 :: Change Read-only And Read-write

Aug 15, 2014

Can a user of db owner role of a database change the databse option to read only and read-write?If not what permission I need to grant to the user?

View 1 Replies View Related

No Read Permissions!

Mar 23, 2004

I am trying to import an Access DB into SQL Server, I am getting the following error:

Record(s) cannot be read; no read permissions on {tablename}

I get this message after I select all the tables that I plan on importing into SQL Server from the access database, so my table don't get imported.

Does anyone have an I idea why I am getting this error and how I can correct it?

View 4 Replies View Related

User Permissions - Read Only With Create View

Jan 11, 2008

I need to create a new login with SELECT rights so the users can view all tables with no UPDATE, DELETE, OR INSERT rights. But this user needs to be able to CREATE VIEWS. I have assigned the user to the Public role and gone in and modified Securables for the Database to be able to CREATE VIEW. When I connect using my new user and try to create a view, I get the error message: CREATE VIEW permissions denied in database 'test01'.

Help Please

TMDavis

View 1 Replies View Related

Restored My SQL Server DB First Time, Now Its Read Only? How To Set Correct Permissions

May 9, 2008


Hi all,

I am new to SQL Server 2005 and databasing in general, I have had a webhost restore a copy of my online database but now it is read only.

Could someone tell me how I go about letting the database to be writeable etc for online use.

If I right click the db and go to permissions there is nothing in there, should there be?

Do you have to manually set permissions for each table after restore???

Any help would be great

View 5 Replies View Related

SQL 2012 :: Read Only Copy Of Particular Database?

Aug 28, 2014

We are using 208r2. We used to generate simple reports against to prod. The production is running slow. Just we need the production fresh copy all the time. We are using mainly one database. So I need to have read only copy of that particular database which is sync with the production.

View 3 Replies View Related

SQL 2012 :: Read Only Database Transfer

Dec 4, 2014

I have an inter-company problem.

The one company gathers data into a SQL database hosted within their secure network and now one of the companies (that they are contracted to gather the data for) wants a backup of the data or a replicated database to be able to be placed onto a external HDD or different SQL server on their own network and server.

The catch is that to maintain their data security the original company doesn't want the company that is receiving the data to be able to edit the data. They are concerned that someone might change the data and claim that the data that they gathered is incorrect.

Is there a way to ensure the SQL database remains entirely read only?

View 1 Replies View Related

SQL 2012 :: Read-only Routing In AG Group

Mar 16, 2015

Unable to access the 'T' database because no online secondary replicas are enabled for read-only access. Check the availability group configuration to verify that at least one secondary replica is configured for read-only access. Wait for an enabled replica to come online, and retry your read-only operation. Changed database context to 'T'.

I have 2 sql servers running in an AG group. SQL 2 is fully syncd and is used for read only reporting.The connection from the listener using ReadOnly works and connects to SQL 2. The problem is, when a database in SQL 2 is suspended from the AG group, the listener does not connect to the SQL 1 (primary).

The AG group is setup exactly like this:

Readable Secondary = Yes for both SQL 1 and 2, Availability Mode = Synchronous

why the listener does not connect to primary server?Connection in primary was set to "Allow read/write connections" for the AG. This meant "Connections where the Application Intent connection property is set to ReadOnly are not allowed. " Setting to "Allow All Connections" worked.

View 0 Replies View Related







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