2 Database Connections For Redundancy.

Sep 21, 2005

Hey Guys,We have a merge replication on 2 MsSQL servers and wondering if its possible to allow the 2 connection strings in our application?So if SQL Server 1 doesnt responed, then the other one will take over.we currently have this in our global.asax:Public Shared dbConnString as String = "Server=xxxx;Initial Catalog=xxxx;User Id=xxxx;Password=xxxx;" So is it possible to change this to look up the first server and then connect to a second server if needed?Thank you for any advice at all.

View 3 Replies


ADVERTISEMENT

Database Redundancy

Dec 3, 2004

My company has valuable data being constantly logged to a database 24/7. Actually, the data logs to two separate database systems in case one goes down for whatever reason such as power failure, routine maintenance, glitch, whatever. These two systems are housed at different physical locations.

We are planning to set up a third database system which polls the other two every minute. It compiles and mantains a deduped, clean, and complete collection of data from the other two database systems. If one of the first two systems goes down or misses a row, the third will automatically get the data from the other system. If this deduped database system goes down, we can rebuild the data from the other two.

Does this seem like the right route to take or is there a simpler or safer route available?

View 14 Replies View Related

SQL Redundancy

Aug 20, 1999

What is the best way to insure 100% availability of our SQL databases? Should we use clustering, mirrored servers (Vinca or Double-take)?
What are other organizations doing about this?

View 2 Replies View Related

Redundancy - Can It Help?

Jun 7, 2006

I have read the data redundancy is bad for relational databases. Is there such a thing as a good time to use redundant data for more complex queries?

ie. if you have a query that joins 4 tables (or more) and returns 100+ records...

Table 1 - 1000 records
Table 2 - 500 records
Table 3 - 500 records
Table 4 - 30,000+ records

...would it be better to have some redundant data in table 1 rather than calling table 4.

Thanks for any guidance.
- Andrew

View 1 Replies View Related

Redundancy

Mar 3, 2004

Hi All,

After some feedback from some of you who might have done something similar:

We are going to be having 3 SQL servers (running SQL Std licence).
2 Are live
1 is a hot swap in the event that we have a total loss of either of the SQL boxes.
Basically what I am wanting to do, is have the hot swap being updated periodically so that the databases are being replicated on this box, so that if the live one fell over, we could very quickly get the hot swap into take over.

Can anyone offer any perspectives on the best method of attack for this?

Thanks in advance for your thoughts.

Cheers

View 3 Replies View Related

How To Stop Data Redundancy

Dec 29, 2005

Hey guys...i've got a problem wif my stored procedures...in which my page keep repeating the same data...so to counter this problem i use SELECT DISTINCT instead of just SELECT..but the problem is when i change SELECT into SELECT DISTINCT...the page will not be display,page error....for your information my stored procures was auto generate from some security sofware...so can guys help me out with my code...
SELECT DISTINCT t.TargetID, 'V' RecordType, t.TargetDNSName [Target DNS Name], t.TargetIPAddress [Target IP], t.TargetIPDisplay [Target IP Display], t.TargetOSName, t.TargetOSRevisionLevel, v.SecChkID, v.Severity, sc.TagName [Tag Name], sc.ChkBriefDesc [Tag Brief Desc], sc.ChkName [Tag Chk Name], CONVERT(NVARCHAR(4000),sc.ChkDetailDesc) [Tag Detail Desc], CONVERT(NVARCHAR(4000),r.RemedyDesc) [Remedy], o.ObjectID, o.ObjectTypeDesc [Object Type Desc], o.ObjectName [Object Name], s.SensorDataID, a.AttributeName, a.AttributeValue, NULL [Port],NULL [Service Name],NULL [Protocol] 
FROM #Vulns v INNER JOIN TargetHost t (NOLOCK)  ON v.TargetID = t.TargetID INNER JOIN (SecurityChecks sc (NOLOCK)  LEFT OUTER JOIN Remedies r (NOLOCK)  ON sc.SecChkID = r.SecChkID) ON v.SecChkID = sc.SecChkID INNER JOIN ObjectView o (NOLOCK) ON v.ObjectID = o.ObjectID LEFT OUTER JOIN SensorData1 s WITH (NOLOCK, INDEX(SensorData1_AK3)) ON v.ObservanceID = s.ObservanceID AND s.Cleared = 'n' LEFT OUTER JOIN SensorDataAVP a (NOLOCK) ON s.SensorDataID = a.SensorDataID AND a.AttributeValue IS NOT NULL AND a.AttributeValue != ''UNION ALL

View 16 Replies View Related

Cyclic Redundancy Check?

Feb 25, 2000

I was trying to modify a table and I got a "data error: cyclic redundancy check"

So I ran a DBCC CHECKDB and got this:

Server: Msg 823, Level 24, State 1, Line 3
I/O error 23(Data error (cyclic redundancy check)) detected during read of BUF pointer = 0x11c902c0, page ptr = 0x14d66000, pageid = (0x1:0x3d), dbid = 26, status = 0x801, file = d:MSSQL7datacontent_Data.MDF.

Connection Broken

This is scary stuff! What does it mean and how do I fix it?

View 2 Replies View Related

Indexed Views - Group By Redundancy

Jul 20, 2005

I have a table that I want to have a precalulcate length on a character fieldand group and sum up. Thought I could do this by creating a view with a groupby clause that includes the sum function. Unfortunately, the compilercomplains with:A clustered index cannot be created on the view 'MyView' because the indexkey includes columns which are not in the GROUP BY clause.Wish I could verbalize the problem a little better, but the following pareddown example should serve as a demonstration:SET ANSI_WARNINGS ONSET ANSI_PADDING ONSET ANSI_NULLS ONSET ARITHABORT ONSET CONCAT_NULL_YIELDS_NULL ONSET QUOTED_IDENTIFIER ONSET NUMERIC_ROUNDABORT OFFGOCREATE TABLE myTable(myID INT NOT NULL,RecNum INT NOT NULL,TestString VARCHAR(80) NOT NULL)GOINSERT INTO myTable VALUES(1, 1, 'a')INSERT INTO myTable VALUES(1, 2, 'ab')INSERT INTO myTable VALUES(2, 2, 'abc')GOCREATE VIEW dbo.MyView WITH SCHEMABINDING ASSELECTmyID = myID,slen = SUM(LEN(TestString)),recn = COUNT_BIG(*)FROM dbo.myTableGROUP BY myIDGOCREATE UNIQUE CLUSTERED INDEX IX_MyView ON MyView(myID, slen)-- A clustered index cannot be created on the view 'MyView' because-- the index key includes columns which are not in the GROUP BY clause.GODROP VIEW MyViewGODROP TABLE myTableGOThanks,Chris Rathman

View 3 Replies View Related

SQL 2012 :: VMWare Providing Failover And Redundancy

Sep 30, 2015

Today a vendor bluntly stated that VMWare provides the same failover and redundancy for SQL that would render "AlwaysOn" high availability unnecessary.

Essentially that VMWare would detect a problem and failover and have .9999 uptime .

View 2 Replies View Related

SQL Server 2008 :: Error 23 - Redundancy Check Failed

Feb 2, 2015

Automated and manual backup done through SQL Management console are failing with error 23 - redundancy check failed.

This is a critical production db. Other db in same instance backs up ok.

Is there a way to fix this?

View 4 Replies View Related

Database Create ODBC Connections To Access Database Directly And Update Data?

Sep 10, 2012

We have a SQL database that uses Active Directory with Windows Authentication. Can users that are members of the Active Directory group that has read/write access to the SQL database create ODBC connections to access the database directly and update the data? They dont have individual logins on the server. They are only members of the Active Directory group that has a login?

View 1 Replies View Related

Database Connections

May 25, 2006

Hi all,

I am fairly new to mobile development and im trying to write a simple application that can read, write from a SQL Server Mobile Database and load data into a list view. The problem im having is trying to find examples on how to do this and i cant seem to get many of the ones i find to work properly. Im still use to recordsets and adodb and if anyone has any examples on how to do this that would be great.

Also, would it possible if someone could explain this code to me as well

 Dim conn As SqlCeConnection = Nothing
Dim cmd As SqlCeCommand = Nothing
Dim rdr As SqlCeDataReader = Nothing

Try
' Open the connection and create a SQL command
'
conn = New SqlCeConnection("Data Source = AdventureWorks.sdf")
conn.Open()

cmd = New SqlCeCommand("SELECT * FROM DimEmployee", conn)

rdr = cmd.ExecuteReader()

' Iterate through the results
'
While rdr.Read()
Dim employeeID As Integer = rdr.GetInt32(0) ' or: rdr["EmployeeKey"];
Dim lastName As String = rdr.GetString(5) ' or: rdr["FirstName"];
End While

' Always dispose data readers and commands as soon as practicable
'
rdr.Close()
cmd.Dispose()
Finally
' Close the connection when no longer needed
'
conn.Close()
End Try


Thanks

 

byeadon

View 1 Replies View Related

Enquiry Regarding Database Connections

May 19, 2007

Hi to all,
I was visting one hosting company website and was reading there hosting plans. One line I got there (Maximum number of 50 simultaneous connections are allowed per user/DataBase.). What is the meaning of this line?
Big Thanks!
Harsh 

View 2 Replies View Related

Database Connections Using Facebook As An Example

Feb 20, 2008

I'm trying to work out how facebook displays so much information easily. Each time you visit your profile a load of new info is shown. Is each piece of info, which is stored in different table, gathered right there and then? If so, isn't that a helluva lot of connections? I'm trying to implement something into my website where it records history, a it like on facebook when it says "Steve has written on Paul's wall" the names are clickable. Has the information been stored like:
 
Name1ID ActionID Name2ID23432        56          32432
 
If so, wouldn't 3 connections be needed? 2 to retrieve the names and 1 for the action? It would be easier to store the info as "Steve has written on Paul's Wall" in 1 field, but it wouldn't be dynamic. And if the page shows a lot of information like that, it's hundreds of conections on just 1 viewing.  I'm still learning and am also wondering how many connections per page would take up a lot of resources?
 
Thanks

View 1 Replies View Related

MSDE Database Connections

Nov 13, 2003

I'm using Visual Studio.Net enviroment, i have SQL desktop Engine installed and everything is working great. I have a problem that whenever i create a new database connections i can NOT delete it. I know that i have to select the node containing the connection and then press the DEL Key, but it seems that the delete option is not valid!

Any Suggestion?

View 3 Replies View Related

Remote Database Connections With 6.5

Apr 11, 2001

I have a need to connect to a remote (i.e. database on the clients site) SQL Server database from a live application. It is relatively easy under Oracle, but I havent tried to do to an SQL Server. Has anyone done this? The remote SQL Server database in question is 6.5
You can set up odbc connections to remote clients (99% sure on this) so you could go this way. You can also connect directly to a sql box through an IP address in sql7, but I am not too sure how it is with 6.5.

View 1 Replies View Related

Number Of Connections To A Database

Jan 5, 2004

Is there any way to know the number of current connections to an SQL Server Database? Also how can one change the max pool size (for the number of connections allowed to the database)?

Thanks.

View 1 Replies View Related

View Connections To Database...

Sep 25, 2007

Ill make this question simple....

In Access you knew someone was in a database if there was a LDB file.
that LDB file would tell you the "computer name" of who had the connection.

In SQL Express 2005....how can you tell that information?

Thanks in Advance.

View 3 Replies View Related

Dropping Connections To Restore Database

Aug 3, 2000

Hello all,

I need to restore my database and I keep getting a database in use error. Can someone tell me the easiest way to drop all connections to a database and open it exclusively?

Also, I'm not sure where this connection is coming from, there is another database on the same machine that has user connected, can these connections be the problem?

Thanks

Kevin Kraus

View 3 Replies View Related

Database Setup/ Number Of Connections

Jul 15, 1999

I am new to SQL Server 7 and am not sure how to handle setting up/importing FoxPro databases. The consultants that setup the database before me have combined all of the FoxPro databases into one big database in SQL server. The reasoning was that for user applications to have access to different databases in SQL they would need a connection for each database they are using, so if all the data is put into one database then the user would only have one database connection instead of 6 or 7.

Does this make sense to anyone? Someone else thought that this might have been true is SQL Server 6.5 but not in SQL Server 7.0.
Any help will be appreciated.

Mike

View 1 Replies View Related

Active Database Connections SQL Express, How Many

Jun 12, 2006

How can I determine if everyone has logged off of the SQL Express database, ie, no one else is connected.

I need to clean up some files that are generated in my code, but I only want to do that when everyone has logged off the database?

In MS Access, I could try to re-open the MDB file exclusively.

Is there a connection number etc?



View 3 Replies View Related

Kill Just Connections To A Table Instead Of Database ?

Mar 12, 2008

Is it possible to kill just connections to a table instead of database ?

Is it possibe to stop all new connections to a table ?

View 5 Replies View Related

Preventing ODBC Connections To A SQL Database

Oct 4, 2007

I have a user AD account SOPUSJSmith for example. I have given this account security admin at the SQL Server level and dbo at the database level. Is there any way to prevent them from using ODBC to pull data into an Access DB or an Excel spreadsheet?

Thanks in Advance - SOX is killing me!

View 4 Replies View Related

Local Host Not Running Database Connections

May 6, 2008

hi my local host cannot open the connection to my database, whilst testing with vwd seems to be able to do this? other server side functions work (response.write("hello world"))
in my iis the version of .net it says its running reads: 2.0.50727, though when i go to add / remove programmes i have 3.5 there? maybe its nothing to do with .net versions?
thanks in advance for your help
 pete

View 5 Replies View Related

Dropdownlist: Database Connections Problems At EditItemTemplate

Apr 25, 2006

Hello,
I'm attempting to generate a dropdownlist by binding it to a database table.  My screen has a view of the records plus a footer for inserting new records.  I want to populate a drop down list of items from the database on both FooterTemplate and EditItemTemplate.  I can successfully create the list on FooterTemplate (the insert new record fields).  Here, I have no problems with my database connections.
On page load, if I hit 'Edit', it gives me this error:
There is already an open DataReader associated with this Connection which must be closed first.
I tried closing the datareader and I get an error: Invalid attempt to Read when reader is closed.
Here's the snippet of code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
LoadDataFromDB()
If Not IsPostBack Then
DataBindGrid()
End If
End Sub
Sub LoadDataFromDB()
Dim strSQLStmnt As String
Dim cmdDefaults As SqlCommand
' Create new command object passing it our SQL query
' and telling it which connection to use.
strSQLStmnt = "SELECT tblTemplates.TemplateID, tblTemplates.Description, " _
& "tblTemplates.Tuition, tblTemplates.Books, tblTemplates.TrainingTable, tblTemplates.Housing, " _
& "tblResidency.ResidencyType, tblCategory.Type, tblCategory.Description AS CategoryDesc, " _
& "tblScholarship.ScholarshipType FROM tblTemplates INNER JOIN tblResidency ON tblTemplates.ResidencyID = " _
& "tblResidency.ResidencyID INNER JOIN tblScholarship ON tblTemplates.ScholarshipID = tblScholarship.ScholarshipID " _
& "INNER JOIN tblCategory ON tblTemplates.CategoryID = tblCategory.CategoryID"
cmdDefaults = New SqlCommand(strSQLStmnt, conDefaults)
' Open the connection, execute the command, and close the connection.
conDefaults.Open()
rdrDefaults = cmdDefaults.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
DefaultsDataGrid.ShowFooter = True
End Sub
Sub DataBindGrid()
DefaultsDataGrid.DataSource = rdrDefaults
DefaultsDataGrid.DataBind()
End Sub
Function BindResidency() As DataSet
'Populate the ddlDataSet
Const strSQLDDL As String = _
"SELECT Distinct ResidencyID, ResidencyType FROM tblResidency"
Dim myDataAdapter As SqlDataAdapter = New _
SqlDataAdapter(strSQLDDL, conDefaults)
myDataAdapter.Fill(ddlDataSet)
Return ddlDataSet
End Function
And the asp.net:
      <asp:TemplateColumn HeaderText="Residency">       <ItemTemplate>        <%# Container.DataItem("ResidencyType") %>       </ItemTemplate>       <FooterTemplate>        <asp:DropDownList id="add_residency" runat="server" Width="178px" DataSource="<%# BindResidency() %>" DataTextField="ResidencyType" DataValueField="ResidencyID">        </asp:DropDownList>       </FooterTemplate>       <EditItemTemplate>        <asp:DropDownList id="edit_residency" runat="server" Width="178px" DataSource="<%# BindResidency() %>"  DataTextField="ResidencyType" DataValueField="ResidencyID">        </asp:DropDownList>       </EditItemTemplate>      </asp:TemplateColumn>
Any help would be appreciated!
Thanks,
Curtis

View 2 Replies View Related

Mulitple Database Connections Vs Single Connection?

Apr 16, 2008

I have a DLL that acts as an interface between the application and the database. So you create a new instance to the database via:

MyDatabaseClass db = new MyDatabaseClass()

Each instance of the class creates a new connection to the database.

So if I were to have the following, then 4 connections would be made.

MyDatabaseClass db1 = new MyDatabaseClass()
MyDatabaseClass db2 = new MyDatabaseClass()
MyDatabaseClass db3 = new MyDatabaseClass()
MyDatabaseClass db4 = new MyDatabaseClass()


My question is...What if instead of creating new connections upon each instantiation, I re-use the same connection through a "ConnectionManager" class. In this way, the above code will only create 1 connection instead of 4.

What do you guys think about each approach? Obviously the 2nd approach makes sense for non-web applications, but what about websites? Would that just cause that single connection to be overloaded??

Thanks for any insights.

View 4 Replies View Related

Close All Existing Connections And Processes To A Database

Jun 4, 2007

Dear all



I created this trigger on a table that i think failed while execution. I tried to modify it and run it again but it seems that i cant do that. If i try and delete the database i also cant - saying that it is still in use. But i am not using it and ther are no other users connected to it. I think the trigger has probably hit a loop and that is holding the link.



To close that i know that a solution would be to restart the SQL server instance but that would be a bit hard since the SQL server where my test database resides is a production server and has few other databases that are important and few users use them.



Is there any way through a SQL statement that there can be forced a delete? Or force close all the connections? Or force close all the processes without actually restarting the SQL server instance.



I have tried all options that were offered on some other forums like forcing it to a single user but even that operation can not be performed saying that the database is still in use.



Thank you so much for all your help and time.



Sincerely

Dan

View 1 Replies View Related

How To Access Remote Connections For A Local Database?

May 5, 2008



Hi 2 All,

I have installed MS SQL 2005 in my system. I have created one database in my server. When iam running my application with this connections it is working fine in my local system. When i uploaded the database to some where dataserver, Iam not getting the connectins due to no remote access .

Some body suggested that to start the SQL browser in the SQL Server Configuration Manager.

I go there n tried to start the service when i put the service properties to Automatic or Manual i am getting the error message that is saying that the service is disabled cannot start automatically.

What could be the wrong?

Please suggest me.
Thanks and regards,

View 3 Replies View Related

Prevent SQL Connections During Database Schema Upgrade

Mar 21, 2007

Hello,

We utilise SQL scripts, executed via sqlcmd.exe, to upgrade the schema and common data of our database(s) when we deploy new versions of our software to a production site. At the moment we simply wait until after hours to do the upgrade and ask nicely for all users to not use the system for a while.

Obviously, asking nicely doesn't always work, and there is also the issue of scheduled server tasks and web services / web sites that operate against the database 24/7.

What are our options for putting the entire server (or preferrably just one database) into a semi-offline state so that users and services cannot connect to it while our script connects and performs the upgrade? I imagine there may be several approaches each with their own pros and cons.

If you could point me in the right direction or perhaps mention what strategy has worked for you, it would be greatly appreciated. We perform these upgrades from hundreds of kilometers away via VPNs and Remote Desktop so we can't just unplug the network cable :).

Thank you.

Regards,
- Jason

View 4 Replies View Related

What Permissions Are Needed To Drop All Connections On A Database?

Oct 6, 2006

I'm looking for the correct permissions to grant a user the ability to be able to drop all connections on a database.

The following code throws an exception:

Dim srv As New Server(SqlServerName)

If srv.Databases.Contains(siDBName) Then
srv.KillAllProcesses(siDBName) '== the srv.KillDatabase will not work here, we must kill the processes first
Dim db As Database = srv.Databases(siDBName)
db.Drop()
End If

Throws the Exception:
Microsoft.SqlServer.Management.Smo.FailedOperationException:
Drop all active database connections failed for Server 'xxxx'.
The user does not have permission to perform this action.

This code DOES NOT throw an exception when run as an Administrator.
Any Ideas?

View 4 Replies View Related

SQL Server 2008 :: Finding Database Connections Not Visible

Jul 15, 2015

I need to find a way to identify SPIDS where queries are connected to certain databases using the 4 dot notation instead of actually being connected to the database in question.

For instance, I connect and my default database is MASTER. In MASTER, instead of typing USE MyDb ahead of my query, I just type my query as:

SELECT Col1, Col2
FROM MyDB.dbo.MyTable

The above is the simple scenario. We usually have queries connecting 3 or 4 user dbs together. So database1 might have a query pointing to database2. What I need is a way to identify the SPIDS that are connecting to database2 despite being in database1.

View 4 Replies View Related

How To Allow Remote Connections To SQL Server 2005 Express Database

Feb 27, 2006

I've developed an asp.net 2.0 web app with vs 2005 and am using a SQL Server 2005 Express database. The app works fine locally, but after uploading to the remote web server the following error occures:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

How do I go about granting remote connections to SQL Server Express?

Does the web server have to have SQL Server Express installed in order to run apps that utilize SQL Server 2005 Express databases?

Do I grant access locally on my machine or do I have to be on the web server to grant remote connections?

I've been using .net 1.1 with access databases for the past couple of years, so this is all new to me.

Thanks.

View 27 Replies View Related

SQL Security :: Enable Encrypted Connections To Database Engine?

Nov 2, 2015

The option:

SQL Server Configuration Manager>SQL Server Network Configuration>Protocol for SQL_xxx (right click)>Properties, we can see two Tabs:

Tab 1: Flags
Tab 2: Certificate

If I set the value of Hide Instance= Yes, does "Force Enctyption", need to be set YES as well? 

Or Force Enctyption has to be enabled in order to hide instance?

What is the recommend settings?

[URL]

View 3 Replies View Related







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