Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Scripting customized information into a report

Posted on 2012-03-21
3
Medium Priority
?
242 Views
Last Modified: 2012-03-22
Experts,

I am looking to create a script in which I can pull the following information from a server and save it to a text file on the machine.

Information needed:
1. Machine Name:
2. Number of CPU's
3. Version of Oracle running on each machine.

Now the Oracle Version can be gotten by running Sqlplus -v from a command prompt.

I am at a loss on the others.

In order to get full points please provide a fully functional script that can pull items 1 - 3 and save them in a text file on the workstation.
0
Comment
Question by:itguy565
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 57

Accepted Solution

by:
Bill Prew earned 2000 total points
ID: 37750523
Here's a simple BAT script that will do the job.
@echo off
set LogFile=c:\temp\info.txt
echo %COMPUTERNAME%>"%LogFile%"
systeminfo 2>NUL|find /i "Processor(s):">>"%LogFile%"
sqlplus -v>>"%LogFile%"

Open in new window

~bp
0
 
LVL 11

Author Closing Comment

by:itguy565
ID: 37751141
Exactly what I was looking for..
0
 
LVL 57

Expert Comment

by:Bill Prew
ID: 37751915
Great, glad that helped, thanks for the feedback.

~bp
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question