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...
-
(a) Show that the curve y = 23+3x-2 has no tangent line with slope 2. (b) Where does the normal line to the parabola y = z-r at the point (1,0) intersect the parabola a second time? Illustrate with a...
-
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...
-
John Adams Companys record of transactions for the month of April was as follows. Instructions (a) Assuming that perpetual inventory records are kept in units only, compute the inventory at April 30...
-
Give five examples of accounting segments for which managers might want contribution data. LO.1
-
Multiple Choice Questions 1. Moore Company carries product A in inventory on December 31, 2007 at its unit cost of $7.50. Because of a sharp decline in demand for the product, the selling price was...
-
Springfield Ltd. was incorporated as a private company on January 2, 2021, and is authorized to issue an unlimited number of common shares and $1 preferred shares. The company had the following share...
-
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) =...
-
Find the Y parameters for the network shown in figure and then find the output voltage of the two-port when a 4mA current source is connected to the input port and a 4k? load is connected to the...
-
Question 2: Response to John Ripley?
-
Prepare a summary of the effects of the "fat tax" on the demand and supply diagram. Ensure you talk about the dead weight loss. PRICE D Tax Revenue S P1 P2 TAX P3 Dead Weight Loss QUANTITY QeAT QeBT...
-
Trade causes production in Home to move from point A to point B. What does this mean happened to the relative price of Qc? QF Home QF1 A QF2 Qc Qc2 Qc2
-
Write as an ordered pair the coordinates of the point whose y-coordinate is 3 and whose x-coordinate is -7. X Viewing Saved Work Revert to Last Response
-
1. A cereal manufacturer tests their equipment weekly to be assured that the proper amount of cereal is in each box of cereal. The company wants to see if the amount differs from the stated amount on...
-
Sketch all the possible stereoisomers of (a) Tetrahedral [Cd(H2O)2Cl2], (b) Square-planar [IrCI2(PH3)2]- , (c) Octahedral [Fe(o-phen) 2CI2]+,
-
Based on the scenario described below, generate all possible association rules with values for confidence, support (for dependent), and lift. Submit your solutions in a Word document (name it...
-
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...
-
Discuss why it is important for company managers to understand and use social capital knowledge to help build social ties among their skilled knowledge workers so they can build employee loyalty...
-
Kate lives in a house close to a local university, and she traditionally has rented a garage apartment in the back of her property to students for $750 per month. Kate wants to transfer the title to...
-
Pottery Ranch Inc. has been manufacturing its own finials for its curtain rods. The company is currently operating at 100% of capacity, and variable manufacturing overhead is charged to production at...
Study smarter with the SolutionInn App