Viewing 15 posts - 48,541 through 48,555 (of 49,571 total)
sp_executesql does not recompile on every execution. The execution plans for adhoc SQL are also cached along with procs. The difference is that the seperate pieces of sql executed by...
August 21, 2007 at 12:23 am
I wrote the following a while back when I needed to drop and recreate primary keys. I've just included the foreign key parts.
Warning, this is rough code and needs to...
August 20, 2007 at 7:44 am
Can't see any reason, unless there are no rows that satisfy the conditions "FINISHTIME = '---'" and 'RMJOB.RMJOBID = PREPLOG.RMJOBID'
If you do a select for those conditions, what do you...
August 20, 2007 at 7:31 am
It does, but the governor is enabled either a server level or per connection. All the governor will do is prevent very expensive queries from been run, depending on the...
July 29, 2007 at 2:32 am
Could you post the procedures and the details of the deadlock graph?
July 26, 2007 at 7:12 am
Dynamic SQL. Build up the create table statement as you un through the cursor, then execute the statement. Something like the following (rough pseudo-code)
SET @Creation = 'CREATE TABLE MYTable ('
Fetch...
July 26, 2007 at 6:42 am
From http://www.sommarskog.se/grantperm.html
SqlContext.WindowsIdentity.Name will return domain and Windows user name, if the user logged in through Windows authentication. For an SQL login, WindowsIdentity is Null, so access to...
July 26, 2007 at 5:50 am
Short answer, in an order determined by the execution plan that the optimiser comes up with. that order may vary with server load, data volumes and other factors.
It's possible that...
July 26, 2007 at 5:37 am
ExecuteNonQuery is the .Net method to execute a command and not return any results.
Alternatives are ExecuteScalar, ExecuteReader and ExecuteXMLReader. (At least in .Net 2.0)
July 25, 2007 at 7:09 am
If you do a select from that table with the same where clause, do you get any rows back?
Unrelated to your question, but serious anyway. Are you aware that your code is...
July 25, 2007 at 2:01 am
833 is indicative of a overloaded IO subsystem or a misbehaving IO filter driver (like an anti virus)
Are the drives local, NAS or SAN?
Run performance monitor on the server during...
July 25, 2007 at 1:06 am
The local variables work because the query optimiser can't sniff their values when it compiles the proc, hence it will generate an average-case plan, optimised for no particular values
July 24, 2007 at 6:29 am
Possibly, but it is not simple. Would require that your master call out to the command prompt and run SQLCMD, passing it the files to run. Something like this might work...
July 24, 2007 at 12:37 am
The best strategy depends greatly on the queries that you use. Some points
Put seperate indexes on seperate columns when queries use different columns. an index on 2 columns ColA, ColB...
July 23, 2007 at 1:06 am
With 5 GB memory on the server (that's a rather weird amount) I'd probably set min to 3.5 and max to 4, providing there are no other apps that run...
July 23, 2007 at 12:20 am
Viewing 15 posts - 48,541 through 48,555 (of 49,571 total)