Viewing 15 posts - 2,836 through 2,850 (of 49,571 total)
In that case, instead of SELECT @name, @val WHERE, it would be
SELECT s.name, s.val
FROM SomeOtherDatabase.dbo.SomeOtherTable s
WHERE NOT EXISTS (SELECT 1 FROM u_apppreferences WHERE name = s.name)
July 6, 2016 at 7:57 am
If it's server-side traces that you're using, then the easiest thing is to use Profiler to set up the trace, then go to File -> Export -> Script Trace Definition
That...
July 6, 2016 at 7:32 am
Sounds like you're using an old version of Management Studio with a new version of SQL. What do the following show:
SELECT @@Version
In Management Studio: Help -> About
July 6, 2016 at 6:33 am
dclemens (7/5/2016)
I want 8 files because I have 8 CPUs.
8 CPUs doesn't mean 8 files for TempDB.
Using this query, I'm showing avg_write_stall_ms >280ms, which seems very high to me.
Adding...
July 6, 2016 at 5:55 am
tindog (7/6/2016)
In your WHERE clause you convert EmpID to VARCHAR(20), although both the table field and the variable are INT
He's converting it to varchar in order to concatenate it...
July 6, 2016 at 5:40 am
Because if you leave out the quotes, then you have something like this:
AND EmpCode = 256781
Where EmpCode is a varchar column and 256781 is a literal with a numeric type....
July 6, 2016 at 5:39 am
2008, so you're using server-side traces?
The Security Audit: Audit Login has both database id and database name as event columns. Just check the boxes when you create the trace, they're...
July 6, 2016 at 3:05 am
Add the DB name from the (Global Fields) Actions tab, it won't be default part of the event's columns
July 6, 2016 at 2:55 am
Steve Jones - SSC Editor (7/5/2016)
July 5, 2016 at 1:58 pm
SSC Venu (7/4/2016)
Here i have attached "AdventureWorks" sample databases to "default instance (11.0.6020) & named instance (11.0.2100). same databases in two instances...
No you haven't.
You have two copies of the...
July 5, 2016 at 1:56 pm
Steve Jones - SSC Editor (7/5/2016)
July 5, 2016 at 1:53 pm
Create an extended event session, run it for the 10 minutes that you want to analyse, query the resulting file.
You can use the DMVs, specifically sys.dm_exec_query_stats, but they won't necessarily...
July 5, 2016 at 5:53 am
To explain why you're getting syntax errors, the output of a case statement must be an expression (constant, parameter, column, variable or function), not a clause or a predicate of...
July 5, 2016 at 3:49 am
INSERT into u_apppreferences(name, Val)
SELECT @name, @VAL
WHERE NOT EXISTS (SELECT 1 FROM u_apppreferences WHERE name = @name)
as your current one is prone to concurrency problems (will cause duplicates under load)
http://source.entelect.co.za/why-is-this-upsert-code-broken
the...
July 5, 2016 at 3:45 am
You can't attach a single database to two instances. A database can only be attached to a single instance.
I suspect you only have one instance, not two, hence when taking...
July 4, 2016 at 6:39 am
Viewing 15 posts - 2,836 through 2,850 (of 49,571 total)