Re: [GENERAL] Fwd: getting error while parsing log file using pgbadger
On Wed, Jul 26, 2017 at 11:36 PM, <kbran...@pwhome.com> wrote: > On Wed, Jul 26, 2017 at 3:18 PM, PAWAN SHARMA <er.pawanshr0...@gmail.com> > wrote: > > > > On Wed, Jul 26, 2017 at 2:42 PM, Michael Paquier < > michael.paqu...@gmail.com> wrote: > > On Wed, Jul 26, 2017 at 10:59 AM, PAWAN SHARMA > > <er.pawanshr0...@gmail.com> wrote: > > > > > > Hi All, > > > > > > I am facing below error while parsing log file. > > > > > > [postgres@abc pgaudit]$ pgbadger -f stderr > postgres-2017-07-25_121445.csv > > > Can't locate Text/CSV_XS.pm in @INC (@INC contains: > /usr/local/lib64/perl5 > > > /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl > > > /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at > > > /bin/pgbadger line 2620. > > > ... > > Running make install > > "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- CSV_XS.bs > blib/arch/auto/Text/CSV_XS/CSV_XS.bs 644 > > Manifying 1 pod document > > Files found in blib/arch: installing files in blib/lib into architecture > dependent library tree > > Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/auto/Text/ > CSV_XS/CSV_XS.so > > Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/Text/CSV_ > XS.pm > > Installing /root/perl5/man/man3/Text::CSV_XS.3pm > > Appending installation info to /root/perl5/lib/perl5/x86_64- > linux-thread-multi/perllocal.pod > > HMBRAND/Text-CSV_XS-1.31.tgz > > /bin/make install -- OK > ... > > [postgres@abc pgaudit]$ pgbadger -f stderr > postgres-2017-07-26_00.csv -o abc.html > > Can't locate Text/CSV_XS.pm in @INC (@INC contains: > /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl > /usr/share/perl5/vendor_perl /usr/lib64/ perl5 /usr/share/perl5 .) at > /bin/pgbadger line 2620. > > You have an environment problem in that the 2 different users have a > different > PATH and you're getting 2 different perl executables, or at least that's > what > it looks like to me. Please note that where you installed the module to is > not > listed in the @INC of the other command. > > I saw in another post that you have it fixed, but all you've done (from > what I > can see) is that you've only put a band-aide on the problem not fixed the > root issue > because you've installed the module into 2 different places. The root > problem should > still exist. > > You can run with a custom perl, we do; but that also means you must make > sure > that all apps use it by setting PATH and PERLLIB appropriately, usually by > changing a system file and making sure all environments source it. If you > do that, > then PgBadger will work just fine -and- use the same perl as all of your > other programs. > > HTH, > Kevin > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > Hi Kevin, Thanks for Response. Can you please help me, how can I run this using custom, Perl.
Re: [GENERAL] Fwd: getting error while parsing log file using pgbadger
On Wed, Jul 26, 2017 at 5:38 PM, Michael Paquier <michael.paqu...@gmail.com> wrote: > On Wed, Jul 26, 2017 at 2:01 PM, PAWAN SHARMA <er.pawanshr0...@gmail.com> > wrote: > > For root user its working fine > > > > [root@abc :/opt/PostgreSQL/9.5/data/pgaudit]# > > #-> pgbadger -f stderr postgres-2017-07-26_00.csv -o abc.html > > [==> ] Parsed 1873673 bytes of 1991998 (94.06%), > > queries: 0, events: 845 > > LOG: Ok, generating html report... > > > > but for the Postgres user, its showing the below error. > > There is no way to be sure what's wrong as this depends on the > environment you are using and the packaging system that you have, but > at short glance, I think that you should first try to update PERL5LIB > so as it points to the location where the module has been installed. > Good luck! It does not sound complicated to me to address anyway. > -- > Michael > Hi Michal, Thanks for your support. finally, it's done. I have installed Text::CSV_XS using PostgreSQL user. [postgres@abcpgaudit]$ perl -MCPAN -e shell cpan> install Text::CSV_XS CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Warning: Found only 0 objects in /root/.cpan/Metadata CPAN: LWP::UserAgent loaded ok Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz Going to read /root/.cpan/sources/authors/01mailrc.txt.gz CPAN: Compress::Zlib loaded ok Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/modules/02packages.details.txt.gz Going to read /root/.cpan/sources/modules/02packages.details.txt.gz Database was generated on Thu, 28 Nov 2013 08:17:03 GMT There's a new CPAN.pm version (v2.00) available! [Current version is v1.7602] You might want to try install Bundle::CPAN reload cpan without quitting the current session. It should be a seamless upgrade while we are running... Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/modules/03modlist.data.gz Going to read /root/.cpan/sources/modules/03modlist.data.gz Going to write /root/.cpan/Metadata Running install for module Text::CSV_XS Running make for H/HM/HMBRAND/Text-CSV_XS-1.02.tgz Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.02.tgz CPAN: Digest::MD5 loaded ok Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/authors/id/H/HM/HMBRAND/CHECKSUMS Checksum for /root/.cpan/sources/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.02.tgz ok Scanning cache /root/.cpan/build for sizes Text-CSV_XS-1.02/ Text-CSV_XS-1.02/examples/ Text-CSV_XS-1.02/examples/parser-xs.pl Text-CSV_XS-1.02/examples/speed.pl Text-CSV_XS-1.02/examples/csv2xls Text-CSV_XS-1.02/examples/csvdiff Text-CSV_XS-1.02/examples/csv-check Text-CSV_XS-1.02/ChangeLog Text-CSV_XS-1.02/META.yml Text-CSV_XS-1.02/MANIFEST Text-CSV_XS-1.02/ppport.h Text-CSV_XS-1.02/Makefile.PL Text-CSV_XS-1.02/CSV_XS.xs Text-CSV_XS-1.02/files/ Text-CSV_XS-1.02/files/macosx.csv Text-CSV_XS-1.02/files/utf8.csv Text-CSV_XS-1.02/README Text-CSV_XS-1.02/META.json Text-CSV_XS-1.02/t/ Text-CSV_XS-1.02/t/46_eol_si.t Text-CSV_XS-1.02/t/20_file.t Text-CSV_XS-1.02/t/76_magic.t Text-CSV_XS-1.02/t/81_subclass.t Text-CSV_XS-1.02/t/util.pl Text-CSV_XS-1.02/t/40_misc.t Text-CSV_XS-1.02/t/70_rt.t Text-CSV_XS-1.02/t/22_scalario.t Text-CSV_XS-1.02/t/21_lexicalio.t Text-CSV_XS-1.02/t/77_getall.t Text-CSV_XS-1.02/t/12_acc.t Text-CSV_XS-1.02/t/00_pod.t Text-CSV_XS-1.02/t/60_samples.t Text-CSV_XS-1.02/t/01_pod.t Text-CSV_XS-1.02/t/75_hashref.t Text-CSV_XS-1.02/t/65_allow.t Text-CSV_XS-1.02/t/50_utf8.t Text-CSV_XS-1.02/t/41_null.t Text-CSV_XS-1.02/t/30_types.t Text-CSV_XS-1.02/t/51_utf8.t Text-CSV_XS-1.02/t/10_base.t Text-CSV_XS-1.02/t/55_combi.t Text-CSV_XS-1.02/t/80_diag.t Text-CSV_XS-1.02/t/45_eol.t Text-CSV_XS-1.02/t/15_flags.t Text-CSV_XS-1.02/CSV_XS.pm CPAN.pm: Going to build H/HM/HMBRAND/Text-CSV_XS-1.02.tgz Checking if your kit is complete... Looks good Writing Makefile for Text::CSV_XS cp CSV_XS.pm blib/lib/Text/CSV_XS.pm /usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap CSV_XS.xs > CSV_XS.xsc && mv CSV_XS.xsc CSV_XS.c gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"1.02\" -DXS_VERSION=\"1.02\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE" CSV_XS.c CSV_XS.xs: In function 'cx_Print': CSV_XS.xs:627: warning: unused variable 'l' CSV_XS.xs: In function 'cx_c_xsParse': CSV_XS.xs:1450: warning: unused variable 'sp' CSV_XS.c: In function 'XS_Text__CSV_XS_error_input': CSV_XS.xs:1665: warning: unused variable 'hv' CSV_XS.c: At top level: CSV_XS.xs:1546: warning: 'cx_av_free' defined bu
Re: [GENERAL] Fwd: getting error while parsing log file using pgbadger
On Wed, Jul 26, 2017 at 3:18 PM, PAWAN SHARMA <er.pawanshr0...@gmail.com> wrote: > > On Wed, Jul 26, 2017 at 2:42 PM, Michael Paquier < > michael.paqu...@gmail.com> wrote: > >> On Wed, Jul 26, 2017 at 10:59 AM, PAWAN SHARMA >> <er.pawanshr0...@gmail.com> wrote: >> > >> > Hi All, >> > >> > I am facing below error while parsing log file. >> > >> > [postgres@abc pgaudit]$ pgbadger -f stderr >> postgres-2017-07-25_121445.csv >> > Can't locate Text/CSV_XS.pm in @INC (@INC contains: >> /usr/local/lib64/perl5 >> > /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl >> > /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at >> > /bin/pgbadger line 2620. >> > >> > Please suggest..!! >> >> This means that you need to install the perl module Text::CVS_XS: >> http://search.cpan.org/~hmbrand/Text-CSV_XS-1.31/CSV_XS.pm >> This is defined in the requirements of pgbadger's README when parsing csv >> files: >> https://github.com/dalibo/pgbadger/blob/master/README >> -- >> Michael >> > > > Hi Michal, > > Thanks for the response. > > I have tried to install Text::CSV_XS, but still facing same error. > > > cpan[1]> install Text::CSV_XS > Reading '/root/.cpan/Metadata' > Database was generated on Wed, 26 Jul 2017 09:17:02 GMT > Running install for module 'Text::CSV_XS' > Running make for H/HM/HMBRAND/Text-CSV_XS-1.31.tgz > Fetching with HTTP::Tiny: > http://mirror.liquidtelecom.com/CPAN/authors/id/H/HM/ > HMBRAND/Text-CSV_XS-1.31.tgz > Fetching with HTTP::Tiny: > http://mirror.liquidtelecom.com/CPAN/authors/id/H/HM/HMBRAND/CHECKSUMS > Checksum for /root/.cpan/sources/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.31.tgz > ok > Scanning cache /root/.cpan/build for sizes > > DONE > > CPAN.pm: Building H/HM/HMBRAND/Text-CSV_XS-1.31.tgz > > Checking if your kit is complete... > Looks good > Generating a Unix-style Makefile > Writing Makefile for Text::CSV_XS > Writing MYMETA.yml and MYMETA.json > cp CSV_XS.pm blib/lib/Text/CSV_XS.pm > Running Mkbootstrap for CSV_XS () > chmod 644 "CSV_XS.bs" > "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- CSV_XS.bs > blib/arch/auto/Text/CSV_XS/CSV_XS.bs 644 > "/usr/bin/perl" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp" -typemap > '/usr/share/perl5/ExtUtils/typemap' CSV_XS.xs > CSV_XS.xsc > mv CSV_XS.xsc CSV_XS.c > gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe > -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp ,-D_FORTIFY_SOURCE=2 > -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 > -grecord-gcc-switches -m64 -mtune=generic -DVERSION=\"1.31\" > -DXS_VERSION=\"1.31 \" -fPIC "-I/usr/lib64/perl5/CORE" CSV_XS.c > rm -f blib/arch/auto/Text/CSV_XS/CSV_XS.so > gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches > -m64 -mtune=generic -Wl,- z,relro CSV_XS.o -o > blib/arch/auto/Text/CSV_XS/CSV_XS.so > \ > \ > > chmod 755 blib/arch/auto/Text/CSV_XS/CSV_XS.so > Manifying 1 pod document > HMBRAND/Text-CSV_XS-1.31.tgz > /bin/make -- OK > 'YAML' not installed, will not store persistent state > Running make test > "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- CSV_XS.bs > blib/arch/auto/Text/CSV_XS/CSV_XS.bs 644 > PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" > "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, > 'blib/lib', 'blib/arch')" t/*.t > t/00_pod.t skipped: Test::Pod 1.00 required for testing POD > t/01_pod.t skipped: Test::Pod::Coverage required for testing POD > Coverage > t/10_base.t ... ok > t/12_acc.t ok > t/15_flags.t .. ok > t/20_file.t ... ok > t/21_lexicalio.t .. ok > t/22_scalario.t ... ok > t/30_types.t .. ok > t/40_misc.t ... ok > t/41_null.t ... ok > t/45_eol.t ok > t/46_eol_si.t . ok > t/50_utf8.t ... ok > t/51_utf8.t ... ok > t/55_combi.t .. ok > t/60_samples.t ok > t/65_allow.t .. ok > t/70_rt.t . ok > t/75_hashref.t ok > t/76_magic.t .. ok > t/77_getall.t . ok > t/78_fragment.t ... ok > t/79_callbacks.t .. ok > t/80_diag.t ... ok > t/81_subclass.t ... ok > t/85_util.t ... ok > t/90_csv.t ok > t/
Re: [GENERAL] Fwd: getting error while parsing log file using pgbadger
On Wed, Jul 26, 2017 at 2:42 PM, Michael Paquier <michael.paqu...@gmail.com> wrote: > On Wed, Jul 26, 2017 at 10:59 AM, PAWAN SHARMA > <er.pawanshr0...@gmail.com> wrote: > > > > Hi All, > > > > I am facing below error while parsing log file. > > > > [postgres@abc pgaudit]$ pgbadger -f stderr > postgres-2017-07-25_121445.csv > > Can't locate Text/CSV_XS.pm in @INC (@INC contains: > /usr/local/lib64/perl5 > > /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl > > /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at > > /bin/pgbadger line 2620. > > > > Please suggest..!! > > This means that you need to install the perl module Text::CVS_XS: > http://search.cpan.org/~hmbrand/Text-CSV_XS-1.31/CSV_XS.pm > This is defined in the requirements of pgbadger's README when parsing csv > files: > https://github.com/dalibo/pgbadger/blob/master/README > -- > Michael > Hi Michal, Thanks for the response. I have tried to install Text::CSV_XS, but still facing same error. cpan[1]> install Text::CSV_XS Reading '/root/.cpan/Metadata' Database was generated on Wed, 26 Jul 2017 09:17:02 GMT Running install for module 'Text::CSV_XS' Running make for H/HM/HMBRAND/Text-CSV_XS-1.31.tgz Fetching with HTTP::Tiny: http://mirror.liquidtelecom.com/CPAN/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.31.tgz Fetching with HTTP::Tiny: http://mirror.liquidtelecom.com/CPAN/authors/id/H/HM/HMBRAND/CHECKSUMS Checksum for /root/.cpan/sources/authors/id/H/HM/HMBRAND/Text-CSV_XS-1.31.tgz ok Scanning cache /root/.cpan/build for sizes DONE CPAN.pm: Building H/HM/HMBRAND/Text-CSV_XS-1.31.tgz Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Text::CSV_XS Writing MYMETA.yml and MYMETA.json cp CSV_XS.pm blib/lib/Text/CSV_XS.pm Running Mkbootstrap for CSV_XS () chmod 644 "CSV_XS.bs" "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- CSV_XS.bs blib/arch/auto/Text/CSV_XS/CSV_XS.bs 644 "/usr/bin/perl" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp" -typemap '/usr/share/perl5/ExtUtils/typemap' CSV_XS.xs > CSV_XS.xsc mv CSV_XS.xsc CSV_XS.c gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp ,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DVERSION=\"1.31\" -DXS_VERSION=\"1.31 \" -fPIC "-I/usr/lib64/perl5/CORE" CSV_XS.c rm -f blib/arch/auto/Text/CSV_XS/CSV_XS.so gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,- z,relro CSV_XS.o -o blib/arch/auto/Text/CSV_XS/CSV_XS.so \ \ chmod 755 blib/arch/auto/Text/CSV_XS/CSV_XS.so Manifying 1 pod document HMBRAND/Text-CSV_XS-1.31.tgz /bin/make -- OK 'YAML' not installed, will not store persistent state Running make test "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- CSV_XS.bs blib/arch/auto/Text/CSV_XS/CSV_XS.bs 644 PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00_pod.t skipped: Test::Pod 1.00 required for testing POD t/01_pod.t skipped: Test::Pod::Coverage required for testing POD Coverage t/10_base.t ... ok t/12_acc.t ok t/15_flags.t .. ok t/20_file.t ... ok t/21_lexicalio.t .. ok t/22_scalario.t ... ok t/30_types.t .. ok t/40_misc.t ... ok t/41_null.t ... ok t/45_eol.t ok t/46_eol_si.t . ok t/50_utf8.t ... ok t/51_utf8.t ... ok t/55_combi.t .. ok t/60_samples.t ok t/65_allow.t .. ok t/70_rt.t . ok t/75_hashref.t ok t/76_magic.t .. ok t/77_getall.t . ok t/78_fragment.t ... ok t/79_callbacks.t .. ok t/80_diag.t ... ok t/81_subclass.t ... ok t/85_util.t ... ok t/90_csv.t ok t/91_csv_cb.t . ok All tests successful. Files=29, Tests=50834, 45 wallclock secs ( 4.18 usr 0.16 sys + 43.91 cusr 0.69 csys = 48.94 CPU) Result: PASS HMBRAND/Text-CSV_XS-1.31.tgz /bin/make test -- OK Running make install "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- CSV_XS.bs blib/arch/auto/Text/CSV_XS/CSV_XS.bs 644 Manifying 1 pod document Files found in blib/arch: installing files in blib/lib into architecture dependent library tree Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/auto/Text/CSV_XS/CSV_XS.so Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/Text/CSV_XS.pm Installing /root/perl5/man/man3/Text::CS
[GENERAL] Fwd: getting error while parsing log file using pgbadger
Hi All, I am facing below error while parsing log file. [postgres@abc pgaudit]$ pgbadger -f stderr postgres-2017-07-25_121445.csv Can't locate Text/CSV_XS.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /bin/pgbadger line 2620. Please suggest..!! -Pawan
[GENERAL] getting error while parsing log file using pgbadger
Hi All, I am facing below error while parsing log file. [postgres@abc pgaudit]$ pgbadger -f stderr postgres-2017-07-25_121445.csv Can't locate Text/CSV_XS.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /bin/pgbadger line 2620. Please suggest..!! -Pawan
Re: [GENERAL] monitoring PostgreSQL
On Mon, Jul 24, 2017 at 7:28 PM, Tim Clarke <tim.cla...@manifest.co.uk> wrote: > > > On 24/07/17 14:47, PAWAN SHARMA wrote: > > > > Hi Tim, > > > > Facing below issue > > > > [abc@test:/home/psharm89/nrpe-2.15]# > > Redirecting to /bin/systemctl restart xinetd.service > > Failed to restart xinetd.service: Unit xinetd.service failed to load: > > No such file or directory. > > [abc@test:/home/psharm89/nrpe-2.15]# > > > > [abc@test:/home/psharm89/nrpe-2.15]# > > #-> less /etc/xinetd.d/nrpe > > # default: on > > # description: NRPE (Nagios Remote Plugin Executor) > > service nrpe > > { > > flags = REUSE > > socket_type = stream > > port= 5666 > > wait= no > > user= nagios > > group = nagios > > server = /usr/local/nagios/bin/nrpe > > server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd > > log_on_failure += USERID > > disable = no > > only_from = 127.0.0.1 > > } > > > > > > > > xinetd is broken? restore the config from backup. > > Tim > > #-> /etc/init.d/nagios restart Restarting nagios (via systemctl): Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
Re: [GENERAL] monitoring PostgreSQL
On Mon, Jul 24, 2017 at 5:50 PM, PAWAN SHARMA <er.pawanshr0...@gmail.com> wrote: > > On Mon, Jul 24, 2017 at 5:20 PM, Tim Clarke <tim.cla...@manifest.co.uk> > wrote: > >> We use nagios for all alerting, it'll do what you need. >> >> Tim Clarke >> >> >> On 24/07/17 12:38, Achilleas Mantzios wrote: >> > pgbadger is a very nice reporting tool, overall, albeit not exactly at >> > the system side, but more to the DBA side. >> > For system level monitoring maybe take a look here : >> > https://wiki.postgresql.org/wiki/Monitoring#check_postgres . >> > Also you might want to write a script that parses logs for FATAL and >> > PANIC and sends out emails. >> > >> > On 24/07/2017 14:27, PAWAN SHARMA wrote: >> >> Hi All, >> >> >> >> >> >> Please provide me a list of tools which we can use for monitoring >> >> PostgreSQL. >> >> >> >> -Monitor all the services and health of server >> >> -Able to send critical and warning alert on mail. >> >> >> >> OS: Redhat-7 >> >> PostgreSQL Version: 9.5.7 >> >> >> >> >> >> -Pawan >> > >> > >> > -- >> > Achilleas Mantzios >> > IT DEV Lead >> > IT DEPT >> > Dynacom Tankers Mgmt >> >> >> > Hi Tim, > > Thanks for update, > > Please share the steps, how to configure Nagios?? > Hi Tim, Facing below issue [abc@test:/home/psharm89/nrpe-2.15]# Redirecting to /bin/systemctl restart xinetd.service Failed to restart xinetd.service: Unit xinetd.service failed to load: No such file or directory. [abc@test:/home/psharm89/nrpe-2.15]# [abc@test:/home/psharm89/nrpe-2.15]# #-> less /etc/xinetd.d/nrpe # default: on # description: NRPE (Nagios Remote Plugin Executor) service nrpe { flags = REUSE socket_type = stream port= 5666 wait= no user= nagios group = nagios server = /usr/local/nagios/bin/nrpe server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd log_on_failure += USERID disable = no only_from = 127.0.0.1 }
Re: [GENERAL] monitoring PostgreSQL
On Mon, Jul 24, 2017 at 5:20 PM, Tim Clarke <tim.cla...@manifest.co.uk> wrote: > We use nagios for all alerting, it'll do what you need. > > Tim Clarke > > > On 24/07/17 12:38, Achilleas Mantzios wrote: > > pgbadger is a very nice reporting tool, overall, albeit not exactly at > > the system side, but more to the DBA side. > > For system level monitoring maybe take a look here : > > https://wiki.postgresql.org/wiki/Monitoring#check_postgres . > > Also you might want to write a script that parses logs for FATAL and > > PANIC and sends out emails. > > > > On 24/07/2017 14:27, PAWAN SHARMA wrote: > >> Hi All, > >> > >> > >> Please provide me a list of tools which we can use for monitoring > >> PostgreSQL. > >> > >> -Monitor all the services and health of server > >> -Able to send critical and warning alert on mail. > >> > >> OS: Redhat-7 > >> PostgreSQL Version: 9.5.7 > >> > >> > >> -Pawan > > > > > > -- > > Achilleas Mantzios > > IT DEV Lead > > IT DEPT > > Dynacom Tankers Mgmt > > > Hi Tim, Thanks for update, Please share the steps, how to configure Nagios??
[GENERAL] monitoring PostgreSQL
Hi All, Please provide me a list of tools which we can use for monitoring PostgreSQL. -Monitor all the services and health of server -Able to send critical and warning alert on mail. OS: Redhat-7 PostgreSQL Version: 9.5.7 -Pawan
Re: [SPAM] [GENERAL] How to install pgadmin3 or pgadmin4 on linux machine
On Wed, Jul 5, 2017 at 6:29 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 07/05/2017 05:25 AM, PAWAN SHARMA wrote: > >> >> > >> Hi Moreno, >> >> >> Thanks for response. >> >> 1. We don't have yum working on servers >> 2. We are using rpm to install postgres. >> >> >> We downloading postgresql standard rpm from EDB site. >> > > That is not what you said in your first post: > > > " > https://yum.postgresql.org/repopackages.php#pg95 > > I have download pgdg-redhat95-9.5-3.noarch.rpm from the above link and > install successfully on my server. > > " > > > -- > Adrian Klaver > adrian.kla...@aklaver.com > Hi All, Thanks now it's working. I have installed below rpms. pgdg-redhat95-9.5-3.noarch postgresql95-libs-9.5.7-1PGDG.rhel7.x86_64.rpm postgresql95-9.5.7-1PGDG.rhel7.x86_64.rpm
Re: [SPAM] [GENERAL] How to install pgadmin3 or pgadmin4 on linux machine
On Jul 5, 2017 17:40, "Moreno Andreo" <moreno.and...@evolu-s.it> wrote: Il 05/07/2017 13:35, PAWAN SHARMA ha scritto: Hi All, Please help me to install pgadmin3 or pgadmin4 on Redhat server. https://yum.postgresql.org/repopackages.php#pg95 I have download pgdg-redhat95-9.5-3.noarch.rpm from the above link and install successfully on my server. what next how to configure it? Using PostgreSQL Version : 9.5.7 -Pawan Google is always your friend, the fourth result searching "install pgadmin3 on redhat server" returned https://www.1337admin.org/linux/installing-pgadmin-on-rhel-7/ Cheers Moreno Hi Moreno, Thanks for response. 1. We don't have yum working on servers 2. We are using rpm to install postgres. We downloading postgresql standard rpm from EDB site.
[GENERAL] How to install pgadmin3 or pgadmin4 on linux machine
Hi All, Please help me to install pgadmin3 or pgadmin4 on Redhat server. https://yum.postgresql.org/repopackages.php#pg95 I have download pgdg-redhat95-9.5-3.noarch.rpm from the above link and install successfully on my server. what next how to configure it? Using PostgreSQL Version : 9.5.7 -Pawan
Re: [GENERAL] PostgreSQL Cookbook Testing
On Fri, Jun 23, 2017 at 6:10 PM, Karsten Hilbert <karsten.hilb...@gmx.net> wrote: > On Fri, Jun 23, 2017 at 05:57:44PM +0530, PAWAN SHARMA wrote: > > > Please help to configure kitchen.yml to test the PostgreSQL cookbook > > testing. > > > > #-> kitchen converge > > -> Starting Kitchen (v1.16.0) > > >>>>>> --Exception--- > > >>>>>> Class: Kitchen::UserError > > >>>>>> Message: Error parsing /tmp/postgresql-master/.kitchen.yml as > YAML. > > Please run `kitchen diagnose --no-instances --loader' to help debug your > > issue. > > >>>>>> -- > > >>>>>> Please see .kitchen/logs/kitchen.log for more details > > >>>>>> Also try running `kitchen diagnose --all` for configuration > > So ? The output gives you THREE hints already. Care to do as the suggest > ? > > > Karsten > -- > GPG key ID E4071346 @ eu.pool.sks-keyservers.net > E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general nothing, it will show me the configuration of kitchen.yml
[GENERAL] PostgreSQL Cookbook Testing
Hi All, Please help to configure kitchen.yml to test the PostgreSQL cookbook testing. #-> kitchen converge -> Starting Kitchen (v1.16.0) >> --Exception--- >> Class: Kitchen::UserError >> Message: Error parsing /tmp/postgresql-master/.kitchen.yml as YAML. Please run `kitchen diagnose --no-instances --loader' to help debug your issue. >> -- >> Please see .kitchen/logs/kitchen.log for more details >> Also try running `kitchen diagnose --all` for configuration -Server type: VMware OS: Redhat 6 or Redhat 7 PostgreSQL Version: 9.5.7 -Pawan
[GENERAL] Cookbook for doing installation and configuration of PostgreSQL on Redhat
Hi All, I am new to chef concept, can anyone provide me a cookbook for doing installation and configuration of PostgreSQL on Redhat. I have checked so many cookbooks in the supermarket. -Pawan
Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool.
On Sat, Jun 3, 2017 at 1:48 AM, Igor Neymanwrote: > > I wonder, does plpgsql compilation check for existence of the > add_job_history function or is that a runtime check? > > > > At runtime. > > Hi Neyman, Thanks it's done by adding PERFORM. DROP TRIGGER IF EXISTS update_job_history ON employees CASCADE; CREATE OR REPLACE FUNCTION trigger_fct_update_job_history() RETURNS trigger AS $BODY$ BEGIN PERFORM add_job_history(OLD.employee_id, OLD.hire_date, LOCALTIMESTAMP, OLD.job_id, OLD.department_id); RETURN NEW; END $BODY$ LANGUAGE 'plpgsql';
Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool.
On Fri, Jun 2, 2017 at 2:13 PM, Pavel Stehule <pavel.steh...@gmail.com> wrote: > Hi > > 2017-06-02 10:16 GMT+02:00 PAWAN SHARMA <er.pawanshr0...@gmail.com>: > >> Hi All, >> >> I am migrating Oracle database into PostgreSQL using Ora2PG tool. >> >> So, I am facing one issue with trigger after generating script output of >> Oracle database. >> >> *Oracle : * >> >> CREATE OR REPLACE TRIGGER UPDATE_JOB_HISTORY >> AFTER UPDATE OF JOB_ID, DEPARTMENT_ID ON EMPLOYEES >> FOR EACH ROW >> BEGIN >> add_job_history(:old.employee_id, :old.hire_date, sysdate, >> :old.job_id, :old.department_id); >> END; >> / >> >> *The script generated by Ora2PG tool.* >> >> DROP TRIGGER IF EXISTS update_job_history ON employees CASCADE; >> CREATE OR REPLACE FUNCTION trigger_fct_update_job_history() RETURNS >> trigger AS $BODY$ >> BEGIN >> add_job_history(OLD.employee_id, OLD.hire_date, LOCALTIMESTAMP, >> OLD.job_id, OLD.department_id); >> RETURN NEW; >> END >> $BODY$ >> LANGUAGE 'plpgsql'; >> >> CREATE TRIGGER update_job_history >> AFTER UPDATE ON employees FOR EACH ROW >> EXECUTE PROCEDURE trigger_fct_update_job_history(); >> >> >> when I try to run the above-generated script it will show below error. >> >> ERROR: syntax error at or near "add_job_history" >> LINE 4: add_job_history(OLD.employee_id, OLD.hire_date, LOCALTIMES... >> ^ >> NOTICE: relation "employees" does not exist, skipping >> >> > maybe you have too old version of ora2pg. Master ora2pg is able to emulate > procedure call by SELECT command. > > Regards > > Pavel > > >> >> >> Please Suggest or help to resolve it. >> >> -Pawan >> >> >> >> >> > > Hi Pavel, Thanks for the response, I am using. c:\ora2pg>ora2pg -c ora2pg.conf -v Ora2Pg v18.1
Re: [GENERAL] Oracle database into PostgreSQL using Ora2PG tool.
On Fri, Jun 2, 2017 at 2:20 PM, Andrew Sullivan <a...@crankycanuck.ca> wrote: > (Offlist: phone) > > It's saying the table isn't there. Is it? Is it maybe spelled > "EMPLOYEES" (all caps) instead? You need double quotes if so. > > A > > -- > Andrew Sullivan > Please excuse my clumbsy thums. > > On Jun 2, 2017, at 04:16, PAWAN SHARMA <er.pawanshr0...@gmail.com> wrote: > > Hi All, > > I am migrating Oracle database into PostgreSQL using Ora2PG tool. > > So, I am facing one issue with trigger after generating script output of > Oracle database. > > *Oracle : * > > CREATE OR REPLACE TRIGGER UPDATE_JOB_HISTORY > AFTER UPDATE OF JOB_ID, DEPARTMENT_ID ON EMPLOYEES > FOR EACH ROW > BEGIN > add_job_history(:old.employee_id, :old.hire_date, sysdate, > :old.job_id, :old.department_id); > END; > / > > *The script generated by Ora2PG tool.* > > DROP TRIGGER IF EXISTS update_job_history ON employees CASCADE; > CREATE OR REPLACE FUNCTION trigger_fct_update_job_history() RETURNS > trigger AS $BODY$ > BEGIN > add_job_history(OLD.employee_id, OLD.hire_date, LOCALTIMESTAMP, > OLD.job_id, OLD.department_id); > RETURN NEW; > END > $BODY$ > LANGUAGE 'plpgsql'; > > CREATE TRIGGER update_job_history > AFTER UPDATE ON employees FOR EACH ROW > EXECUTE PROCEDURE trigger_fct_update_job_history(); > > > when I try to run the above-generated script it will show below error. > > ERROR: syntax error at or near "add_job_history" > LINE 4: add_job_history(OLD.employee_id, OLD.hire_date, LOCALTIMES... > ^ > NOTICE: relation "employees" does not exist, skipping > > > > Please Suggest or help to resolve it. > > -Pawan > > > > > > Hi Andrew, employees table is exited. *Oracle Database* CREATE TABLE EMPLOYEES ( EMPLOYEE_ID NUMBER (6) NOT NULL , FIRST_NAME VARCHAR2 (20 BYTE) , LAST_NAME VARCHAR2 (25 BYTE) NOT NULL , EMAIL VARCHAR2 (25 BYTE) NOT NULL , PHONE_NUMBER VARCHAR2 (20 BYTE) , HIRE_DATE DATE NOT NULL , JOB_ID VARCHAR2 (10 BYTE) NOT NULL , SALARY NUMBER (8,2) , COMMISSION_PCT NUMBER (2,2) , MANAGER_ID NUMBER (6) , DEPARTMENT_ID NUMBER (4) ) LOGGING ; The script generated by the tool. CREATE TABLE employees ( employee_id integer NOT NULL, first_name varchar(20), last_name varchar(25) NOT NULL, email varchar(25) NOT NULL, phone_number varchar(20), hire_date timestamp NOT NULL, job_id varchar(10) NOT NULL, salary decimal(8,2), commission_pct decimal(2,2), manager_id integer, department_id smallint ) ;
[GENERAL] Oracle database into PostgreSQL using Ora2PG tool.
Hi All, I am migrating Oracle database into PostgreSQL using Ora2PG tool. So, I am facing one issue with trigger after generating script output of Oracle database. *Oracle : * CREATE OR REPLACE TRIGGER UPDATE_JOB_HISTORY AFTER UPDATE OF JOB_ID, DEPARTMENT_ID ON EMPLOYEES FOR EACH ROW BEGIN add_job_history(:old.employee_id, :old.hire_date, sysdate, :old.job_id, :old.department_id); END; / *The script generated by Ora2PG tool.* DROP TRIGGER IF EXISTS update_job_history ON employees CASCADE; CREATE OR REPLACE FUNCTION trigger_fct_update_job_history() RETURNS trigger AS $BODY$ BEGIN add_job_history(OLD.employee_id, OLD.hire_date, LOCALTIMESTAMP, OLD.job_id, OLD.department_id); RETURN NEW; END $BODY$ LANGUAGE 'plpgsql'; CREATE TRIGGER update_job_history AFTER UPDATE ON employees FOR EACH ROW EXECUTE PROCEDURE trigger_fct_update_job_history(); when I try to run the above-generated script it will show below error. ERROR: syntax error at or near "add_job_history" LINE 4: add_job_history(OLD.employee_id, OLD.hire_date, LOCALTIMES... ^ NOTICE: relation "employees" does not exist, skipping Please Suggest or help to resolve it. -Pawan
[GENERAL] Ora2Pg-Database migration report
Hi All, What is the formula to calculate estimated cost in Ora2Pg-Database migration report? -Pawan
Re: [GENERAL] Oracle to PostgreSQL Migration.
On Mon, May 29, 2017 at 7:17 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 05/29/2017 06:40 AM, PAWAN SHARMA wrote: > >> >> > ya, but how can fix it.?? >> >> because memory is not an issue on both the server. >> >> >> Hi Chris, >> >> I am able to get the output script in output.sql but now data migration >> is the big problem. >> > > http://ora2pg.darold.net/documentation.html#postgresql_import > > -- > Adrian Klaver > adrian.kla...@aklaver.com > Thanks all, now it's working After DATA_LIMIT15000 in ora2pg.conf. test migration is successful. C:\ora2pg>ora2pg -c ora2pg.conf [>] 2/2 tables (100.0%) end of scanning. [>] 0/2 tables (0.0%) end of scanning. [>] 2/2 tables (100.0%) end of table export. -- Generated by Ora2Pg, the Oracle database Schema converter, version 18.1 -- Copyright 2000-2017 Gilles DAROLD. All rights reserved. -- DATASOURCE: dbi:Oracle:host=;sid=;port=1521 SET client_encoding TO 'UTF8'; \set ON_ERROR_STOP ON CREATE TABLE mytab ( id bigint, name varchar(30), dt timestamp ) ; CREATE TABLE test ( id bigint, name varchar(30) ) ; [>] 1/1 rows (100.0%) Table MYTAB (0 recs/sec) [>] 1/2 total rows (50.0%) - (4 sec., avg: 0 recs/sec). [>] 1/1 rows (100.0%) Table TEST (0 recs/sec) [>] 2/2 total rows (100.0%) - (261 sec., avg: 0 recs/sec). [>] 2/2 rows (100.0%) on total estimated data (262 sec., avg: 0 recs/sec) C:\ora2pg>
Re: [GENERAL] Oracle to PostgreSQL Migration.
On Mon, May 29, 2017 at 6:54 PM, PAWAN SHARMA <er.pawanshr0...@gmail.com> wrote: > > > On Mon, May 29, 2017 at 6:51 PM, Chris Mair <ch...@1006.org> wrote: > >> [>] 1/1 rows (100.0%) Table MYTAB (0 recs/sec) >>> [>] 1/2 total rows (50.0%) - (4 sec., avg: 0 >>> recs/sec). >>> Out of memory!] 1/2 rows (50.0%) on total estimated data (4 >>> sec., avg: 0 recs/sec) >>> Issuing rollback() due to DESTROY without explicit disconnect() of >>> DBD::Oracle::db handle (DESCRIPTION=(ADDRESS=(PO >>> RT=1521)(PROTOCOL=tcp)(HOST=))(CONNECT_DATA=(SID=))) >>> at C:/Strawberry/perl/vendor/ >>> lib/DBD/Oracle.pm line 348. >>> >>> >>> So, It will show data enter in mytab 100% but in test it is 50%. but >>> when I checked on PostgreSQL server their data only in one table. >>> >> >> Did you notice the "Out of memory!" you got there? >> >> I guess that's the problem now... >> >> Bye, >> Chris. >> >> >> >> >> >> ya, but how can fix it.?? > > because memory is not an issue on both the server. > > Hi Chris, I am able to get the output script in output.sql but now data migration is the big problem.
Re: [GENERAL] Oracle to PostgreSQL Migration.
On Mon, May 29, 2017 at 6:51 PM, Chris Mairwrote: > [>] 1/1 rows (100.0%) Table MYTAB (0 recs/sec) >> [>] 1/2 total rows (50.0%) - (4 sec., avg: 0 >> recs/sec). >> Out of memory!] 1/2 rows (50.0%) on total estimated data (4 >> sec., avg: 0 recs/sec) >> Issuing rollback() due to DESTROY without explicit disconnect() of >> DBD::Oracle::db handle (DESCRIPTION=(ADDRESS=(PO >> RT=1521)(PROTOCOL=tcp)(HOST=))(CONNECT_DATA=(SID=))) >> at C:/Strawberry/perl/vendor/ >> lib/DBD/Oracle.pm line 348. >> >> >> So, It will show data enter in mytab 100% but in test it is 50%. but when >> I checked on PostgreSQL server their data only in one table. >> > > Did you notice the "Out of memory!" you got there? > > I guess that's the problem now... > > Bye, > Chris. > > > > > > ya, but how can fix it.?? because memory is not an issue on both the server.
Re: [GENERAL] Oracle to PostgreSQL Migration.
On Mon, May 29, 2017 at 6:28 PM, Chris Mairwrote: > C:\ora2pg>ora2pg -c ora2pg.conf >> [>] 2/2 tables (100.0%) end of scanning. >> [>] 0/2 tables (0.0%) end of scanning. >> [>] 2/2 tables (100.0%) end of table export. >> > > Looks good so far. > This means you could connect to Oracle DB now. > > > DBD::Pg::st execute failed: ERROR: relation "mytab" does not exist >> > > This is coming from the Postgres side. > > In ora2pg.conf go to the section > > OUTPUT SECTION (Control output to file or PostgreSQL database) > > I suggest you comment out (prefix with #) the part > > #PG_DSN dbi:Pg:dbname=test_db;host=localhost;port=5432 > #PG_USERtest > #PG_PWD test > > and just have ora2pg write its ouput to a file by setting OUTPUT like this: > > OUTPUT output.sql > > This way you have your oputput for Postgres in a file that you can check > out > and try importing step by step. I guess you are running this on some test > data, so the file will be small enough to open it with an editor. > You cap paste piece by piece into a Postgres prompt (psql or pgadmin or > whatever > you're using). > > You can then see at what point you get an error (and hopefully understand > what's happening). > > Bye, > Chris. > > > Hi Chris, Thanks for suggestion.!!! here in ora2pg.conf, I have used below type in ora2pg.conf and create the table manually on PostgreSQL server. *TYPETABLE* *output after this* - C:\ora2pg>ora2pg -c ora2pg.conf Ora2Pg version: 18.1 Trying to connect to database: dbi:Oracle:host=;sid=;port=1521 Isolation level: SET TRANSACTION ISOLATION LEVEL READ COMMITTED Retrieving table information... [1] Scanning table MYTAB (1 rows)... [2] Scanning table TEST (1 rows)... Dumping table TEST... Dumping table MYTAB... -- Generated by Ora2Pg, the Oracle database Schema converter, version 18.1 -- Copyright 2000-2017 Gilles DAROLD. All rights reserved. -- DATASOURCE: dbi:Oracle:host=;sid=;port=1521 SET client_encoding TO 'UTF8'; \set ON_ERROR_STOP ON CREATE TABLE test ( id bigint, name varchar(30) ) ; CREATE TABLE mytab ( id bigint, name varchar(30), dt timestamp ) ; but, when i am trying to insert data using TYPE TABLE, INSERT C:\ora2pg>ora2pg -c ora2pg.conf [>] 2/2 tables (100.0%) end of scanning. [>] 0/2 tables (0.0%) end of scanning. [>] 2/2 tables (100.0%) end of table export. -- Generated by Ora2Pg, the Oracle database Schema converter, version 18.1 -- Copyright 2000-2017 Gilles DAROLD. All rights reserved. -- DATASOURCE: dbi:Oracle:host=;sid=;port=1521 SET client_encoding TO 'UTF8'; \set ON_ERROR_STOP ON CREATE TABLE mytab ( id bigint, name varchar(30), dt timestamp ) ; CREATE TABLE test ( id bigint, name varchar(30) ) ; [>] 1/1 rows (100.0%) Table MYTAB (0 recs/sec) [>] 1/2 total rows (50.0%) - (4 sec., avg: 0 recs/sec). Out of memory!] 1/2 rows (50.0%) on total estimated data (4 sec., avg: 0 recs/sec) Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Oracle::db handle (DESCRIPTION=(ADDRESS=(PO RT=1521)(PROTOCOL=tcp)(HOST=))(CONNECT_DATA=(SID=))) at C:/Strawberry/perl/vendor/ lib/DBD/Oracle.pm line 348. So, It will show data enter in mytab 100% but in test it is 50%. but when I checked on PostgreSQL server their data only in one table. test=# select * from mytab ; id | name | dt +--+- 1 | aa | 2017-05-29 06:05:46 (1 row) test=# select * from test; id | name +-- (0 rows) So, I am stuck here..!!! Please suggest.
Re: [GENERAL] Oracle to PostgreSQL Migration.
On Mon, May 29, 2017 at 2:49 PM, Chris Mairwrote: > I am facing below issue while running below command. >> >> *C:\ora2pg>ora2pg -c ora2pg.conf* >> DBI connect('host=;sid=;port=',',...) >> failed: ORA-01017: invalid username/p >> assword; logon denied (DBD ERROR: OCISessionBegin) at >> C:/Strawberry/perl/site/lib/Ora2Pg.pm line 1376. >> FATAL: 1017 ... ORA-01017: invalid username/password; logon denied (DBD >> ERROR: OCISessionBegin) >> Aborting export... >> >> even I am able to login in Oracle with same and >> > > If you can login from the same host using sqlplus like this: > > sqlplus myuser/mypass@myhost:1521/mysid > > then you likely can have ora2pg connect too. Just make sure that in > ora2pg.conf you put the lines: > > ORACLE_DSN dbi:Oracle:host=myhost;sid=mysid > ORACLE_USER myuser > ORACLE_PWD mypass > > Bye, > Chris. > > > Hi Chris, C:\ora2pg>ora2pg -c ora2pg.conf [>] 2/2 tables (100.0%) end of scanning. [>] 0/2 tables (0.0%) end of scanning. [>] 2/2 tables (100.0%) end of table export. -- Generated by Ora2Pg, the Oracle database Schema converter, version 18.1 -- Copyright 2000-2017 Gilles DAROLD. All rights reserved. -- DATASOURCE: dbi:Oracle:host=;sid=;port=1521 SET client_encoding TO 'UTF8'; \set ON_ERROR_STOP ON CREATE TABLE test ( id bigint, name varchar(30) ) ; CREATE TABLE mytab ( id bigint, name varchar(30), dt timestamp ) ; DBD::Pg::st execute failed: ERROR: relation "mytab" does not exist LINE 1: INSERT INTO mytab (id,name,dt) VALUES ($1,$2,$3) ^ at C:/Strawberry/perl/site/lib/Ora2Pg.pm line 11574. FATAL: ERROR: relation "mytab" does not exist LINE 1: INSERT INTO mytab (id,name,dt) VALUES ($1,$2,$3) ^ Aborting export... C:\ora2pg>
[GENERAL] Oracle to PostgreSQL Migration.
Hi All, I am going to migrate Oracle database into PostgreSQL using ora2pg tools. I have installed Strawberry Perl. C:\ora2pg>perl -v This is perl 5, version 24, subversion 1 (v5.24.1) built for MSWin32-x64-multi-thread Copyright 1987-2017, Larry Wall I am facing below issue while running below command. *C:\ora2pg>ora2pg -c ora2pg.conf* DBI connect('host=;sid=;port=',',...) failed: ORA-01017: invalid username/p assword; logon denied (DBD ERROR: OCISessionBegin) at C:/Strawberry/perl/site/lib/Ora2Pg.pm line 1376. FATAL: 1017 ... ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin) Aborting export... even I am able to login in Oracle with same and *entry in sqlnet.ora* SQLNET.AUTHENTICATION_SERVICES = (NONE) NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8 SQLNET.ALLOWED_LOGON_VERSION_SERVER=8 Please suggest.!! -Pawan
[GENERAL] Migration Query
Hi All, Does one any having list of bottlenecks and workarounds while migrating data from Oracle to Postgresql. like what are thing which we can migrate from Oracle database to Postgresql and what we can't? Which is the best tool for migration from Oracle to Postgresql? -Pawan
[GENERAL] Vaccum Query
Hi All, Any Idea what happens when we run standard vacuum (without full) on a table which has exclusive lock (or alter statement is being processed on that table). What happens in this case ? Will vacuum wait for the alter to commit ? If so, how long ? If not, then what ? And what actions can be taken to prevent this ? *Thanks & Regards,Pawan Sharma* *+91-9899396940* *Skpye ID: pawanshr.0963* *Thinkā¦ before you print(Save Environment)*
[GENERAL] Fwd: LDAP configuration
Hi All, I want to use pgsync method for LDAP configuration in current environment. So please help me and share the document or link for configuration. -Pawan
[GENERAL] LDAP configuration
Hi All, I want to use pgsync method for LDAP configuration in current environment. So please help me and share the document or link for configuration. -Pawan
Re: [GENERAL] create trigger in postgres to check the password strength
On Fri, Feb 3, 2017 at 9:11 PM, Adam Brusselbackwrote: > Whoops, accidentally sent this to only Pawan instead of the list: >> >> > Hey there, so I would highly suggest you avoid arbitrary password strength > policies like that. I wrote a library for my company which we use for > password strength estimation, but it is written in Java. I've been > thinking about how to port it to pl/pgsql so it could easily be packaged as > an extension and used natively in Postgres, but I just haven't had time to > get around to that yet. Here it is for reference: https://github.com/ > GoSimpleLLC/nbvcxz > > If you're actually interested in having an extension which works like the > above, and want to work on porting it, i'd be more than happy to jump in > and help out where I can. I just don't have the free cycles to do it my > self at the moment. > > Now on to your original question...Why wouldn't it be possible to create a > trigger on your users table to check the password being inserted, raise an > error if it does not meet your requirement, or hash it if it does and > continue the insert? Seems pretty straight forward other than the > complexity of actually estimating how secure a password is. > Thanks Adam, but here the requirement to enforce password polices while creating to the users. create user abc with password 'Password'; where it will test that the password entered should be according to the company standard, while creation of users. So please suggest.
Re: [GENERAL] create trigger in postgres to check the password strength
On Fri, Feb 3, 2017 at 8:44 PM, PAWAN SHARMA <er.pawanshr0...@gmail.com> wrote: > Hi All, > > Is this possible to create trigger in postgres to check the password > strength( like char should be min 8 character) while to creating user or > role with password. > > If it possible can you please share the script with me.. > > -Pawan > > > Trigger or function which check the password strength is useful for me
[GENERAL] create trigger in postgres to check the password strength
Hi All, Is this possible to create trigger in postgres to check the password strength( like char should be min 8 character) while to creating user or role with password. If it possible can you please share the script with me.. -Pawan
Re: [SPAM] [GENERAL] AD(Active Directory) groups concepts in postgres
On Fri, Feb 3, 2017 at 12:47 AM, John R Pierce <pie...@hogranch.com> wrote: > On 2/2/2017 11:09 AM, PAWAN SHARMA wrote: > > > 1: Create User > 2:Create group > 3:Alter Group Add/Remove User's.. > > > create user user1; > create user user2; > create group group1; > grant group1 to user1, user2; > > > in fact in postgres, both users and groups are roles, the only distinction > is in how they are used. CREATE USER is exactly the same as CREATE > ROLE WITH LOGIN; > > > -- > john r pierce, recycling bits in santa cruz > > Hi John For testing i have created 1:create user user1; 2:create user user2; 3:create group dba_group; 4:grant dba_group to user1; 5:ALTER group dba_group CREATEDB CREATEROLE; but still user1 don't have createdb and createrole privilege, even he is assigned to dba_group which having both the privileges..? .
Re: [SPAM] [GENERAL] AD(Active Directory) groups concepts in postgres
On Fri, Feb 3, 2017 at 12:08 AM, John R Piercewrote: > On 2/2/2017 8:24 AM, Moreno Andreo wrote: > > > Can we use AD(Active Directory) groups concepts in postgres as we are > using this concepts in SQL server. > > So, is there any possible to work with AD groups such as (IT-DBA, > IT-APPS..etc ) in postgresql. > > > Like this? > https://wiki.postgresql.org/wiki/LDAP_Authentication_against_AD > > > that handles authentication, but AFAIK, postgresql has no concept of > Active Directory groups, only group roles defined within the postgres > server. even if you're using AD for authentication, you still have to > create roles in postgresql, and put these roles in groups. > > -- > john r pierce, recycling bits in santa cruz > > Thanks John, So, We need to follow below steps in such case: 1: Create User 2:Create group 3:Alter Group Add/Remove User's..
[GENERAL] AD(Active Directory) groups concepts in postgres
Hi All, Can we use AD(Active Directory) groups concepts in postgres as we are using this concepts in SQL server. So, is there any possible to work with AD groups such as (IT-DBA, IT-APPS..etc ) in postgresql. -Pawan
[GENERAL] Doubts regarding postgres Security
Hi All, I have few question regarding Postgres security. 1. How can we set user account block feature after max number of invalid password entries? 2. How can we use SSL encryption in Postgres on Linux environment? 3. How can we transparent data encryption in Postgres? Thanks
[GENERAL] factor effecting performance of postgres
Hello All, I am new to postgres using OS: linux 7.2 and postgres : postgresql-9.5.4-2. what are the factor's affecting postgres performance? and to overcome them. Please suggest..! *-Pawan*
[GENERAL] Moving from 9.5 to 9.6
Hi All, I am using postgres 9.5 enterprise and if I want to move or upgrade it 9.6 enterprise version then what are steps required and is it done by any patching or we have to completely upgrade from. 9.5 to 9.6 -Pawan
[GENERAL] migrate Sql Server database to PostgreSql
Hello All, I am using postgres 9.5 enterprise edition. i want to to how to migrate Sql Server database to PostgreSql. what are the things required for migration and what are the cron and prons of migration. -Pawan
Re: [GENERAL] Restore single databaseR
Thanks for reply, but I have 120 databases running on a one single instance. So it's not possible to take backup of instance instead of taking pg_dumb of all databases separately. Example: suppose we have two instances running on single server, instance A having 120 databases and instance B having 50 databases and I want to move all databases running on instance A to another server having same postgres version and server configuration. So,please suggest how i can move instance A to another server. On 18 Jan 2017 7:10 p.m., "Vick Khera" <vi...@khera.org> wrote: > On Wed, Jan 18, 2017 at 7:32 AM, PAWAN SHARMA <er.pawanshr0...@gmail.com> > wrote: > >> Hello All, >> >> I am using postgres 9.5 enterprise edition and postgres 9.5 open source >> where i want know solution of two problems. >> >> 1.How can we restore single database from base backup files only, I >> don't have pg_dump backup. >> > > Restore the whole thing into a temporary instance of postgres and then > pg_dump the database you want. > > >> 2.How can we restore single instance on different server where multiple >> instances are running on the production server. >> >> Once you have the dump from pg_dump, you can restore it wherever you > like. Chances are higher for success if the version numbers match or the > destination is newer than the source. > >
[GENERAL] Restore single databaseR
Hello All, I am using postgres 9.5 enterprise edition and postgres 9.5 open source where i want know solution of two problems. 1.How can we restore single database from base backup files only, I don't have pg_dump backup. 2.How can we restore single instance on different server where multiple instances are running on the production server. -Pawan