247 reputation
210
bio website thingsthatgobleep.com
location New Zealand
age 33
visits member for 2 years, 10 months
seen Jun 15 at 21:44

I am a gamer, programmer, and a wannabe linguist who is fluent in English and Mandarin, and proficient in French.

I am an achievement hunter. Come and visit me on trueachievements.com

I am also an administrator on Wiktionary and have been for over 3 years. I edit mostly in French, Dutch, English and Mandarin, but I also dabble in Italian, Japanese, Maori and Swedish. We are constantly looking for competent volunteers/lexicographers to contribute to this wonderful multilingual dictionary website.

profile for James Jiao on Stack Exchange, a network of free, community-driven Q&A sites


Jun
28
awarded  Commentator
Jun
28
comment Index defrag takes forever to run
I give you the credits for sound advice which helped me resolve the problem. I will start looking at other options than reorging the indexes every night. Have updated my answer with the resolution.
Jun
28
accepted Index defrag takes forever to run
Jun
28
revised Index defrag takes forever to run
update
Jun
27
comment Index defrag takes forever to run
This is a legacy Agent job left over from previous DBAs. I will give reorganize a try tonight. It still doesn't explain why all of sudden it's taking more than 20x longer for the defrag to complete though. The clustered index has 2,146,312 pages in total and the table has 234,001,728 rows.
Jun
27
asked Index defrag takes forever to run
Apr
17
awarded  Autobiographer
Mar
12
comment Find old linked servers on a restored copy of master/msdb db
I was not able to look up the definition of sys.servers, but was able to look up sysservers which is a view that uses sys.servers. I connected using DAC and did a select on sys.servers, but the results were the same as what's stated in the question :(...
Mar
12
revised How to see the value of a variable being used in an sql statement during a server trace?
edited tags
Mar
12
accepted Is it possible to view the maintenance plans created in SQL Server 2000 in SSMS 2005?
Mar
12
comment Is it possible to view the maintenance plans created in SQL Server 2000 in SSMS 2005?
Thanks, mrdenny. Found the MSDN page for sqlmaint with its bunch of switches. By the way, big fan of your blogs!
Mar
11
awarded  Teacher
Mar
6
accepted How to see the value of a variable being used in an sql statement during a server trace?
Mar
6
comment How to see the value of a variable being used in an sql statement during a server trace?
I had to use two @ for each instance of it in the comment because the website doesn't allow me to use only one, as it considers it a reply to a user.
Mar
6
comment How to see the value of a variable being used in an sql statement during a server trace?
I figured it. Looks like we don't need the last parameter. This is what I did: declare @@oldcust_id varchar(10) set @@oldcust_id = 'daf' exec sp_trace_generateevent 82, @@oldcust_id. Two changes here: 1) I removed the 3rd parameter. 2) I unquoted the second parameter. If your parameter is something other than a varchar, than cast it into a different variable and use the second variable instead of the original one.
Mar
5
comment How to see the value of a variable being used in an sql statement during a server trace?
It's a typo sorry. It has one @ in the code
Mar
5
comment How to see the value of a variable being used in an sql statement during a server trace?
And for some reason, it gave me an error saying Msg 102, Level 15, State 1, Line 5 Incorrect syntax near '@oldcust_id'. I really can't see any problem with the statement. Is the comma or I don't know..
Mar
5
comment How to see the value of a variable being used in an sql statement during a server trace?
Here is the code I used to test this sp in SSMS: declare @@oldcust_id varchar(10) set @@oldcust_id = 'daf' exec sp_trace_generateevent 82, N'@oldcust_id', cast(@oldcust_id as varbinary(8000));
Mar
5
asked How to see the value of a variable being used in an sql statement during a server trace?
Mar
5
asked Find old linked servers on a restored copy of master/msdb db