Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 98571

All versions of Microsoft SQL Server (not MySQL). Please also add a version-specific tag, like sql-server-2016, since it is often relevant to the question.

1
vote
This should do it if you are using Microsoft SQL Server: CREATE VIEW SomeView AS SELECT ID, ORDER, ASSEMBLY FROM Tab_A a WHERE NOT EXISTS (SELECT NULL FROM Tab_B b WHERE a.ID = b.ID); If you want t …
answered Jul 28 '16 by Tara Kizer
4
votes
If you don't specify the protocol in the connection string, then it will use the protocol specified for the database driver. The protocol order, by default, is Shared Memory, TCP/IP and then Named Pip …
answered Feb 3 '17 by Tara Kizer
4
votes
Create endpoints on all servers: CREATE ENDPOINT EndPointName STATE=STARTED AS TCP(LISTENER_PORT = PortNumber, LISTENER_IP = ALL) FOR DATA_MIRRORING(ROLE = PARTNER, AUTHENTICATION = WINDOWS NEGOTIA …
answered Sep 2 '16 by Tara Kizer
2
votes
Replication requires a primary key constraint on the replicated tables, not a clustered index. Primary key constraints enforce uniqueness. If you have more than one publisher to the same subscriber, y …
answered Dec 8 '16 by Tara Kizer
4
votes
You could create a job that checks for open transactions and kills them if they've been open for a period of time and are causing blocking. But you'd have to be careful with this as you could have a l …
answered Oct 21 '16 by Tara Kizer
3
votes
I agree with Andriy that a constraint should be used, but to answer your question if this is possible with a trigger, the answer is yes. Here is the trigger: CREATE TRIGGER i_Seller ON Seller AFTER …
answered Aug 22 '16 by Tara Kizer
1
vote
Try this: SELECT eventsink.RedEvent.DeviceId, MAX(eventsink.RedEvent.Created), BranchNumber, CountryCode FROM eventsink.RedEvent JOIN md.Elevator ON md.E …
answered Jul 27 '16 by Tara Kizer
1
vote
Database corruption can exist in the database, FULL backups and DIFF backups. This is because they contain data pages. LOG backups are different and don't contain database corruption. All of your ba …
answered May 14 '18 by Tara Kizer
2
votes
Unless you are collecting the data in some way (monitoring tool, etc), you aren't going to be able to find the blocking session from a week ago or any time in the past. Start collecting current activ …
answered Jul 19 '17 by Tara Kizer
0
votes
A readable secondary is a completely separate SQL instance on its own server. It has its own resources, worker threads, etc. It does not use anything on the primary server. With read-only routing in p …
answered Aug 30 '16 by Tara Kizer
1
vote
Besides source control repositories, we've also used Sharepoint for SQL scripts. You can access it just like a network drive too.
answered Jul 28 '16 by Tara Kizer
2
votes
You cannot attach a 2014 database to a 2012 instance, compatibility level doesn't matter, just the version matters. Attach and restore are not backwards compatible. If you need to move the database to …
answered Sep 10 '16 by Tara Kizer
7
votes
You just need to put a GO batch separator around your CREATE PROCEDURE. You have something else above it, and it needs to be in its own batch. Hence the GO that's needed. GO CREATE PROCEDURE [dbo].[U …
answered Aug 20 '16 by Tara Kizer
1
vote
I once supported an application that would timeout certain queries after 300ms (not a reporting system). If that application were to default to a server level setting, they wouldn't have been able to …
answered Jul 27 '16 by Tara Kizer
2
votes
While you could schedule a job to run UPDATE STATISTICS on that particular table, you should also look into Parameter Sniffing. What's likely happening here is that a bad plan was wiped from the plan …
answered Oct 2 '17 by Tara Kizer

15 30 50 per page