dump

How to restore PostgreSQL dump file into Postgres databases?

给你一囗甜甜゛ 提交于 2019-11-26 22:36:16
问题 I have a dump file with a .SQL extension (in fact it is a plain-text SQL file). I want to restore it into my created databases. I am using pgAdmin III, and when I use its "Restore Wizard" it does not highlight the button "Restore". Instead it is expecting a .backup file extension. I tried using shell the commands for restoring the dump, but it still didn't work. I am a newbie at this. If anybody could help me I would be obliged. Edit I used following command to the Shell SQL Pane of PostGres

Dumping a java object's properties

我怕爱的太早我们不能终老 提交于 2019-11-26 21:24:55
Is there a library that will recursively dump/print an objects properties? I'm looking for something similar to the console.dir() function in Firebug. I'm aware of the commons-lang ReflectionToStringBuilder but it does not recurse into an object. I.e., if I run the following: public class ToString { public static void main(String [] args) { System.out.println(ReflectionToStringBuilder.toString(new Outer(), ToStringStyle.MULTI_LINE_STYLE)); } private static class Outer { private int intValue = 5; private Inner innerValue = new Inner(); } private static class Inner { private String stringValue =

Why I can not find “Debug Managed Memory” on Actions menu?

。_饼干妹妹 提交于 2019-11-26 20:51:19
问题 Why I can not find "Debug Managed Memory" on Action menu as described at this MSDN article: Analyze .NET Framework memory issues? My Visual Studio: How it is supposed to look: 回答1: In one of the related articles, two requirements are mentioned (emphasis added): Before I begin, there are a few things to note about the "Debug Managed Memory" feature discussed in this post: The option will only be available from the dump summary page in the Ultimate version of Visual Studio 2013 . If you are

kill -3 to get java thread dump

♀尐吖头ヾ 提交于 2019-11-26 19:27:26
I am using kill -3 command to see the JVM's thread dump in unix. But where can I find the output of this kill command? I am lost!! You could alternatively use jstack (Included with JDK) to take a thread dump and write the output wherever you want. Is that not available in a unix environment? jstack PID > outfile The thread dump is written to the system out of the VM on which you executed the kill -3. If you are redirecting the console output of the JVM to a file, the thread dump will be in that file. If the JVM is running in an open console, then the thread dump will be displayed in its

psql invalid command \N while restore sql

北战南征 提交于 2019-11-26 19:26:10
问题 I'm trying to restore my dump file, but it caused an error: psql:psit.sql:27485: invalid command \N Is there a solution? I searched, but I didn't get a clear answer. 回答1: Postgres uses "\N" as substitute symbol for NULL value. But all psql commands starts by backslash "\" symbol. So you can get this messages, when probably copy statement fails, but a loading of dump continues. This message is only false alarm. You have to search a lines before for reason why COPY statement fails. Is possible

meteor: how can I backup my mongo database

折月煮酒 提交于 2019-11-26 18:50:06
问题 How can I make a backup of my meteor mongo database? If I run: meteor mongo the mongodump command does not work inside the meteor mongoshell 回答1: First you need to spin up meteor. Then if you run meteor mongo you will get an output something like this: MongoDB shell version: 2.2.1 connecting to: 127.0.0.1:3001/meteor Meteor db host is at 127.0.0.1 with a port of 3001. Exit the mongo shell and use mongodump from your terminal. mongodump -h 127.0.0.1 --port 3001 -d meteor Dumps will be located

error opening HPROF file: IOException: Unknown HPROF Version

喜欢而已 提交于 2019-11-26 18:47:58
问题 I am getting the following exception when trying to open HPROF file (created by Debug.dumpHprofData ) with Memory Analyzer: java.io.IOException: Unknown HPROF Version (JAVA PROFILE 1.0.3) at org.eclipse.mat.hprof.AbstractParser.readVersion(AbstractParser.java:124) at org.eclipse.mat.hprof.Pass1Parser.read(Pass1Parser.java:69) at org.eclipse.mat.hprof.HprofIndexBuilder.fill(HprofIndexBuilder.java:65) at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.parse(SnapshotFactoryImpl.java:203) at

List of tables, db schema, dump etc using the Python sqlite3 API

限于喜欢 提交于 2019-11-26 18:26:25
For some reason I can't find a way to get the equivalents of sqlite's interactive shell commands: .tables .dump using the Python sqlite3 API. Is there anything like that? You can fetch the list of tables and schemata by querying the SQLITE_MASTER table: sqlite> .tab job snmptarget t1 t2 t3 sqlite> select name from sqlite_master where type = 'table'; job t1 t2 snmptarget t3 sqlite> .schema job CREATE TABLE job ( id INTEGER PRIMARY KEY, data VARCHAR ); sqlite> select sql from sqlite_master where type = 'table' and name = 'job'; CREATE TABLE job ( id INTEGER PRIMARY KEY, data VARCHAR ) Davoud

How in H2DB get sql dump like in MySql?

拈花ヽ惹草 提交于 2019-11-26 17:59:58
问题 I have some questions about H2DB. I have H2DB database which stores data in files, I have 3 files test.18.log.db, test.data.db, test.index.db. I want get sql dump file like when I use mysqldump. Is it possible? 回答1: Yes, there are multiple solutions. One is to run the SCRIPT SQL statement: SCRIPT TO 'fileName' Another is to use the Script tool: java org.h2.tools.Script -url <url> -user <user> -password <password> Then, there are also the RUNSCRIPT statement and RunScript tool. By the way, you

Save “screen” (program) output to a file

*爱你&永不变心* 提交于 2019-11-26 15:09:01
问题 I need to save the whole output of screen to a file to check later all the content. The reason is that I'm dumping a flash memory trough serial port, using screen to interface with it. I would like to save it to a file to check memory structure. I've tried : $: screen /dev/ttyUSB0 115200 >> foo.txt $: screen /dev/ttyUSB0 115200 | tee foo.txt and I've also tried to use bufferfile from screen, but I don't understand how to use it. Is there an easy way? 回答1: There is a command line option for