Search Results
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 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
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 |
SQL Server 2008 (major build version 10.00.xxxx). Please also tag with sql-server.
5
votes
2
answers
738
views
Is there a setting to force an error when asigning a varchar longer than a variable?
I would like to get an error when assigning a longer varchar to a variable and no silent truncation. Are there any settings?
This truncates silently:
declare @code varchar(10)
set @code = 'This is t …
6
votes
1
answer
323
views
Are there tools for SQL-Server helping to add the semicolons?
Earlier versions of SQL-Server didn't recommend the use of semicolons to terminate sql-statements.
Beginning with sql-server-2008 examples show, that now Microsoft recommends terminating with semicol …
3
votes
1
answer
4k
views
Recovering from: A transport-level error has occurred when sending the request to the server...
Every now and than I loss the connection in SSMS and get the message
Msg 121, Level 20, State 0, Line 0
A transport-level error has occurred when receiving results from the server. (provider: TCP Pro …
19
votes
1
answer
8k
views
Empty Strings: Why or when is '' equal to ' '?
Who can explain why
select case when '' = ' ' then 1 else 0 end, LEN(''), LEN(' '), DATALENGTH(''), DATALENGTH(' ');
yields
----------- ----------- ----------- ----------- -----------
1 …
4
votes
1
answer
212
views
Can I determine if a stored procedure uses dynamic sql without parsing the definition?
Since there seems to be no way to strip the procedure definition from comments without parsing cf. this, there seem to be no reliably T-SQL query to answer this question.
Or can I get this informa …
3
votes
2
answers
4k
views
Is it possible with SQL Server 2008 to have a Partioned Tables with an Identity Column?
I'm not thinking of using it for the partition function.
I just want to know, if it is supported or not.
Don't tell me why it is not a good idea to use such columns on partitioned tables.
2
votes
1
answer
2k
views
Can IMPLICIT_TRANSACTIONS set on database level?
When I have to investigate problems caused by IMPLICIT_TRANSACTIONS ON, can I focus on Client tools setting IMPLICIT_TRANSACTIONS ON or ANSI_DEFAULTS ON or can this be set for the whole database affec …
1
vote
1
answer
643
views
Performance problem caused by joining with the result of a scalar function?
In the following example the performance of the first version using only one SQL query is very bad. The problem is the last join.
When I store the result of the left side into a temporary table and j …
5
votes
1
answer
1k
views
Which fillfactor is used by ALTER INDEX REBUILD?
From technet I got the impression, that I either have to explicitly set the wanted fillfactor or when I do not specify it, the default fillfactor 0 is choosen.
For tables I know to get rows added fil …
10
votes
2
answers
6k
views
Why can't I read Oracles CLOB columns via SQL-SERVER 2008 linked server?
I want to access data in an Oracle 11g database from SQL-Server 2008
I set up a linked server and when I execute
select * from [Link_server_name]..Oracle_schema.Oracle_table
and Oracle_table cont …
25
votes
1
answer
17k
views
How to use transactions with SQL Server DDL?
I have a login table into which all inserts are done by a single stored procedure.
CREATE TABLE dbo.LogTable(
LogRefnr int IDENTITY(1, 1) NOT NULL,
LogQuery varchar(255) NOT NULL,
LogTime …
6
votes
2
answers
2k
views
Can I call SMO from pure T-SQL?
I know how to script a stored procedure using PowerShell and SMO:
[System.reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | out-null
[System.Reflection.Assembly]::LoadWithPartial …
5
votes
3
answers
567
views
Using DTA vs. evaluating DMVs?
Currently I am confronted with a production SQL Server database where someone had added almost all missing index proposals from DTA.
Form How to determine if an Index is required or necessary I have l …