What happens after the script runs and finishes searching for warning and error records? Refer to the
Question:
What happens after the script runs and finishes searching for warning and error records?
Refer to the PERL script shown in Figures 8.3 and 8.4.
Transcribed Image Text:
C:\Users ex h\Documents\Book SQLServerLogCheck.prl - Notepad++ Eile Edit Search View Encoding Language Settings Macro Bun Plugins Window I Dac SQLServerLogCheck pri Sample program to review, extract SQL Server log records 1 2 3 # use TIME::Local; #note the "\"usage #infile "C:\\Program Files\\Microsoft SQL Server\\MSSQL11 MSSQLSERVER12\\MSSQL\\log\\SQLAGENT OUT $num - 0: $mindelay= 30; #set the time delay between checks in minutes 8 #delay= 60 smindelay, #compute the number of seconds for the time delay 9 G 6 10 11 12 13 14 16 16 #change spaces and in datetime for use in filename 17 18 19 20 21 22 23 24 28 26 27 20 29 30 35 36 START CHECK: $info = "n": #varn = ""; Sex = ""; stime 41 localtime (time()); #extract the date and time #datetime substr(4time, 4, 12); $datetimes/ /_/9; #datetime= 3/:/-/ topen and check SQL Server log for messages open (IN, "sinfile") or die "Couldn't open SQL Server Log File sinfile "/ while ($input ) { chomp ($input); Sinput= /[\x00-\x1F\x7E-\xFF)//g/ remove nonprintable characters #extract date time stamp from message record (ignoring blank lines) if (length (input) > 0) { #currdts = substr(input, 0, 19); } scompare timestamp to last processed; only process later records if ($currdts le slastdts) (next); #check for information, warning, and error messages if ($input =/\9/) ( #info record found it (info eq "n") { #first record..open output file #info= "y"; #reset flag with first record found #infofile="Monitor\\Information_"datetime. "_Records"; open (INFO, ">$infofile") or die "Can't open output file info"; print INFO "sinput "; } ale ( print Norm length: 2,511 lines: 75 "singut "/ Ln: 1 Col: 45 Sel: 010 FIGURE 8.3 First part of script to monitor SQL Server logs. Windows (CRLF) X UTF-8 INS
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 100% (2 reviews)
The script sleep...View the full answer
Answered By
Bhartendu Goyal
Professional, Experienced, and Expert tutor who will provide speedy and to-the-point solutions. I have been teaching students for 5 years now in different subjects and it's truly been one of the most rewarding experiences of my life. I have also done one-to-one tutoring with 100+ students and help them achieve great subject knowledge. I have expertise in computer subjects like C++, C, Java, and Python programming and other computer Science related fields. Many of my student's parents message me that your lessons improved their children's grades and this is the best only thing you want as a tea...
3.00+
2+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Coastal Computer operates two retail outlets in Oakview, one on Main Street and the other in Lakeland Mall. The stores share the use of a central accounting department. The cost of the accounting...
-
How are warning messages identified in the input file? Refer to the PERL script shown in Figures 8.3 and 8.4. C:\Users ex h\Documents\Book SQLServerLogCheck.prl - Notepad++ Eile Edit Search View...
-
What is a buy-sell agreement, and how does life insurance facilitate it?
-
As a new controller, reply to this comment by a plant manager; As I see it, out accountants may be needed to keep records for shareholders and Uncle Sam, but I dont want them sticking their noses in...
-
A Deloitte employment survey asked a sample of human resource executives how their company planned to change its workforce over the next 12 months (INC. Magazine, February 2012). A categorical...
-
This chapter placed emphasis on a "transaction-based perspective" related to customers. What would be different about a transaction involving an investor? What do we mean by transaction?
-
Red Corporation wants to set up a manufacturing facility in a mid western state. After considerable negotiations with a small town in Ohio, Red accepts the following offer: land (fair market value of...
-
x Bond Issue B (A) Cash Interest Paid $600,000.0 (B) Period Interest Expense Period 12.0% x (E) x 12.5% Ending 3/12 x 3/12 (C) Amort. (A) - (B) (D) (E) Carrying Value Unamortized $600,000 Balance (D)...
-
In line 42, what is the purpose of the \ character? Refer to the PERL script shown in Figures 8.3 and 8.4. C:\Users ex_h\Documents\Book\SQLServerLogCheck.prl - Notepad+. Eile Edit Search View...
-
Mark each statement below true or false. (a) In any probability model, the number of all possible outcomes is finite. (b) In any probability model, all outcomes are equally likely. (c) P(AB) =...
-
Fair Value Hedge: Put Options Over hill Farms Inc. has a large portfolio of marketable equity securities held as short-term investments. To protect against declines in the value of 10,000 shares of...
-
Within the domain of virtualization technologies, could you elucidate the intricate workings of hypervisors and containerization frameworks, and the impact they have on resource utilization,...
-
Based on using Circular 230 and the AICPA Code of Professional Conduct, discuss the differences between the CPA-auditor vs CPA-tax accountant (or attorney) Questions: Discuss the differences of LEGAL...
-
Create the first quarter budget worksheet for the textured leather option, as follows: In cells A1:B2, enter the necessary inputs for the number of shoes per pair and the % of labor for overhead.
-
What is the amount the pollicy owner is responsible before the insurance company starts payiing?
-
Identify the opportunities available to the company Obtain all the pertinent information Estimate the cost (based on the information you have) for the annual costs (you may have to do some additional...
-
The MoMi Corporations cash flow from operations before interest and taxes was $2 million in the year just ended, and it expects that this will grow by 5% per year forever. To make this happen, the...
-
The sales department of P. Gillen Manufacturing Company has forecast sales in March to be 20,000 units. Additional information follows: Finished goods inventory, March 1 . . . . . . . . . . . . . . ....
-
List some application-layer protocols mentioned in this chapter
-
In Figure 2.10, when the IP protocol decapsulates the transport-layer packet, how does it know to which upper layer protocol (UDP or TCP) the packet should be delivered? Figure 2.10 HTTP DNS SNMP ...
-
Match the following to one or more layers of the TCP/IP protocol suite: a. Creating user datagrams b. Responsibility for handling frames between adjacent nodes c. Transforming bits to electromagnetic...
-
(a) A proton is released from rest and accelerates freely through a potential difference* of size 140 V. (*Note: You do not need to know the initial and final voltage values, only their difference!)...
-
Q1) Show that work done during the vaporization of 1 kg of saturated liquid water at 200 C can be calculated in two different approaches, and calculate the work done using both approaches. [10] Q2) A...
-
1. An object, 3.00 cm in height, is positioned 30.0 cm in front of a spherical refracting surface (n2 = 1.33), which is placed in air, as illustrated in the figure below. The radius of curvature of...
Study smarter with the SolutionInn App