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 11530

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
Please try the this code: (it creates a stored procedure which will return what you need) CREATE PROCEDURE [dbo].[GetProjectInfo] @Project varchar(100) AS DECLARE @command NVARCHAR(MAX) SELEC …
answered Apr 29 '13 by Roi Gavish
0
votes
The answer – as always – is maybe :) If you use the 'FULL' recovery model, And you have earlier full database backup, You have the option to perform a log backup, and then do a restore to a point i …
answered Oct 8 '12 by Roi Gavish
4
votes
Your Database is probably already in single_user mode, and a session lock has been acquired on it. I suggest you use the following code to find the session that owns the lock: USE master; SELECT r …
answered Oct 5 '12 by Roi Gavish
1
vote
This is a known issue which has several causes: The first thing to check is your permissions on local machine: Are You a local Administrator? Is there a group policy that might prevent you fro …
answered Sep 11 '12 by Roi Gavish
4
votes
The FORMAT function is case sensitive As such, "mm" stands for minutes and "MM" stands for month. You can see a complete table of combinations and letter meanings here. This is the .NET article for …
answered Jun 2 '13 by Roi Gavish
3
votes
Try this option, there is a half-chance that SQL Server will behave differently... CREATE PROCEDURE [dbo].[sp_MemberIdsFromUserIds] @dtUserIds UNIQUETABLE readonly AS BEGIN SELECT userID, …
answered Dec 17 '12 by Roi Gavish
2
votes
For SQL Server 2005+ You can use the following: SELECT FILE_ID, type, type_desc, CAST( CAST( (CASE WHEN size < 128 THEN 128 ELSE size END) * 8. / 1024. AS INT ) AS VARCHAR(20) ) + 'MB' AS SIZE, C …
answered Sep 12 '12 by Roi Gavish
14
votes
If You want to use the same directory for your mdf\ldf files You will have to (physically) rename them. 1. Detach files from local PC 2. Rename mdf and ldf files 3. Copy\Move the files to the server d …
answered Sep 23 '12 by Roi Gavish
5
votes
You don't have to perform any task (destructive or non-destructive) at all. You can use the built-in function IS_SRVROLEMEMBER to find if a certain LOGIN is a memeber of the sysadmin server role: …
answered Jun 11 '13 by Roi Gavish
0
votes
The answer is, as always, it depends. When you said: I have two tables that contain aggregate information. The information is constantly being updated What kind of aggregation is that? Try usi …
answered Oct 21 '12 by Roi Gavish
2
votes
I don't think your reason justifies using this solution (sisyphean labor is part of a programmer's life...) It is not efficient and i would not recommend it in your situation. If, however, your aim wa …
answered Jun 2 '13 by Roi Gavish
2
votes
3answers
I have a certain table in my OLTP database, which is bulk-updated by several users. There is no way to know when they will update the table (somewhere between 5 times a day and once in a week). The …
asked Oct 14 '13 by Roi Gavish
2
votes
You have to understand the problem before proceeding with the solution. When you select from a view the SQL Server system would check permissions twice: Once when you select from the view, and once wh …
answered Oct 22 '12 by Roi Gavish
0
votes
I personally don't like free tools messing with my databases... like others said before me, the best tool for comparing is Redgate Compare (another option from Redgate is their new Source Control - if …
answered May 2 '13 by Roi Gavish
9
votes
I suggest the following code to prevent it from happening: (Instead of the code you posted in your question) DELETE FROM dbo.table GO IF EXISTS ( SELECT * FROM sys.identity_columns W …
answered Apr 24 '13 by Roi Gavish

15 30 50 per page