What are the output files produced when this script runs? Where are they stored? Refer to the
Question:
What are the output files produced when this script runs? Where are they stored?
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 G 6 8 9 10 11 12 18 19 20 21 22 13 localtime (time()); 14 #extract the date and time 16 #datetime substr (#time, 4, 12); 16 #change spaces and in datetime for use in filename 17 23 24 28 26 27 20 29 30 35 36 41 # use TIME::Local; #note the "\"usage #infile "C:\\Program Files\\Microsoft SQL Server\\MSSQL11 MSSQLSERVER12\\MSSQL\\log\\SQLAGENT OUT $num - 0: smindelay = 30; #set the time delay between checks in minutes #delay= 60 smindelay, #compute the number of seconds for the time delay START CHECK: #info= "n": #varn = ""; Sex = ""; stime $datetimes/ /_/9; #datetime= 3/:/-/ topen and check SQL Server log for messages open (N, "sinfile") or die "Couldn't open SQL Server Log File sinfile "/ while ($input ) { chomp ($input); Sinput= /[\x00-\x1F\x7E-\xFF)//g/ trenove 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 ($currdts 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: 100% (QA)
Two files are created th...View the full answer
Answered By
Muhammad Umair
I have done job as Embedded System Engineer for just four months but after it i have decided to open my own lab and to work on projects that i can launch my own product in market. I work on different softwares like Proteus, Mikroc to program Embedded Systems. My basic work is on Embedded Systems. I have skills in Autocad, Proteus, C++, C programming and i love to share these skills to other to enhance my knowledge too.
3.50+
1+ 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...
-
To demonstrate the ability to propose, implement, and query the database. Problem: MovinOn Inc. is a moving company that provides moving and storage services in California, Nevada, and Arizona....
-
Last year, Intrepid Corporations tax return revealed the following items: dividends from 20 percent owned domestic corporations - $60,000; Gross income from services rendered - $300,000;...
-
Distinguish between operating income and net income.
-
CCN and Act Media provided a television channel targeted to individuals waiting in super-market checkout lines. The channel showed news, short features, and advertisements. The length of the program...
-
Sometimes financial statements will show "unearned revenue." How does this arise? What type of transactions might be typical examples?
-
The following are several independent errors made by a company that uses the periodic inventory system: 1. Goods in transit, purchased on credit and shipped FOB destination, $10,000, were included in...
-
Using the data from problem 3-24, complete the following steps: 1. Prepare a schedule to determine goodwill and to allocate fair value 2. Prepare a schedule to determine the balance in the...
-
What relational database management systems could be used to store the database and its tables? A design team supporting a small group of analysts must do a rapid prototype to develop a GUI to be...
-
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...
-
It is common to find assembly-code lines of the form xorq %rcx, %rcx In code that was generated from C where no exclusive-or operations were present. A. Explain the effect of this particular...
-
Orchard B&B is a bed and breakfast on the coast of Florida. As customers make reservations they are required to pay cash in advance equal to one-half of the rate for their stay. How should Orchard...
-
write the best characterizes relevant information?
-
ACQUIRE AND MODERNIZE MILITARY UNIQUE SYSTEMS THAT REQUIRE SIGNIFICANT DEVELOPMENT, TIME AND OR COSTS ARE CALLED WHAT?
-
Write a procedure for Wamco payroll confidentiality and secure storage You are a payroll officer for Wamco. Often family members and other external parties ring you up or email you and want to check...
-
a) There is a donut shop with 4 types of donuts. {A, B, C, D} What is the probability that a random sale of 12 donuts contains at least 6 donuts of type A? Assume all sales are equally likely. b)...
-
Hatfield has begun recording all new equipment leases on its books as operating leases, a change from its consistent past use of capital leases, in which the present value of lease payments is...
-
The cash records of Holly Company show the following four situations. 1. The June 30 bank reconciliation indicated that deposits in transit total $720. During July, the general ledger account Cash...
-
Let T be a text of length n, and let P be a pattern of length m. Describe an O(n+ m)-time method for finding the longest prefix of P that is a substring of T.
-
Give a justification of why the computeFailKMP method (Code Fragment 13.4) runs in O(m) time on a pattern of length m. 1 private static int[] computeFailKMP(char[ ] pattern) { int m = pattern.length;...
-
Describe an example of a text T of length n and a pattern P of length m such that the brute-force pattern-matching algorithm achieves a running time that is (nm).
-
6. Determine the expression of the total force over q in the system in Fig. 4 if d = 3d2 (6) 7. For the systems in Figs 5 to 7 draw the electromagnetic field lines associated to each one (6). Spring...
-
3. For vectors A = - 21 + 5j and B = 6 + 3 }, calculate the magnitude and direction of -> a. A+ B (-21+5)+1 -> b. A B +15+313 MJ 2 oth to shi 1 lect c. 3A + B -8+2=
-
In the year 1054, a supernova explosion in went off in the Milky Way and was observed and recorded by ancient astronomers. The distance of the star that exploded is estimated to be 6500 light-years,...
Study smarter with the SolutionInn App