How To Disable/enable Jobs For Database That Has Failed Over
Nov 22, 2006
Hi,
I currently have serverA importing data from an AS400 oledb connection and serverB on hot-standby as a mirror. The data import is being performed via an SSIS scheduled job.
I've yet to implement any solution in the following case:
If the database on serverA fails, it will failover to the mirror. But the jobs will still be on serverA. Ideally, I'm assuming the jobs should not run on serverB since it will be attempting to update the mirrored database. So, I am wondering if both servers can have identical copies of SSIS packages and jobs and simply (?) enable or disable them based on which server will be hosting the principal database.
Is there any solution where the jobs can automatically be disabled on the server with the mirrored database and enabled on the principal database depending on its status?
I have 2 dbs (SQL 2012) - one contains a trigger that is enabled/disabled by a procedure in the other database. This all works fine.
If I create a Database Project solution in Visual Studio 2012 SSDT (or 2013) for both databases, the stored procedure generates a SQL71502 stating that my trigger name can't be resolved.
To recreate the issue:
CREATE DATABASE DbWithTrigger GO USE DbWithTrigger GO CREATE TABLE dbo.TblWithTrigger( Id int NULL, SomeValue varchar(30) NULL
1. Create a new solution with a project named DbWithTrigger 2. In project settings set the Target platform to SQL 2012 2. Import the DbWithTrigger db into this project 3. Create a new project named DbCallsTrigger 4. In project settings set the Target platform to SQL 2012 5. Import the DbCallsTrigger db into this project 6. Add a Database Reference in DbCallsTrigger for DbWithTrigger
When you build the solution both dbs build successfully, however there are two warnings. One is easily resolved by replacing DbWithTrigger in the body of the procedure with [$(DbWithTrigger)] (db variable name for the reference) but I can't find out how to get rid of the other. Is it a bug?
Hi, is there a way how to enable / disable logging on web merge synchronization into the file websync.log? The file exists in the ISAPI folder, on some machines there are some messages, on others there is nothing. There are Timeout messages on the client during synchronization and we need to find where is the problem, if it is on the server side or if it is a network error or something else. Thanks, Pavel
Is there any procedure or option to disable and enable constraints on database.the problem is we are having lot master and child tables. when i am trying to move the entire data from original db to another same db, there i am getting constraints problem. child tables are not accepting data with out loading the master tables.
is there any to disable and enable constraints? please give me reply asap
Is there a chance to change the case sensitivity option for a running instance of sql server?
I know, during the install process, i can activate the case sensitivity. But can I change this option on an already installed server (to case sensitiv or back)?
Is there a way to turn on/off a given logger dynamically across the board, and still enable the logging of task specific events, like "ExecuteSQLExecutingQuery" from the ExecuteSQL task or "WMIDataReaderOperation" from the WMI Data Reader task?
The use case is one where multiple loggers are defined in a package (custom and stock) and I'd like to toggle the execution tracing on a per logger basis.
I realize "logger toggling" can be done programmatically, but I'm wondering if that's the only way to accomplish the objective.
I am a beginner in SQL Server Reporting Services. My report has three parameters; all with the same characteristics (combobox (multiple values, datatype: String, Available values: from query, default value:null).
When i am in the Preview Tab of the Report, the combo box of the first parameter is enabled, the combo box of the second parameter is disabled.
Once i select a value for the first parameter, the combo box of the second parameter becomes enabled.
I would like to select a value for the the second parameter in spite i did not select a value for the first parameter. I do not find a solution in the properties of the parameters.
Is it possible to run a trigger whenever a SQL user is disabled or enabled? From what I've seen of various sysusers and syslogins tables there isn't a column that represents enabled or disabled.
I have transaction replication setup on two SQL7 boxes and a nightly job runs a procedure that need to alter a table and disable a trigger. Since replication has been set up the disable doesn't work. Any way around this.
the disable trigger will be enable again.Because I already disable the trigger on last month, but when I check through the database, it enable again.I understand that, when we restore the database, all the trigger will be enable.How about SQL Cluster? will it enable the trigger??
ESQL1 will get max(id) from table and then based on the ID the remaining needs to be work.
Ex: If the ID=AUS-Sdy-1 then ESQL2 will update the tbl1 and return one IDkey based on this return key the ESQL3 will update a tbl2. ----------*( i want to disable ESQL4) else If the ID=AUS-Sdy-2 then ESQL3 will update the tbl1 and return one IDkey based on this return key the ESQL4 will update a tbl2. ----------- *(i want to disable ESQL2)
I have a parameter for each field that lets me know if a field can be sorted or not. What I want to be able to do is turn on or off interactive sorting for that column based on that parameters value.
In the dialog you have a check box that says enable interactive sorting. When that is clicked it appears that you get the two arrows no matter what you put in the expression.
I have tried
=IIF(allowSorting,Fields!myColumn.Value,"")
and
=IIF(allowSorting,Fields!myColumn.Value,Nothing)
but both result in the arrows still being there, just the sort doesn't work.
Is it possible to put an expression on the sort arrows appearing at all?
I would like to ONLY allow using SQL Server authentication and restrict Windows Authentication. At the moment, i set the security to "SQL server and windows authentication". Now, even though i set the password for "sa", i can ignore the SQL Server authentication and just use Windows authentication to manipulate database objects???
can anybody give some suggestions to restrict windows authentication and allow sql server authentication?.
We have our SQL Server 2005 hosted at a datacenter and have only SS Management Studio access (no term serv, no event log, etc.). Also, our hosting company has disabled the Database Mail feature. We have over 60 jobs running on a minute/hourly/daily basis that are critical for our business. It is super important for us to know if and when a job failed.
Given this scenario, how do you suggest we implement monitoring/notification of failed jobs?
I have made one package which extracts data from the source does transformation and submits the data to destination. Subsequently it also updates the required control files.
Now I want to add a functionality :
If the package is executed again it should check the status of previous execution in control file if success mark all tasks disable and stop
if failure mark all tasks at enable and start extracting data and continue further with execution.
I was able to attain similar functionality in SQL Server 2000 using activeX script. What code do I need to write as a part of Script Task in order to attain above functionality.
I have to admit I'm pretty new to ASP.net. I'm trying to insert a row of data into my SQLExpress database table "Prets" I'm getting the user_ID from the table "Membres" Here's the code I have: Imports System.Web.UI.PageImports System.Security.PrincipalImports WiseNetTableAdaptersPartial Class membre_sec_Pret_demande_pret Inherits System.Web.UI.Page Protected Sub submit_btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles submit_btn.Click Dim User As String = My.User.Name Dim pretAdapter As New PretsTableAdapter Dim membreAdapter As New MembresTableAdapter pretAdapter.AjouterPret(Convert.ToInt32(membreAdapter.GetUserIDbyName(User)), Convert.ToDecimal(montant_txt.Text), Convert.ToString(raison_txt.Text)) End SubEnd Class And here's the error I get at runtime: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.Source Error:
Line 1610: } Line 1611: WiseNet.MembresDataTable dataTable = new WiseNet.MembresDataTable(); Line 1612: this.Adapter.Fill(dataTable); Line 1613: return dataTable; Line 1614: }Source File: c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Fileswisenetindustriesafc388c716067f12App_Code.tyietv41.0.cs Line: 1612 Stack Trace:
Hello there, I have a table under SQL2005 express with 8 fields with a primaryKey defined.In my BLL in the table adapter there is one "SELECT DISTINCT prodCAT from prods" The prodCAT is a nvarchar(50) and it is not part of an index or primaryKey.When I preview the data from my BLL I get the correct data.I defined a new web form (aspx) and put a ddl (dropDownList) with an objectdataSource that relates to the above sql function/command and I get a"Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints." BTW when I defined the above SQL in the BLL I got a "The new command text makes the function return data with schema different from the schema of the main query" Any suggestions???
does anyone had any idea on the following codes that i'm facing?i have no ideas what is constraints and i hardly can view my page. In addition to that, i also faced the same problems when i'm trying to change my user password. it eventually managed to change the password but then the changes leads to the failed to enable constraints too. however, the following codes is not related to the change password but the purchase item. Hope someone can help me up! thanks!
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
Source Error:
Line 223: SqlDataAdapter2.SelectCommand.ExecuteNonQuery() Line 224: SqlConnection1.Close() Line 225: SqlDataAdapter2.Fill(BuyData2) Line 226: i = BuyData2.BuyView.Count Line 227: For n = 0 To i - 1
Hi, I have two tables (Accounts and Contacts) that have a many-to-many relationship, maintained by the AccountContactLinks table. I would like to populate a Contacts DropDownList with all of the Contacts associated with the Account Selected in Accounts DropDownList. Here is the (SP) SQL Query I'm trying to make work: SELECT Contact.ContactID, Contact.ContactLastName, Contact.ContactFirstName, Contact.ContactLastName + ', ' + Contact.ContactFirstName AS ContactName FROM Contact INNER JOIN AccountContactLinks ON Contact.ContactID = AccountContactLinks.ContactID WHERE (AccountContactLinks.AccountID = @AccountID) ORDER BY Contact.ContactLastNameEND I keep getting the following error: Failed to enable constraints. One or more rows contains values violating non-null, unique or foreign key constraints. I haven't implemented any non-null, unique or foreign key constraints between any of these tables, so suspect that I've got the SQL Query wrong. Thanks very much. Regards Gary
We're using a canned app that only uses SQL Server logins (it will NOT use Windows logins to access SQL Server)
SQL Server logins seem to lack even the most rudimentary security features such as expiring passwords and automatic disabling after a set number of failed logins. Bad. Bad Microsoft.
Has anyone figured out a way to graft this on after-the-fact?
I can do it in an awkward fashion by auditing failed logins and going back to read the error log, but this isn't real time by any stretch.