Recovery :: Read-only Routing With Single Application Connection?
Nov 30, 2015
My application supports a single database connection and in the app console I can produce reports. If I include the app database in an AlwaysOn availability group with a read-intent replica will SQL automatically route the “selects” to that second instance thus offloading my application’s reporting activities or I need a separate db connection (maybe from a reporting app or cli) with a connection specifying read-only intent?
View 4 Replies
ADVERTISEMENT
Aug 3, 2006
Hi to all DBAs,
I would like to ask if there will be a write and concurrency issue if i would create an online application with just one user connecting to the database, just like most open source php/mysql that can be downloaded
i.e
Setup 1. I will grant a single user that will connect to a database and will be set to a config.inc.php file and then create a table users (userid, username, password) and this table will be used for the application authentication and access control.
Setup 2. or is it much better to grant users that will connect to the database and have the table users for access control of the application?
to further illustrate my query:
Setup 1 would be:
###################Table: Users
user a@ipadd --> db1 --> userid mary --> myOnlineApp
user a@ipadd --> db1 --> userid john --> myOnlineApp
user a@ipadd --> db1 --> userid paul --> myOnlineApp
and Setup 2 would be:
#####################Table: Users
user mary@ipadd --> db1 --> userid mary --> myOnlineApp
user john@ipadd --> db1 --> userid john --> myOnlineApp
user paul@ipadd --> db1 --> userid paul --> myOnlineApp
will Setup 1 be enough if I will use SQL Server as database?
or Setup 2 is better user/database architecture?
This application will be online enrollment for a school with 16,000 students
very much appreciated for the feedbacks and suggestions
^_^x
View 3 Replies
View Related
Aug 11, 2005
Dear members,I'am thinking about the "best" way to connect to my sql-server viaADO.Net (if there is a best way).My application uses the sql-server very intensively. At the momentevery database-operation opens a connection, executes and then closesthe connection.Another way would be to use only a single connection to the database,which is opened when the application starts.What do you think is the better way to get a high performing sqlserver: using one single application connection vs. using oneconnection for every operation?Cheers, Sebastian
View 2 Replies
View Related
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
Nov 15, 2014
I setup an AG with a listener (AO1) on three servers.
Server1 = Primary, Readable Secondary = No
Server2 = Secondary, Readable Secondary = Read-intent only
Server3 = Secondary, Readable Secondary = Read-intent only
Connecting to AO1 with default settings, I end up on Server1.
If I attempt to connect to AO1 with specifying ;ApplicationIntent=ReadOnly (with or without specifying the db name) in SSMS, still lands me on Server1.
Also on topic, in this scenario I would actually want Server1 to be a readable secondary (in the event of a fail-over). So If I did set it as Yes, even If I do get the issue above working, won't I always land on Server1 then?
View 9 Replies
View Related
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
Aug 26, 2015
I'm trying to do Sharepoint DR with Log Shipping and every thing configured except one thing which is switch the WSS_Content (Standby /Read-Only) DB to be ready and Write.
I tried from
GUI or ALTER DATABASE [WSS_Content] SET
READ_WRITE WITH NO_WAIT
but I received the below error:
Database WSS_Content is in Warm Standby
View 9 Replies
View Related
Aug 27, 2015
We have several read-only nodes in our AlwaysOn cluster, which are set to use Synchronous-commit mode, which ensures that the logs are updated on the read-only nodes before any update statements complete. Even with this option, if we query a read-only node before the logs have been processed, we can read old data. I would like to know a strategy to ensure that a read-only query will definitely return up to date information. I had an idea that if I just used a different transaction type, like Serializable, that it might block the read-only query from actually getting the data until after the log file was processed, but I have not tried it, yet.
I would like to move more queries to the read-only nodes, in an effort to offload CPU utilization from the primary node.
View 2 Replies
View Related
Aug 14, 2015
After manual AG fail-over from primary to secondary the application is not able to connect the listener name for atleast for 5 - 10 mins
The telnet fails during this time from app server, the listener ip is on muti-subnet.
At the same when i try to connect it from SSMS from a remote machine it works fine.
View 2 Replies
View Related
Oct 29, 2015
1. I am looking data base solution for highly critical application. what type of HA/DR solution will suite for this.(always on, transactional , log shipping or mirroring). make sure all secondary nodes should be identical to production .
2. for any need to upgrade /patching /maintenance work, production should not be able to down. No downtime 100%.
View 6 Replies
View Related
May 8, 2006
hi
i have a problem with reading sql mobile database existed on the pc
i made a sql mobile database connection with ( Add New Datasource ) and then set
the datasource of dataviewgrid to display the returned dataset .
at run time i have an exception said :
cann't find the library with the name sqlceme.dll as i remember ,
can you help me solving this problem because i very need this step , please ?
regards
View 4 Replies
View Related
Sep 16, 2015
Assuming all windows servers belonging to the WSFC are on the same subnet, will the AG listener become a single failure point in system if all Application servers connect to the AG through the listener? If the answer is yes, what are the options to resolve this issue?
View 3 Replies
View Related
May 1, 2015
SQL Server 2012: Out of all the databases in the instance we have a requirement in which we need to maintain a high availability for the databases around (128). Our team believed log shipping will apt for this requirement but not sure on it's limitations, how many databases are allowed or supports this log shipping from a single instance.
View 7 Replies
View Related
Oct 29, 2005
Hi,I've got this dts package in sql server 2000 sp4 that has severaltransformation tasks with an oracle database (10g) as the destination.The package executes successfully when run through the dts designer butwhen run using dtsrun, I get the following error at the completion ofall tasks in the dts package. The data inserts into the oracle databasebut i always get this Application errorThe Instruction at "0x7c8327f9" referenced memory at "Oxffffffff". Thememory could not be "read"Does anyone know how I can fix this?ThanksLyn
View 2 Replies
View Related
Mar 5, 2007
I'm using strongly typed datasets in my first ASP.NET 2.0 web application. I come from ASP Classic, not an earlier version of .NET, and feel like I'm in another world. I'm slowly getting my head around datasets, but one thing I can't find any information on is how to read the data in a single record?I'm not talking about for next loops, or accessing row information as a repeater or other control is filled. I'm talking about reading the data returned by a method that returns a table containing a single record. This is what I have: Dim BookAdapter As New BooksTableAdapters.BooksBBTableAdapter Dim organizations As Books.BooksBBDataTable Dim organization As Books.BooksBBRow organizations = BookAdapter.GetDataByOneBook(sBookID) Dim sDropOff As String Dim sOrganization As String Dim sContact For Each organization In organizations If organization.DropOff = 1 Then sDropOff = "True" Else sDropOff = "False" End If sOrganization = organization.Organization sContact = organization.ContactName Next sBody = "Books Listing" & Chr(10) & Chr(10) sBody = sBody & "Organization: " & sOrganization & Chr(10) sBody = sBody & "Contact Name: " & sContact & Chr(10) sBody = sBody & "Email: " & organization.Email & Chr(10) sBody = sBody & "Phone Number: " & organization.Phone & Chr(10) I'm using the FOR NEXT, but this is silly since I only have one record. GetDataByOneBook(sBookID) does exactly what is says, it returns a single book with a specific bookID.Not only is this silly, it doesn't work. Using sContact as an example, it's Dim'd as a string. In the FOR NEXT loop, organization.ContactName has the right value, and it appears to be assigned to sContact correctly, but when I try to use sContact in sBody, I get an error saying that sContact has been used before it is assigned a value. Maybe the variables lose their scope outside the loop? Maybe I could get around this by building sBody inside the loop, but there has to be a better way! Diane
View 2 Replies
View Related
Dec 5, 2005
Server Error in '/' Application.
Database 'C:INETPUBDEMO.TRUTHSTONE.COMAPP_DATAASPNETDB.MDF' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.Cannot open user default database. Login failed.Login failed for user 'NT AUTHORITYNETWORK SERVICE'.
Hi,
Strange one. I have copied my working web-site to the production server and get this message.
Tried copying new set of database files and reset the server to ensure no applications could be accessing the database files. Still get the same error.
Works fine on my Visual Studio VWD Express version.
Mitch
PS I am not trying to upgrade the database, just use it!
View 1 Replies
View Related
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
Jan 17, 2006
First I want to say thanks to the folks how have helped me over the past week or two.
I'm missing a crucial piece of insight. How do I read a single piece of data from a SqlDataSource which only hold one row of data into a declared variable?
string zUserName = SqlDataSource.(get the value in the row that is labeled UserName)
It really doesn't matter to me whether it is an SqlDataSource or some other data container that hold the data I've selected. My goal is to be able to read some data from some predefined datasource into a declared variable.
If I am approaching this problem in the wrong way any advice or article links you could give me would be grealy appreciate.
Thanks, Bill
View 1 Replies
View Related
Oct 31, 2007
i am having 2 sql servers one is web sql server server and other server is my local sql server. i am making web application through which i want to connect both sql servers at a time and by selecting data from web server i want to insert it into my local sql server both having same database on which i want to work , i want to know how it can be done
my idea as follows in web.config i specify 2 connection string and by selecting data from websql server database table i going to store it in dataset and then i return dataset to another function which connects to local sqlserver database.but database records are much large. can any body guide me .
i am going to place my web application on local server (C# asp.net 2.0) .
thank you,
i tried this code
c# file
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Uupdatedata();
}
public void Uupdatedata()
{
string constr1=ConfigurationSettings.AppSettings["abccon1"];
string constr2 = ConfigurationSettings.AppSettings["abccon2"];
System.Data.SqlClient.SqlConnection dbcon1 = new System.Data.SqlClient.SqlConnection(constr1);
dbcon1.Open();
System.Data.SqlClient.SqlConnection dbcon2 = new System.Data.SqlClient.SqlConnection(constr2);
dbcon2.Open();
SqlDataReader dr;
SqlCommand cmd = new SqlCommand("select * from Unit_Master",dbcon1);
dr = cmd.ExecuteReader();
while (dr.Read())
{
string Sql = "insert into Table1(Unit_Id,Unit_Desc) values(" + dr.GetInt32(0).ToString() + "," + dr.GetString(1) + ")";
SqlCommand cmd1=new SqlCommand (Sql,dbcon2);
//cmd1.EndExecuteNonQuery ();
}
//dr.Close();
//dbcon2.Close();
}
web.config<configuration>
<appSettings>
<add key="abccon1" value="Data Source=comp01;Initial Catalog=abc;User Id=sa ; Password=sa"/>
<add key="abccon2" value="Data Source=comp01;Initial Catalog=abctest;User Id=sa ; Password=sa"/>
</appSettings>
<connectionStrings/>
this 2 databases are from single my loacl server
it wont work it gives exception
please healp me.
View 4 Replies
View Related
Aug 29, 2007
my asp.net application communicate with SQL database, but when I have single quote ( ' ) in my string then it throws error. and it does not insert that string in database. How can I solve this problem . or give me some suggestions on this issue.
thank you
maxmax
View 3 Replies
View Related
Aug 18, 2015
I'm working to test out a recovery scenario involving a SQL 2008 R2 2 node cluster. I want to restore it to a standalone server. The nodes are VMware VMs using physical RDM for the shared storage. Using Veeam as the backup tool. Veeam doesn't work with physical RDM so I'm dumping the databases (all Simple) elsewhere to be picked up and replicated with Veeam. No problem there. For my DR I have a vanilla 2008 R2 server being replicated so that I can use it as a base to restore SQL. So far the testing has worked ok. What I'm trying to learn is the best way to restore the cluster to the standalone server and have it look the same to the affected app servers.
The cluster has several instances. In my testing, I've recreated the instances, but I don't think they show up as they do on the cluster. For example, if the Windows server name is SQL01, and I install an instance called SQL-APP, SELECT @@servername while connected to the instance still shows SQL01 but in production it shows SQL-APP. What do I need to do to get everything to match up? I suspect that, while I haven't seen any problems, there could be something I'm missing that would manifest itself later.
Also, in testing, am I better off to delete the cluster server account from AD and join the domain with the DR server under the same name? (this is an isolated bubble so no impact on production).For the purpose of this scenario, assume all other required servers (DC, DNS, application, etc.) are present in the test environment as they would be in production and nothing requires resources outside the bubble. The only item affected is the SQL cluster.
View 7 Replies
View Related
May 27, 2015
In our(my company) current design we want to switch from failover clustering to Always On as high availibility solution.
I am currently testing the availiblity Group Listener function and have two questions regarding this.
First of all, is it possible to connect to a a listener by just using its "name" instead of "name,port", it is for our users very inconvenient to start using ports. If this is possible, where can I find information on how to configure this?
Second, is it possible to use the Availiblity Group Listener as loadbalancer or in combination with a loadbalancer to split the users over two or more nodes?*note we don't use azure.
View 4 Replies
View Related
Jul 20, 2015
SQL 2012. I am working in understanding more the feature <AlwaysOn>. I have already worked with FCI (Failover Cluster Instance) and I would like to understand more about <AlwaysOn>.
Browsing internet/documentation I am getting more knowledge about <AlwaysOn> but a doubt persists:
1) Combination of FCI + AlwaysOn (2 SQL servers for FCI providing cluster instance: SQLClusterSQLReporting + 1 SQL server (at least) for <AlwaysOn>: SQLAOn/SQLReporting)
If the FCI instance is called SQLClusterSQLReporting, all the connections are mapped to this name.
But if the<AlwaysOn> feature is added to the system, in case of failure the name of <SQL Instance AlwaysOn> must be used therefore I am obliged to re-map all my connections to SQLAOn/SQLReporting.
QUESTION: IS it correct?
If yes, I do not understand the usefulness for the <AlwaysON> feature that lead to re-map all the connection.
In my opinion it should be a <MAIN> SQL Instance covering both <FCI> + <AlwaysOn>.
View 4 Replies
View Related
Oct 26, 2015
I have 2 servers. On one server i install sql server 2014 and its working fine, i am able to get connected with sql with domain account.
From second machine i want to connect my sql server, for that i create udl file when i give sql server address and click refresh getting following error: Connection failed cannot generate SSPI context
Firewall is off, created fire rule too, i am able to get ping first machine by ip and servername but still getting issue.
View 3 Replies
View Related
Mar 12, 2007
I had created a trigger which sees that whether a database is updated if it is its copy the values of the updated row into another control table now I want to read the content of control_table into BIzTalk and after reading I want to delete it.Can any one suggest the suitable ay to do this?
View 3 Replies
View Related
Mar 18, 2008
I have app.config<connectionStrings>
<add
name="OrganizationConnectionString" connectionString="Data
Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|inDebugDatabaseOrganization.mdf;Integrated
Security=True;Connect Timeout=30;User Instance=True" providerName="System.Data.SqlClient"/></connectionStrings>Code behind:
string ConnString
= ConfigurationManager.ConnectionStrings["OrganizationConnectionString"].ConnectionString; I am getting "ConnString" value null. How handle this?
View 4 Replies
View Related
May 9, 2012
I'm taking a database(read-only) backup from one server and restoring it on other server. As soon as restore is done it is bringing database into single-user read-only mode.
why it is bringing the database into single user mode ?
View 1 Replies
View Related
Oct 15, 1999
Can anyone HELP!!
I have a system set up with 2 servers, the master server replicating the data to the backup server. Each server has two network cards, 1 which links directly to the other server.
The problem is the replication is being routed round the network making the direct link useless.
How can this be ammended!!
They are both logging into the same primary controler.
I am open to sugestions
View 1 Replies
View Related
Mar 1, 2007
Is there a way to route a file directly to a printer? I have a process that creates PDF file in a known location and I would like to route them directly to the printer after creation.
View 2 Replies
View Related
Mar 12, 2008
Hi There
I cannot find anything online or in BOL about the proper format for a named instance in the routing address.
is it simply
ADDRESS = 'TCP://SERVERNAMEINSTANCENAME:4026'
or do you need to provide the port number for the instance.Not sure if TCP recognises the instance part?
Thanx
View 3 Replies
View Related
Jul 10, 2006
Hi
We are currently starting new project and evaluating possibility of using Service Broker in it but seems there could be some problems
We have a central server with a central database and several hundred of mobile? users. Information ( actually a subset which is specific to a particular user ) should be sent from/to central database and we wanted to use Service Broker for this.
When you set up a route in Service Broker you need to define Network address which I believe should be an IP address or DNS name.
The problem for us is that our mobile? users do not have static IP addresses and I am not sure we can assign a unique dns to all of them.
Mobile users can connect to internet in different places and hence get different IP addreses.
Is there a solution to this problem?
Rsgards,
Leonid.
View 2 Replies
View Related
Jul 30, 2015
I have a SQL 2014 SP1 set of servers with two asynchronous copies of an availability group. One of the asynchronous sites is down and SQL can no longer replicate the changes. I need to understand how long SQL Server can continue this way before the secondary replica will no longer be able to catch up. I assume this is really tied to the transaction log on the primary replica but would like it clarified.
View 4 Replies
View Related
Nov 6, 2015
I have a two node HA Always on group using a Listener. I would like to force a certain AD group to always be forced to the secondry node as they would only ever need to run select statements. If there an easy way to do this without using logon triggers?
View 6 Replies
View Related