Hot answers tagged

7

Recently I have faced with the same issue. I have googled for a while and found that this is a problem in the Microsoft products. I wrote the article according to this error message, so you can find more information there. So, to solve this issue and restore your database to point-in-time use T-SQL commands: Restore your last full backup RESTORE DATABASE ...


6

As already mentioned by the other answer, IGNORE_DUP_KEY is not supported for filtered indexes, which is explicitly stated in the manual: Filtered indexes do not allow the IGNORE_DUP_KEY option. There is a workaround, however, if you can afford a small change to the table's structure. With the help of a uniquifier column you can create a unique index ...


5

SQL Injection is hard to track from SQL Server side. Instead of looking at sql server, you should look at your web server IIS logs. Use Log Parser to parse your IIS Logs to track down the source of sql injection. e.g. logparser.exe -i:iisw3c -o:Datagrid -rtp:100 “select date, time, c-ip, cs-uri-stem, cs-uri-query, time-taken, sc-status from ...


4

According to the error message, your database contains Enterprise Edition features in the table Country. First of all, check the following on the original (old) server: SELECT SERVERPROPERTY('Edition'); That should tell you if you're running on Standard, Enterprise or Developer Edition. Developer Edition supports all of the Enterprise features (with ...


3

I was not able to reproduce your error (although I only tested with one table in the mix). An OLE DB Destination has the ability to disable trigger and other check constraints when it loads but the OLE DB Command does not provide a similar facility. Set up I created a simplistic table --- a key, a value and an empty field that will be populated, via ...


2

For production instances it is recommended to create separate partitions for the following elements of SQL Server: data files transaction log files tempdb files Some people also suggest to install SQL Server on a dedicated partition instead of the C: drive but I think it is an overkill and does not bring any benefit. The installation itself cannot grow ...


2

Which SP of SQL Server 2012 did you use? This is a known issue with SQL Server 2012 SP2. The information for "Restore to:" is empty, which was supposed to show the timelines. To work around this issue: Use SQL 2014 SSMS Use T-SQL


2

This is a "kitchen sink" query, for which SQL Server MVP Aaron Bertrand has a good video on how to optimize using dynamic SQL. A few points to get you started on the performance of your query: Use dynamic SQL to simplify the @Read criteria and subsequent lookup in tblReadStatus. I'm guessing that this is going to be your main performance gain. tblMetaData ...


2

The direct cause of the "The context transaction which was active before entering user defined routine, trigger or aggregate "..." has been ended inside of it, which is not allowed." error is: You are calling the XML_SCHEMA_NAMESPACE() built-in function, and sometimes it fails due to not finding the specified XML Schema Collection. As per the info in the ...


2

The problem arises because the aliases defined in the SELECT list are not visible by the same level WHERE clause - and the reason behind this is the order of logical execution of queries (which is roughly FROM -> WHERE -> GROUP BY -> HAVING -> SELECT -> ORDER BY, omitting some other clauses). You can bypass this problem with several methods: ...


2

The server has already been scanned with several tools and all the main password (administrator, sa of SQL Server) has been changed. If the SQL Server service account user is an administrator on the local machine, then you need to build a new machine from the ground up to replace it using long (14 character plus) cryptographically random passwords, and ...


2

According to MSDN the IGNORE_DUP_KEY option doe's not apply on filtered indexes


2

Use a Derived Table/CTE to get a single ID for "approved"/"not approved" and LEFT JOIN it two times to Employees: SELECT TaskID ,MAX(CASE WHEN IsApprove = 1 THEN EmployeePermission end) AS Approved_ID ,MIN(CASE WHEN IsApprove = 0 THEN EmployeePermission end) AS Not_Approved_ID FROM "Employee Approval" GROUP BY TaskID


1

Yes you can deploy that scenario to EC2 just as you would if it was VMWare environment. However with AWS I would highly suggest you follow the guidelines on how to properly set this up from Amazon. AWS provides a comprehensive set of services and tools for deploying Microsoft Windows workloads on its reliable and secure cloud infrastructure, such as ...


1

The easiest way is to add a user to the db_ddladmin role. -- Older method EXEC sp_addrolemember 'db_ddladmin','username'; -- New method ALTER ROLE db_ddladmin ADD MEMBER username; This will give the user the ability to create/modify/drop any object in any schema. Unfortunately that will include objects you probably don't want them to change (tables for ...


1

there are lots of different ways to monitor for deadlocks in SQL Server. You can use Extended Events, Performance Monitor (to measure rate of deadlocks), Profiler (as a legacy alternative to XE) or even deadlocks to the SQL Error Log through enabling Trace Flag 1204 (details of nodes involved in the deadlock) and Trace Flag 1222 (deadlock information in ...



Only top voted, non community-wiki answers of a minimum length are eligible