Script for generating VPN statistics
Hi.
I am sending accounting info to a RADIUS server that stores it in a mySQL database.
Is there a script or an open source solution available to generate some statistics about the use of the VPN concentrator? Users per day/month/year, top users, traffic generated, and so on.
Thanks.
Ramada
great work, dude.
Thanks for sharing.
Similar Messages
-
Hi
I Need VDS script in order to change domain client local administrator password in my domain ,and put this script in startup script via group policy, but for security purpose I want to randomize local administrator password and log new password
set for each computer on a text file, I want to over write the old password of eachcomputer in log file with new one in order to have the update log file ,my support team some times need administrator password for troubleshooting.
I need a script for generate randomize administrator password which make log file to recorded new administrator password with associated computer name on it and each time new administrator password set it over write the old record on
the log file and update the content of log file automatically.
RegardsHi
I need a script for generate randomize administrator password which record new password on a log file with associated computer name and each time new administrator password set for a computer it over write the old record
on the log file and update the content of log file automatically.
Regards -
How to get SQL script for generating table, constraint, indexes?
I'd like to get from somewhere Oracle tool for generating simple SQL script for generating table, indexes, constraint (like Toad) and it has to be Oracle tool but not Designer.
Can someone give me some edvice?
Thanks!
m.I'd like to get from somewhere Oracle tool for
generating simple SQL script for generating table,
indexes, constraint (like Toad) and it has to be
Oracle tool but not Designer.
SQL Developer is similar to Toad and is an Oracle tool.
http://www.oracle.com/technology/products/database/sql_developer/index.html -
Creteria for generating optimizer statistics
Dear membes,
Oracle 10.2.0.2
os : HP-UX 11i
I want to know is there any creteria for generating optimizer statistics
for the production database, like we have a creterai for rebuilding indexes
through checking the index_stat table.
Is there any tables present in database for this kind pre checking before
generating the optimizer statistics.
Thanks.VIRENDER SINGH wrote:
Dear membes,
Oracle 10.2.0.2
os : HP-UX 11i
I want to know is there any creteria for generating optimizer statistics
for the production database, like we have a creterai for rebuilding indexes
through checking the index_stat table.
Is there any tables present in database for this kind pre checking before
generating the optimizer statistics.First of all I hope you've heard that rebuilding indexes is something that should only be done under very rare circumstances, see e.g. here or here.
Since you're on 10g already you should be aware of the fact that the database is coming with a pre-configured default statistics collection job that runs every night and attempts to gather statistics on stale objects (either with no statistics at all or more than 10% changes since the last statistics gathering).
If you're having an application that modifies large chunks of data in batch jobs, then you should consider gathering statistics right after these batch modifications because otherwise it might take too long until the default job is activated and refreshes the statistics and many execution plans until then might suffer from the incorrect/outdated statistics.
Ideally you should know your application and data and work out when to gather the statistics and in particular how to gather the statistics and in some cases even use hand-crafted statistics (using the DBMS_STATS.SET__STATS procedures) that lead the optimizer in the desired direction.
There are many potential pitfalls to consider, e.g. the default method for generating histograms has changed in 10g to "FOR ALL COLUMNS SIZE AUTO" which means you'll get histograms for columns that are used in WHERE clauses (when using equal or range comparisons) and have skewed data or contain large gaps in the values. This was not the case in 9i and not always does the existence of histograms change execution plans for the better, in particular if you're using bind variables.
In addition 10g introduced the possibility of "out-of-range" predicates which means that the optimizer takes into account if a predicate value is outside the recorded minimum and maximum value of the column. If the gap is becoming significant the selectivity is adjusted and eventually you get an estimate of 1 (or actually 0 adjusted to 1) rows which can have dramatic effects on your execution plans.
This means you need to be careful if the default "staleness" of 10% changes is applicable to your particular situation otherwise you might be confronted with execution plans that either deteriorate over time and/or "switch" at a certain point in time to a really "bad" plan to due the adjusted selectivity caused by the "out-of-range" predicates. If this is the case you should consider refreshing the statistics more often (using your own logic/job) to avoid such situations.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
Tool Bar script for generating Email
Hi experts,
I have made the following script for sending a custom email.
And i've the required jar files in the ftp drive on the same server where E-sourcing is installed.
If anyone can look at this code and tell me whats wrong with it, i'll be realy grateful .
addClassPath("D:/FTPHOME/MailJar/activation.jar");
addClassPath("D:/FTPHOME/MailJar/javac.mail.jar");
addClassPath("D:/FTPHOME/MailJar/mail.jar");
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
// Recipient's email ID needs to be mentioned.
String to = "Email add of recipient";
// Sender's email ID needs to be mentioned
String from = "Email add of sender";
// Assuming you are sending email from localhost
String host = "IP address of the host ";
// Get system properties
Properties properties = System.getProperties();
// Setup mail server
properties.setProperty("mail.smtp.host", host);
// Get the default Session object.
Session session1 = Session.getDefaultInstance(properties);
// Create a default MimeMessage object.
MimeMessage message = new MimeMessage(session1);
// Set From: header field of the header.
message.setFrom(new InternetAddress(from));
// Set To: header field of the header.
message.addRecipient(Message.RecipientType.TO,
new InternetAddress(to));
// Set Subject: header field
message.setSubject("This is the Subject Line!");
// Now set the actual message
message.setText("This is actual message");
// Send message
try{
Transport.send(message);
catch(Exception e)
print(e);
Thanks,
AbhijitI'd like to get from somewhere Oracle tool for
generating simple SQL script for generating table,
indexes, constraint (like Toad) and it has to be
Oracle tool but not Designer.
SQL Developer is similar to Toad and is an Oracle tool.
http://www.oracle.com/technology/products/database/sql_developer/index.html -
Script for generating warning message during Shutdown by GPO
Hello,
I want to apply GPO in my AD to generate a warning message in the pop-up window just after when user click SHUT-DOWN in their system .
But I don't know what are the script for the same in batch file. Any body please suggest me.
ThanksHello,
i know the process how to apply it , the only things i have a problem is the content of script as i mentioned above and now below also. I shown the script above which i used so far here only i need how to improve my script .
echo msgbox "Hey! Here is a message!" > %tmp%\tmp.vbs
cscript /nologo %tmp%\tmp.vbs del %tmp%\tmp.vbs
Thanks -
Script for generating pacman html info
Hi folks!
I created a small python script for parsing pacman outputs and generate a html document
Is under development and not very useful at the moment but I want to share my progress
Output example: http://tulur.com/pkginfo/example.html
(is in spanish because my locale conf, the output is in your language)
http://tulur.com/archlinux-pkginfo
I'm not a programmer, probably can be improved
Last edited by bungow (2010-03-08 23:05:01)great work, dude.
Thanks for sharing. -
Issue with Creating CATT Script for Generating Derived Roles
Hi Experts,
I am desperately trying to find the solution on how I create a CATT Script to generate derived roles from few 100 master roles.
I posted a thread on Security (Can I do a 'mass generation' of dervied roles?) .. however, since it turns out to be a SCAT issue, I thought I'll ask someone from this forum too.
Extract from the other thread is as follows :
"I cannot get the script to automate the generation of derived roles.
when Entering parameters for a test case, I can only see the Initial PFCG Screen. Display/Change Authorization screen doesn't seem to get recorded / logged in the test screen.
I.e : All screens with program SAPLPRGN_TREE is recorded, however all screens with program SAPMSSY0 is not.
I hope it makes sense.. Any suggestions on how I can automate the generation of derived roles tasks?
Thanks.
DineishHi,
I have the same problem just now.
Have you found some solutions about it ?
thx
Luigi -
Script for generating XML file ... problem with null values
Greetings everyone,
i come here with a question that troubles me for some time now. I have a script which i run from SQLPLUS every now and then to generate an XML file.
Problem is that data which needs to be in XML is not allways <> NULL and i need to hide those tags that are empty </tag>.
I will post below my script and if you could help me with it it would be really great!
Thanks for reading!
set long 20000000
set long 20000000
set linesize 32000
SET ECHO OFF
SET TRIMSPOOL on
SET HEADING OFF
SET PAGESIZE 50000
SET VERIFY OFF
SET FEEDBACK OFF
SET TERMOUT OFF
spool C:\test.xml
set serveroutput on
begin
dbms_output.put_line('<?xml version="1.0" encoding="utf-8" ?>');
end;
SELECT
XMLELEMENT("ReportRoot",XMLATTRIBUTES('http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi", 'http://www.w3.org/2001/XMLSchema' as "xmlns:xsd" , '1.0' as "Version",sysdate as "CreationDate",to_char(sysdate,'hh:mm:ss') as "CreationTime",'1524544845' as "id"),
XMLELEMENT("Porocila",XMLELEMENT("JOLY",(SELECT XMLAGG (XMLELEMENT("RefNrReport",replace('SON'||to_char(ref_ST,'00000'),' ',''))) from access_table_2 where ref_ST = &1),
XMLELEMENT("ReportDate",sysdate),XMLELEMENT("Labeling",'545254450'),
(SELECT XMLAGG (XMLELEMENT("Reportf",
XMLELEMENT("access",access),
XMLELEMENT("date",date),
XMLELEMENT("datep",datep),
XMLELEMENT("ModificationInfo",'M'),XMLELEMENT("ModificationReason",modireason)))
from v_xml_test where id_dok = &1 and ind_print = '1'))))
.extract('/*')
from dual
spool off
exitNow lets pretend that XMLELEMENT("datep",datep), is sometimes NULL and i do not want to display it.may be
with t as
select sysdate datep from dual union all
select null datep from dual
select xmlagg(xmlelement("Reportf",
case when datep is not null then XMLELEMENT("datep", datep)
end
from t -
Script for generating insert statements
I have different tables with data and I would like to have the insert statements generated of the data in the tables. Does someone have a generic script to do the job?
Hi trafoc,
You can also check out SQL Developer which has function to output table ddl and/or
data under Tools selection. Link is "http://www.oracle.com/technology/software/products/sql/index.html"
Below is a sample output :
-- DATA FOR TABLE PEOPLE
-- FILTER = none used
REM INSERTING into PEOPLE
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('SMITH','CLERK',800,20);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('ALLEN','SALESMAN',1600,30);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('WARD','SALESMAN',1250,30);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('JONES','MANAGER',2975,20);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('MARTIN','SALESMAN',1250,30);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('BLAKE','MANAGER',2850,30);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('CLARK','MANAGER',2450,10);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('KING','PRESIDENT',5000,10);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('TURNER','SALESMAN',1500,30);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('GRIZZLY','CLERK',1100,20);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('JAMES','CLERK',950,30);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('FORD','ANALYST',3000,20);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('MILLER','CLERK',1300,10);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('SCOTT','Clerk',9999,20);
Insert into PEOPLE (USERNAME,JOB,SALARY,DEPTNO) values ('TEST_VPD','Clerk',1500,20);
-- END DATA FOR TABLE PEOPLE
HTH
Zack -
Generate script for filling table
Hi all,
I've got table at test Oracle server table1 with columns ID, BTYPE, MYDESCRIPTION. Rows of this table have been inserted manually. Now my need is to write script for creating table (structure + data). I think about writing something like
CREATE TABLE table 1
AS
SELECT 1 AS ID, 'TYPE1' AS BTYPE, 'SOME TEXT' AS MYDESCRIPTION
UNION ALL
SELECT 2 AS ID, 'TYPE2' AS BTYPE, 'SOME TEXT 2' AS MYDESCRIPTION
But rows are too many to type... Could you please suggest some way of generating script for creating table at working server using existing table at test server? The problem is I don't have an access to working server.
Thanks ahead.Use the view user_tab_cols
say
declare
cursor c1 is
select 'e_'||column_name ||' '||data_type||' ('||data_length||') ' col
from user_tab_cols
where table_name = 'DEPARTMENTS'
union
select 'd_'||column_name ||' '||data_type||' ('||data_length||') ' col
from user_tab_cols
where table_name = 'EMPLOYEES';
v1 varchar2(500);
begin
v1 := 'create table new_tabl (';
for i in c1 loop
v1 := v1||i.col||',';
end loop;
v1 := substr(v1,1,length(v1)-1);
dbms_output.put_line(v1||')');
end;
/i am using employees and departments table of hr schema.
now as both the tables have some column column so i have used e for employees and d for departments
just do one thing remove the length for date data type in o/p i dont know why it is not working.
this will give you structure for data use any sql stmt
Edited by: 810345 on Jun 9, 2011 9:58 PM -
Generating .sql script for all objects of a User/Schema
Hi All,
What are the ways in which I can generate scripts for a full USER (all objects) with dependencies. (by dependencies I mean for example that PK be created first before creating FK).
We can export the full schema using (exp rows=n) but this will generate a .dmp file. I want a .sql file which can be run on any other machine (from SQL> prompt) so that user and all objects are created (without the need to use "imp").
Thanks
-AKJBut the easiest way to do this would be to do an export with rows=N and then an import.
You coule do an export and then let run the import utility with indexfile=<you_name_it>.sql and this way you'll get a file with all statements included (but table definition commented out).
Or you do it yourself (DIY-method), where you have to select all your relevant objects and their dependencies. -
WLST Script for RDBMS Event Generator
Hello WLI Gurus,
I need the WLST Script for RDBMS Event Generator. There was a script in dev2dev but is no longer accessible. I need it for WLI 9.2.
Thanks in advance.
VarunIf you are using a cluster you need to make sure the connection pool and data source are deployed on the admin server. I have had this problem many times before.
-
Generating Insert Scripts for multiple tables
Hi,
I have 6 tables TABLA,TABLB,TABLC,TABLED,TABLEE,TABLEF
I want to generate Insert Scripts for the above 6 tables.
Is there any mechanism to do so so that i can generate the .sql files for the above 6 tables to another schema?
Any help will be needful for me.Hi,
May the below given function script help you...
CREATE OR REPLACE FUNCTION get_insert_script (v_table_name VARCHAR2)
RETURN VARCHAR2
AS
b_found BOOLEAN := FALSE;
v_tempa VARCHAR2 (8000);
v_tempb VARCHAR2 (8000);
v_tempc VARCHAR2 (255);
BEGIN
FOR tab_rec IN (SELECT table_name
FROM all_tables
WHERE table_name = UPPER (v_table_name))
LOOP
b_found := TRUE;
v_tempa := 'select ''insert into ' || tab_rec.table_name || ' (';
FOR col_rec IN (SELECT *
FROM cols
WHERE table_name = tab_rec.table_name
ORDER BY column_id)
LOOP
IF col_rec.column_id = 1
THEN
v_tempa := v_tempa || '''||chr(10)||''';
ELSE
v_tempa := v_tempa || ',''||chr(10)||''';
v_tempb := v_tempb || ',''||chr(10)||''';
END IF;
v_tempa := v_tempa || col_rec.column_name;
IF INSTR (col_rec.data_type, 'CHAR') > 0
THEN
v_tempc := '''''''''||' || col_rec.column_name || '||''''''''';
ELSIF INSTR (col_rec.data_type, 'DATE') > 0
THEN
v_tempc :=
'''to_date(''''''||to_char('
|| col_rec.column_name
|| ',''mm/dd/yyyy hh24:mi'')||'''''',''''mm/dd/yyyy hh24:mi'''')''';
ELSE
v_tempc := col_rec.column_name;
END IF;
v_tempb :=
v_tempb
|| '''||decode('
|| col_rec.column_name
|| ',Null,''Null'','
|| v_tempc
|| ')||''';
END LOOP;
v_tempa :=
v_tempa
|| ') values ('
|| v_tempb
|| ');'' from '
|| tab_rec.table_name
|| ';';
END LOOP;
IF NOT b_found
THEN
v_tempa := '- Table ' || v_table_name || ' not found';
ELSE
v_tempa := v_tempa || CHR (10) || 'select ''- commit;'' from dual;';
END IF;
RETURN v_tempa;
END;(copied and pasted from a commercial site)
*009*
Edited by: 009 on Jan 14, 2010 10:43 PM
(Function after debug) -
WSUS script for pending reboot possible addition - How
Hi, I am found script for pending reboot and script work perfectly. My problem is that script generate only pending computers reboot for master wsus server not for replica servers. Can I modify this script to generate pending reboot for all replica servers on
one place(wsus master server) or I must run this script on every replica server. This is script:
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null
if (!$wsus) {
$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer();
$computerScope = new-object Microsoft.UpdateServices.Administration.ComputerTargetScope;
$computerScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
$updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope;
$updateScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
$computers = $wsus.GetComputerTargets($computerScope);
$report = @()
$computers | foreach-object {
$computer = $_.FullDomainName
$updatesForReboot = $_.GetUpdateInstallationInfoPerUpdate($updateScope)
$updatesForReboot | foreach-object {
$temp = "" | Select Computer,Update
$temp.Computer = $computer
$temp.Update = ($wsus.GetUpdate($_.UpdateId)).Title
$report += $temp
$report | Select "Computer","Update" | Export-Csv -Path c:\..PendingReboot.csv -Delimiter 1 -NoTypeInformationModified script
work great. I have report from all replica server and master server after new updates
from today. I am add mail option and finaly this is what I am modify:
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null
if (!$wsus) {
$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer();
$computerScope = new-object Microsoft.UpdateServices.Administration.computerTargetScope;
$computerScope.IncludeDownstreamComputerTargets = $true
$computerScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
$updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope;
$updateScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
$computers = $wsus.GetComputerTargets($computerScope);
$report = @()
$computers | foreach-object {
$computer = $_.FullDomainName
$updatesForReboot = $_.GetUpdateInstallationInfoPerUpdate($updateScope)
$updatesForReboot | foreach-object {
$temp = "" | Select Computer,Update
$temp.Computer = $computer
$temp.Update = ($wsus.GetUpdate($_.UpdateId)).Title
$report += $temp
$report | Select "Computer","Update" | Export-Csv -Path c:\yourpath...PendingReboot.csv -Delimiter 1 -NoTypeInformation
$smtpServer = "your mail server"
$att = "c:\yourpath...PendingReboot.csv"
$msg = new-object Net.Mail.MailMessage
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = "[email protected]"
$msg.To.Add("[email protected]")
$msg.Subject = "Pending Reboot"
$msg.Body = "Your msg"
$msg.Attachments.Add($att)
$smtp.Send($msg)
Maybe you are looking for
-
The iMovie app title is stuck on my screen
Hi all! My first time here, my first Mac--an iMac 21, just bought a month ago... The image above is the constrained screen shot of an approx. 2.5x3" rectangle containing (obviously) the word "iMovie". This appeared onscreen after running iMovie for t
-
Need help on oracle VM with OEM.
Hi, My customer is using WINDOWS servers and would like to implement OEM on windows machine only and also requires AMP 4.0 which is not certified with windows. Now we are in big trouble. As a part of this we are trying to explore the possible options
-
Problem with a ALC888 Realtek soundcard
Hey all I have a problem with my pc and soundcard. I have a HP Pavilion Media Center TV m7739.sc desktop pc with a ALC 888 sound cad. I have set a Nvidia graphic card in the pc. And now have a pc with a lcd screen and a projektor in. But the sound d
-
Hi! I have created a interactive Form through TCode SFP. I am unable to edit the same , as in I cannot enter data into the text fields. Please help.
-
Disc won't unmount during a reinstall of os....help
I am having the same problem with my imac. I tried to reinstall everything, however at the end of this lengthy process, it fails and now the disc will not come out. I have tried to use the disc utility to eject the disc but it will not allow me to do