In line 42, what is the purpose of the character? Refer to the PERL script shown
Question:
In line 42, what is the purpose of the “\” character?
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 SQL ServerLogCheck pri 1 Sample program to review, extract SQL Server log records 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 #mindelay, #compute the number of seconds for the time delay 9 G 6 10 11 12 13 localtime (time()); 14 #extract the date and time 16 #datetime substz (4time, 4, 12); 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 = "n"; Sex = ""; stime 41 $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 (Sinput = ) { 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) { Scurrdts = substr($input, 0, 19); } scompare timestamp to last processed; only process later records if (Seurrdts le slastdts) (next); #check for information, warning, and error messages if ($input =/\9/) ( #info record found if (sinfo eq "n") ( #first record..open output file sinfo = "y"; #reset flag with first record found #infofile="Monitor\\Information "datetime. "_Records"; open (INFO, ">$infofile") or die "Can't open output file Sinfo"; print INFO "$input "; } ale ( print Norm length: 2,511 lines: 75 "sinput "; 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: 0% (1 review)
The is to Perl a special character The ...View the full answer
Answered By
Rishabh Ojha
During my undergraduate i used to participate as TA (Teaching Assistant) in several electronics and computers subject. I'm passionate about learning Computer Science as my bachelors are in Electronics but i learnt most of the Computer Science subjects on my own which Machine Learning also. At Present, i'm a working professional pursuing my career as a Machine Learning Engineer and i want to help others learn during my free hours, that's all the motivation behind giving tuition. To be frank i have no prior experience of tutoring but i have solved problems on opensource platforms like StackOverflow and github. ~Thanks
4.90+
3+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Create a Java project to implement the B-Rep data structure shown below. Define classes for all the topological and geometric entities shown in the figure. SURFACE Plane CURVE Line SOLID LUMP SHELL...
-
Find the transmission parameters for the two port network shown 4
-
What is the purpose of the $match variable? Refer to the PERL script shown in Figures 8.1 and 8.2. C:\Users ex h\Documents\Book SearchForTerms.prl - Notepad++ File Edit Search View Encoding Language...
-
The parol evidence rule: a. allows the introduction of conflicting oral testimony relating to contractual obligations if the parties had an oral agreement prior to forming a fully integrated written...
-
As used in accounting, what do IMA and CMA stand for?
-
Kate Sanders, a researcher in the department of biology at IPFW University, studied the effect of agriculture contaminants on the stream fish population in Northeastern Indiana (April 2012)....
-
How might the market value of a firm differ from its intrinsic value?
-
Major Airlines would like to train new flight attendants in an economically rational way. The airline requires a staff of about 1,000 trained attendants to maintain in-flight service. Because of the...
-
Connecting with customers is a strategic effort to create relationships beyond the initial transaction. It involves communication, but it is so much more. Connecting with customers is important...
-
Who would you ask to participate as a member of the design team? Why? You are asked to lead a design team for a new database to be used by your company.
-
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. C:\Users ex h\Documents\Book SQLServerLogCheck.prl -...
-
Do cigarette and alcohol ads you have seen contain primarily informative content or persuasive content? What consequences would you predict from your fi nding?
-
How well did the mitigation controls perform for hurricane maria?
-
Identify an advantage of a public listing from the perspective of the issuer. Ease of raising additional capital due to established market value. Costs of exchange listing. Need to disclose material...
-
What is the best justification for this topic - the significance of audit and compliance checks in modern accounting practices.
-
Why the data safeguards are important to implement to protect student financial aid data?
-
low in product quality. Shocked by this result, Jorge Gomez, Mercury's president, set up a task force to Implement a formal quality Improvement program. Included on this task force were...
-
Chiptech, Inc., is an established computer chip firm with several profitable existing products as well as some promising new products in development. The company earned $1 a share last year, and just...
-
A number of years ago the United Food and Commercial Workers Union organized 800 workers of the 1035 employees at one of the Wilson Brothers food operations in Toronto, Ontario. The employees include...
-
Assume that a private internet requires that the messages at the application layer be encrypted and decrypted for security purposes. If we need to add some information about the encryption/decryption...
-
If a port number is 16 bits (2 bytes), what is the minimum header size at the transport layer of the TCP/IP protocol suite?
-
Assume a private internet uses three different protocols at the data-link layer (L1, L2, and L3). Redraw Figure 2.10 with this assumption. Can we say that, in the data-link layer, we have...
-
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...
-
In the Figure below, R = 8.2 2, R2 = 6.5 S2, R3 = 3.12, R4 = 9.5 2, R5 = 1.82, and R6 = 2.8 2. Find the equivalent resistance. Equations: R = R + Rb, + V=60V- R4 R3 MM B-6 R5 LMM M M R B-2
-
Suppose a bullet travels with uniform motion a distance of 2 m in 0.005 second. If we divide the displacement by the time interval, we get 400 m/s. How do you interpret the number 400 in light of the...
Study smarter with the SolutionInn App