I know that you can enable/disable a trigger through the alter
table command. Once a trigger is disabled, is there a way
to determine whether it is disabled or enabled? I see there is a
status column in sysobjects ...is that what I should be using?
thanks in advance for any help
Karen
hi all , I created the trigger by the statement CREATE TRIGGER trigname ON tablename FOR INSERT , DELETE AS .... END GO
1) Can I enable and disable a trigger in Microsoft SQL Server as in Oracle ?
Through SQL Query Analyser , I tried this sql statement ... --ALTER TRIGGER trigname ENABLE --- and get the error ------- Incorrect syntax near 'ENABLE'.
2) Can I invoke a .bat file in a trigger event ? OR Can I load and invoke a java class in Microsoft SQL Server .
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??
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?
I have a SQL 2005 database and am running the 2.0 framework. I cannot seem to enable SQL caching on the db. I'm using the command line tool as follows: C:WINDOWSMicrosoft.NETFrameworkv2.0.50727>aspnet_regsql -S 99.99.999.999 -Uwebteam -P sa -t tblname -d dbname -et Enabling the table for SQL cache dependency. .An error has happened. Details of the exception:The database 'dbname' is not enabled for SQL cache notification. To enable a database for SQL cache notification, please use the System.Web.Caching.SqlCacheDependencyAdmin.EnableNotifications method, or the command line toolaspnet_regsql. To use the tool, please run 'aspnet_regsql.exe -?' for more information. C:WINDOWSMicrosoft.NETFrameworkv2.0.50727>
I've replaced the ip address, dbname and tblname with ficticious names for obvious reasons here in the post. What command can I enter to enable the database for caching?
I have two databases. one is bayan and other is clearance. clearance was already there. i created new bayan. both database having same things. such table ,views. both contains arabic and english records.
when i try to fetch records from clearance table as arabic it is working the query is like: select * from customers where cust_name_araibc='here arabic text'
it is working fine
but same query i try with bayan databses it runs but it doesnt display any records.
So is there anything like to enable languages in sql server databses.
All, I am using SSIS in sqlserver. I wanted to enable logging in SSIS. I just want to log all the activities in the log file. How can i enable logging in SSIS? I would appreicate if any one could answer for this. thanks in Advance.
I understand that SQL2005x64 bits ignore AWE enable in SQL because it can address all the memory without having to use AWE. How about 32 bits SQL2005, does it support AWE enabled??
I was testing my error handling and purposefully failed some messages. Automatic posion message detection kicked in and disabled my queue. I tried the following, one at a time to enable it again but it doesn't work:
ALTER QUEUE MigrationQueue WITH STATUS = ON;
ALTER QUEUE MigrationQueue WITH STATUS = ON, ACTIVATION (STATUS = ON);
I would have thought the first line would've worked but I get the following when trying to receive...
The service queue "MigrationQueue" is currently disabled.
I have a problem on creating a report using Microsoft SQL Server Business Intelligence Development Studio. I am new to this environment, anybody here can help me on how to enable the "DrillDown" on the table?
When I am using the wizard, the option to enable the drill down will appear, but when I am using "Report Server Project", I really don't know how to enable it, and theres was no table properties on how to enabled it.
Hi, I am using DMO + VBScript to enable the xp_cmdshell feature in SQL Server 2005 Express. But I get error "Item cannot be found in the collection corrosponding to the requested name or ordinal". Here is the script which I am using:
Dim excmd: Set excmd = CreateObject("ADODB.Command") Set excmd.ActiveConnection = connx ' This was created earlier using sa login and connected to master database
excmd.CommandType = 4 excmd.CommandText = "sys.sp_configure" excmd.Parameters.Refresh excmd.Parameters(1).Value = "show advanced options" excmd.Parameters(2).Value = 1 excmd.Parameters(3).Value = Null excmd.Execute () ' This line failes If (Err.Number <> 0) Then LogText "Unable to execute stored procedure. " & Err.Number & " " & Err.Description Exit Sub End If
excmd.CommandText = "RECONFIGURE WITH OVERRIDE" excmd.Parameters.Refresh excmd.Execute () If (Err.Number <> 0) Then LogText "Unable to Refresh. " & Err.Number & " " & Err.Description Exit Sub End If
If (Err.Number <> 0) Then LogText "Unable to execute sp xp_cmdshell. " & Err.Number & " " & Err.Description Exit Sub End If
excmd.CommandText = "RECONFIGURE" excmd.Parameters.Refresh excmd.Execute () If (Err.Number <> 0) Then LogText "Unable to Refresh after running sp. " & Err.Number & " " & Err.Description Exit Sub End If
I have a date parameter that users can not choose because it is grayed out. The Prompt User property is checked in Report Manager. What else do I need to do to enable this functionality. I'm using SSRS 2005
I have a number of SqlDataSource objects in my application, which don't have Optimistic Concurrency option enabled. The SDS objects use custom Sql statements so I can no longer select the Advance button to enable Concurrent Concurrency. How can I enable this option? Is there a designt ime property, and even a run time property that can be set? The only method we have so far is to create a new SDS, with Optimistic Concurrency switched on, then copy and paste my custom Sql into it and rebind my components.. Any help on this matter is appreciated. Regards, Steven
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???
Hi guys I have a program which imports data into sql server from csv files. This program uses the something like this
CREATE PROCEDURE MyImport ( @FileName AS VARCHAR(200) ) AS SET NOCOUNT ON DECLARE @SQL VARCHAR(4000) SET @SQL = ' SELECT * FROM OpenRowset(''MSDASQL'', ''Driver={Microsoft Text Driver (*.txt; *.csv)}; DefaultDir=C:;'', ''SELECT * FROM ' + QUOTENAME(@FileName) + '' + ''') as t ' EXEC (@SQL)
when i excute this i get a permission error saying the account i specified in the web config doesn't have rights to run these type of scripts. I tried using the sa account which works. But its not recommended to setup applications to access the database using the sa account. i did some research and i found out that yon can actually enable that by change a registry key. But i cant find the MSDASQL datasource under ms sql server providers in the registry. Any other ways i can enable this?
Hi. I right click the (root) Solution Explorer to add an SQL object (something.mdf) but I get an error message that "Generating user instances in SQL Server is disabled. Use sp_configure 'user_instances enabled' " WHERE DO I WRITE THE SP_CONFIGURE CODE IN VISUAL WEB DEVELOPER ? (I don't see anything like new query of server and the one in the SQL SERVER management studio is already done). 10x
Hi.,please help.,i get this error.,i made my web and deploy it in a different system which is winserver03, we have in the same network.how will i enable SQL remote access: Server Error in '/' Application.
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) 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.SqlClient.SqlException: 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)Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
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
Hello, I got the error: ______________________ Reporting Services Error
* For more information about this error navigate to the report server on the local server machine, or enable remote errors SQL Server Reporting Services ______________________
I saw the answer: "You could set the "EnableRemoteErrors" configuration value to True in the ReportServer.ConfigurationInfo database table."
How can I get to the ReportServer.ConfigurationInfo database table?
I am on the reportservice server and I run "reporting services configuration manager" and the "sql server managment". I didn't saw that option :(
How to enable remote connections on TCP/IP?I have just installed for first time SqlServer 2000,and cannot connect from other host via ODBC.I give hostname or address but it does not connect.I checked on my firewall that there is no listenning socketon port 1433 nor 1440 on sqlserver host.I can only connect using "(local)" server in ODBC on sqlserver host.Regards,Mark
I'd like to know how can I setup the SSL so I can secure my HTTP Endpoint.
I saw in the documentation that some settings such as SSL_PORT and PORTS should be set to SSL port number and SSL but I did not find out anywhere where they explain how to enable SSL.
Do we enable SSL the same way we enable it or SQL Server 2005 or does that have to be done through the MMC - Certificates.
I don't have any IIS server running on this server, so I was wondering if IIS is a requirement to generate and import the certificate.
Is there a way to allow specific databases access to the CLR. Currently, my understanding is that when this setting is enabled, it applies to all databases within the instance.