Viewing 15 posts - 196 through 210 (of 368 total)
Just to give you a quick start.
You need to look at least two different areas: db and OS.
Start with db. I recommend you to install Adam Mechanic's procedure sp_WhoIsActive[/url].
Run it,...
October 12, 2012 at 1:48 pm
Decimal and numeric are functionally the same.
Numeric came first, and when SQL/92 standard came, they added decimal as a synonym to comply more with the standard sql type names.
Float has...
October 12, 2012 at 1:01 am
Mahesh example is very simple update, without any join, just a subquery.
So, "FROM" syntax is very similar as a syntax without "FROM":
--SELECT *
UPDATE t SET t.Column1 = <New Value>
FROM <Table...
October 11, 2012 at 6:42 am
Look here about exact numerics and approximate numerics:
http://msdn.microsoft.com/en-us/library/ms187752.aspx
You definitely do not want to use approximate numerics in a financial application.
For storage of values use the type that can store all...
October 11, 2012 at 6:25 am
Yes, "IN" internally does "distinct" of the values.
I would recommend to use other syntax for update, one which is similar to SELECT.
First, write the SELECT that returns the rows.
Then, replace...
October 11, 2012 at 5:17 am
DECLARE @xmlAttributeRelation XML
SET @xmlAttributeRelation='<Entity>
<Entity>1</Entity>
<Entity>2</Entity>
</Entity>
'
SELECT Result = ent.val.value('.', 'int')
FROM @xmlAttributeRelation.nodes('/Entity/Entity') ent(val)
Result
-----------
1
2
(2 row(s) affected)
It would be better to name the outer tag differently, e.g. "ArrayOfEntity" to avoid confusion.
October 11, 2012 at 5:11 am
Virtual account NT Service\SQLSERVERAGENT is the default account installer sets for sql agent, out of the box.
There is no reason that this account should not work.
For example, NT Service\MSSQLSERVER is...
October 5, 2012 at 1:18 am
Click "Browse", and type a user. Change location to local host, then "Check names":
Click OK. Leave blank password:
If I click "OK" or "Apply", I receive "Access denied" immediately.
Service account is...
October 4, 2012 at 7:32 am
After the initial setup, virtual account "NT SERVICE\SQLSERVERAGENT" was set to run sql agent service, as default.
But, under that account sql agent would not start (access denied).
After I changed to...
October 4, 2012 at 5:49 am
Thanks. Computer is on a domain, but none of the required privileges is denied from AD.
I also checked folder permission, as stated in doc here: http://msdn.microsoft.com/en-us/library/ms143504%28v=SQL.110%29.aspx
And found that this permissions...
October 4, 2012 at 2:49 am
After investigation, I found the drive was full indeed at the time of error, but in the morning when I looked at it it was not full, so that explains...
October 3, 2012 at 9:17 am
Thanks for the link. But I'm not sure it is the same case.
My database was not in a suspect state, it was online.
And DBCC CHECKDB did not find any errors.
Error...
October 1, 2012 at 1:15 am
Beside the type, I would add two more points.
If you want to be absolutely sure that you will retain the precision in your calculatins:
• use decimal(25,13) in internal calculation for...
July 30, 2012 at 2:09 pm
Much easier method (SQL 2005 and on):
-- Clear procedure from the cache
sp_recompile 'schema.ObjectName'
Clears plans from the cache for specified stored procedure or trigger. If table or view is specified, all...
June 13, 2012 at 9:10 am
To Steve's list I would add a step to rebuild all heaps and clustered indexe so ensure all pages have a checksum. Without that, checksum will be applied (and checked...
June 10, 2012 at 4:56 pm
Viewing 15 posts - 196 through 210 (of 368 total)