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
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
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
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
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
2
votes
Your best option (considering your limitations) is probably using OPENROWSET with a FORMAT FILE Take a look at those links: Use a Format File to Bulk Import Data You can use the BCP utility once …
answered May 15 '13 by Roi Gavish
1
vote
SQL Server allocates disk space for a file (.mdf or .ldf) when the space is needed (according to your settings of course), then the file remains the same size even if transaction log (.ldf) is cleared …
answered May 12 '13 by Roi Gavish
8
votes
There is no need to grant CONTROL on the schema. The permission required to DROP SCHEMA is either CONTROL on the schema or ALTER ANY SCHEMA at the database level, and that is why your user was able to …
answered Jun 16 '13 by Roi Gavish
5
votes
Your problem begins and ends with statistics and estimates. I have reproduced your situation on my servers and found some interesting hints, and a workaround solution. First things first, let's tak …
answered Jun 5 '13 by Roi Gavish

15 30 50 per page