247 reputation
310
bio website thingsthatgobleep.com
location New Zealand
age 33
visits member for 3 years, 2 months
seen Dec 4 at 1:16

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


Apr
5
comment Cannot start SQL Server service on SQL Server cluster
What does the cluster log say and what does the Windows log say exactly? Did you accidentally cut off the error message after error code 259?
Nov
27
comment Denied access sending dbmail while impersonated under a login with sysadmin privilege
That did turn out to be what went wrong. There is, however, another way, that is, to use certificates. It's much more secure than turning on TRUSTWORTHY.
Aug
24
comment What happens when the mirroring server goes offline (for a short while)?
Sounds reasonable. Should I also disable trans log backup on the principal while the mirror is down?
Aug
22
comment Unable to alter authorization on an mirroring endpoint to a login with a slash in the name
Bingo! Yatsi! I usually use the square brackets for weird db or column names like 1234-abc, but didn't think it would apply here. Worked like a charm. Thanks Shark.
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
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.
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
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
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));
Nov
21
comment Do I trace an Active Directory group based database login the same way as an AD user based login on SQL Server?
Thanks Brian. I did two simultaneous traces, one for the group and the other for one of the users in the group and the results are consistent with your answer. Group returned nothing, but there were activities on the user login. Thanks for the suggestion as well, though I'd change the example from 'domain\groupname', 'all' to 'domain\username', 'all'. What I am gonna do is to trace a typical user in the group and base the permissions on that user.