Tuesday, March 19, 2013

[MS SQL Server] What are the chances to went a DB offline or Suspect mode?

[MS SQL Server] What are the chances to went a DB offline or Suspect mode?


What are the chances to went a DB offline or Suspect mode?

Posted: 19 Mar 2013 05:17 AM PDT

Hi Frineds,What are the chances to get a DB offline or Suspect mode?give me some examples pleaseThank you in Advance :-)

SSIS ForEach Loop Container - loop through all DB's

Posted: 15 Feb 2013 06:27 AM PST

I am trying to get the FELC to loop through all the databases for my sql server. I want to set up a variable by database_id from the sys.databases table so the FELC knows to loop through all the databases. Has anyone wrote this before or have a different approach that I can try?

Do not log job history

Posted: 19 Mar 2013 12:03 AM PDT

Hi,My SQL Server instances have some jobs that run very frequently ( some execute at every 30 seconds ) and these jobs are consuming all my job history log size and I am losing the history of my main jobs.I already did some research and found how to increase this log size, but the best would be if I could say to not log some jobs' output. I did some some research, but I did not find anything about it.Does anyone know if this is possible?Thanks!

sql not finishing or stuck

Posted: 18 Mar 2013 09:40 PM PDT

I'm on SQL 2008 10.0.4371 with 16 cpus and 24 gigs of RAM. Under some condition, I start getting increasing CPU loads (until about 90% utilization on all 16 cpus) and a website that stops responding that never disappear until I restart SQL Service. During this time, the only thing that seems to jump out is 4 million reads per second. I tried running sp_whoisactive, but nothing seems to be jumping out. Other than everything is waiting on SQL to send the results. The app servers are WebSphere so we're using SQL JDBC along with (eeek) cursors. There are a couple queries that run slow and missing indexes, which I've submitted to IBM. I have four temp dbs (100 meg and three 200 meg--which I want to set all to 100) one on D: the rest on E:. Of course yesterday I noticed the c, d and e drives are all on the same lun. So, I'm think maybe going down to 1 or 2 tempdb instead. The e drive tempdbs have a read stall of 28 seconds while the d is around 8 or less. Also, the other thing is I'm thinking of turning on ad hoc optimization as with the cursors there's no stored procs (ugh). I did notice that SQL was only using 4 gig of ram, and have fixed that.Is there a switch I can turn on to end a command if it does not finish in a certain amount of time? Is that the governor?

Loading Users into instance security

Posted: 19 Mar 2013 12:57 AM PDT

We are moving from a server with SQL server 2005 to one with SQL server 2008. Is there any way to script a bulk load of users into the instance security? I have mounted the databases, from backup, but need to get the users set-up in the instance. With over 1,000 users this would take a while going through the SSMS GUI interface.

Delayed Execute and/or Commit

Posted: 19 Mar 2013 02:30 AM PDT

I have a scheduled job (.Net, WinOS Task Scheduler) which completes shortly after it's called but the SQL work it should accomplish in real time does not happen until several hours later. The .Net scheduled job calls a stored procedure which updates 2 "top level" tables and outputs 3 data readers (that's what they are to the .Net program). Both updated tables have 2 update triggers each (one trigger inserts to a log table & one manages some computed fields in "quick search" tables). One of the fields updated in each table is a datetime field - set to getdate() within the sproc. Temp tables are used to identify the rows to be updated. Quick pseudo-code (showing just one update and select statement):----declare @mydate dateimeset @mydate = getdate()declare @UpdateIDs table(MyID int)insert @UpdateIDsselect CaseID from TopLevelTable1where ...begin transaction update TopLevelTable1 set Flag1 = [new value] , Flag1Date = @mydate where CaseID in (select MyID from @UpdateIDs) -- 2 triggers are fired in conjunction with this statementcommit transactionselect [several fields]from @UpdateIDs tinner join [several joins from temp table]----The problem: the .Net program runs at 11p each night and completes in about 20 seconds. It sends out an email for each row in the select and one to me regarding the ending status. All those emails happen at 11p. The job reports success.But the time stamp (the param @mydate & the field TopLevelTable1.Flag1Date) is 6am the next day. The trigger inserting to TopLevelTable1_Log has a field LogDate which is set to getdate() within the trigger and its value is also 6am.There is no other maintenance work being done at that time. Transaction logs (using sqllogship.exe) are being done and full database backup is done at 1:45am. That full backup has the unmodified rows relating to the this job.What could be happening?

Sql server back ground processes.

Posted: 19 Mar 2013 02:25 AM PDT

I want to know , when i am execute sql select query , what are processes will be running in backgroundPlease

SP3 upgrade on SQL 2008 issue

Posted: 18 Mar 2013 06:11 PM PDT

Hi,Recently we tried upgrading SQL 2008 cluster instance from SP2 to SP3. After patching done on passive node, we tried connecting to SQL instance through SSMS, but got the error "Login failed for user. Server is in script upgrade mode. Only administrator can connect at this time".Can someone please let me know the reason and its solution?Regards.

No comments:

Post a Comment

Search This Blog