concept job in category sql

This is an excerpt from Manning's book SQL Server DMVs in Action: Better Queries with Dynamic Management Views.
You can tackle problems from several angles, using a variety of tools. The point to note is some tools are more appropriate than others for given tasks. For example, you could use a screwdriver or a blunt knife to undo a screw; both could probably do the job, but you’ll find one is easier than the other. Similarly, if you want to determine which queries are running slowly, you could use SQL Server Profiler, but a quicker, smarter way would be to use DMVs.
For some administration tasks, such as restores, backups, and rollbacks, one of the DMVs (sys.dm_exec_requests) contains details of when the job started and how complete it is. If you know when a job started and how far it has progressed, you can perform a simple calculation to determine its expected completion time.
Listing 11.4. Estimating when a job will finish
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED SELECT r.percent_complete , DATEDIFF(MINUTE, start_time, GETDATE()) AS Age , DATEADD(MINUTE, DATEDIFF(MINUTE, start_time, GETDATE()) / percent_complete * 100, start_time) AS EstimatedEndTime , t.Text AS ParentQuery , SUBSTRING (t.text,(r.statement_start_offset/2) + 1, ((CASE WHEN r.statement_end_offset = -1 THEN LEN(CONVERT(NVARCHAR(MAX), t.text)) * 2 ELSE r.statement_end_offset END - r.statement_start_offset)/2) + 1) AS IndividualQuery , start_time , DB_NAME(Database_Id) AS DatabaseName , Status FROM sys.dm_exec_requests r CROSS APPLY sys.dm_exec_sql_text(sql_handle) t WHERE session_id > 50 AND percent_complete > 0 ORDER BY percent_complete DESCHere you can see that one DMV and one DMF are involved in estimating when a job will finish. Table 11.3 provides a brief description of each.

This is an excerpt from Manning's book SQL Server MVP Deep Dives.
There’s both a technical and cultural impedance mismatch between the object world and the database world. Relational databases don’t readily represent inheritance. The .NET-heads treat the database as nothing more than a data dump, and the database geeks don’t care to understand classes, inheritance, and objects. Since most shops have a .NET to database developer or data modeler ratio of about 50 to 1, the database voices are drowned out. In addition, application programming languages are like ear candy to managers just dying to get the job done faster, and we just have T-SQL (good old faithful works-like-a-charm T-SQL, but face it, not the most exciting language). The result is that management is losing any respect it had for the database discipline. The database is under attack and losing the war.
The job of DBA encompasses many different roles (and often job titles), and these vary widely from one organization to the next. In short, there is no standard job description for a DBA. This is partly because the job title doesn’t have a long history (relational databases were first used in the 1970s, and Microsoft SQL Server Version 4.21 was released in 1993) and partly because the DBA role is quickly evolving as new technologies are released.
Listing 6. VBScript file (sendEmailSMTP.vbs) sends email notifications
'Accept input parameters Dim databaseName Dim jobType 'first parameter databaseName= Wscript.Arguments.Item(0) 'second parameter jobType= Wscript.Arguments.Item(1) Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "Message Alert from STANDBY SQL Server: " & databaseName & " " & jobType & " job failed" objMessage.From = "admin@domain.local" objMessage.To = "sqladmin@domain.local" objMessage.TextBody = "The " & databaseName & " " & jobType & " job running in the STANDBY SQL Server instance failed on " & Now() & vbCrLF & vbCrLf & "Please look at this problem ASAP " & vbCrlf & vbCrlf & vbCrlf & vbCrlf & "- The SQL Server Administrator/DBA -" 'This section provides the configuration information for the remote SMTP 'server.Normally you will only change the server name or IP. objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Name or IP of Remote SMTP Server objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.domain.local" 'Server port number(typically 25) objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objMessage.Configuration.Fields.Update objMessage.Send Set objMessage = Nothing