The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
Got to work this morning (only day two for 2013) to a chorus of "Can't access the production database", "My Programs won't run", "Why can't we generate a print-out" and other less KSS salutations.
I quick look at the SQL Server and it appeared that the Production Database had become "Shutdown". Panic immediately set in. Then I remembered the backups I religiously take and the test "restored" databases and After a quick goggle to confirm the course of action all was restored and running within ten minutes. Earned my bucks this mornin'
Can't say it enough - Backup your data!
(I am a very occasional DBA )
Now I just have to fix the Economy for the US, end the war in Afghanistan, and save an endangered species before I can go home.
I don't speak Idiot - please talk slowly and clearly
While profiling some complex queries, SSMS (SQL Server Management Studio) has decided to make my life more difficult than SQL Server is already making it. The "actual" execution plan is plainly wrong (it says the query taking 1% of the time is responsible for 80% of the total query cost). Also, a tooltip spanning my two monitors keeps popping up, and during the 10 seconds it takes to generate freezes the rest of the UI.
While I'm at it, here are some other things I dislike about it (note: some of this may not apply to the newer versions):
The table/stored procedure filter in the tree view sometimes can't be applied until all the items have loaded, requiring me to wait a few seconds for no reason.
Scripting out the entire database can take hours. And this doesn't include data, just the structure. I had to create a tool to do this and avoid this wait (which, by the way, takes a couple seconds).
Often complex queries are a result of muddled logic
As was the case at my last job. The particular one I am working on, however, needs to be as complicated as it is. Long story short, it needs to be real-time (to show results for an auto-complete textbox), has some user-generated filters, and applies to multiple tables (which are not always straightforward, one example being a table that provides an alias for a field in another table).
Ennis Ray Lynch, Jr. wrote:
I have none of the problems you mention
After several years of SQL development, this is the first time I've run into the tooltip issue. Some of the other issues were from SSMS 2005 (against a SQL Server 2000 database), but right now I'm on SSMS 2008 R2 (against a SQL Server 2005 database).
Ennis Ray Lynch, Jr. wrote:
When the Execution Plan doesn't jive, regen the Stats or at the very least run
the query optimizer
I thought the query optimizer was just a step that was run when you execute a query. Is there some manual way to run this and tweak it?
One of my next steps will probably be to add some query hints. My main problem seems to be that SQL Server is doing table scans rather than seeks.
There is a tool for this in Visual Studio; takes a few minutes to script the schema or data or both
Interesting. I've not tried that before, but if it uses SMO then it is probably slow. A few minutes seems long to me. Keep in mind that the database I had issues with (at my last job) had roughly 500,000 lines of SQL in stored procedures.
Has anyone ever dealt with one of these before? Was it a recurring problem for that car, or just a one time thing?
I bought a new vehicle almost two months ago, and it has just over 3000 miles on it. Two days ago I noticed a roughly 6-7" crack on the passenger side of the windshield starting at the edge. I called my dealership and they directed me to the auto glass place they subcontract to. Brought it there at lunch time and they confirmed my belief that it was a stress crack. Now, I have to call the dealership back and tell them they're paying for it.
The United States invariably does the right thing, after having exhausted every other alternative. -Winston Churchill
America is the only country that went from barbarism to decadence without civilization in between. -Oscar Wilde
Wow, even the French showed a little more spine than that before they got their sh*t pushed in.[^] -Colin Mullikin
I've got an identical crack in my windshield, just appearing last Friday, and it would never occur to me to call it a stress crack. Rocks fly, trucks ignore the covered load laws, things happen. In AZ, auto insurance includes free replacement glass, so I'll be calling the repairman shortly.
Will Rogers never met me.
Last Visit: 31-Dec-99 19:00 Last Update: 12-Dec-17 19:43