dump

PostgreSQL: database restore from dump - syntax error

不问归期 提交于 2019-12-03 02:20:41
问题 I'm trying to restore a PostgreSQL database by executing the SQL that pg_dump created, on an empty database. I'm getting this error: ERROR: syntax error at or near "\" LINE 5211: \. lines 5210 and 5211 read: COPY auth_group (id, name) FROM stdin; \. It works fine on my Linux server, where I use this command: psql -U dbname < dumpfile.sql but on Windows, I'm not sure how to do the same, so I've been trying to run the dumpfile's sql from pgAdminIII query utility. What the recommended way of

mysql, dump, database restore

女生的网名这么多〃 提交于 2019-12-03 01:31:00
I have dumped my database with the following command: mysqldump -uuser -ppassword db_name > file then I completely removed my database: drop database db_name; then I created a new database: create database db_name; and then I tried to restore the db with the following command: mysqldump -uuser -ppassword db_name < file The problem is that dump does not create tables and loads data in them and so the database remains empty however it does show a message like dump completed "date time" What could be the reason for this? mysqldump is for dumping the database. You've created a new empty database,

Difference between javacore, thread dump and heap dump in Websphere

左心房为你撑大大i 提交于 2019-12-03 00:51:56
问题 Can someone tell me the exact difference between javacore, thread dump and heap dump? Under which situation each of these are used?? 回答1: A thread dump is a dump of the stacks of all live threads. Thus useful for analysing what an app is up to at some point in time, and if done at intervals handy in diagnosing some kinds of 'execution' problems (e.g. thread deadlock). A heap dump is a dump of the state of the Java heap memory. Thus useful for analysing what use of memory an app is making at

Best (easiest) way to make a SQL Server dump and import that dump in another SQL Server

不羁的心 提交于 2019-12-03 00:01:17
I would like to achieve a database export (dump) in SQL Server from one server and import that dump in another SQL Server and not necessarily in the same schema name. For example if I have a database prepared with all the data set for implement a new DB for a new customer, that db is for example named DB_EMPTY And then I have to setup the same DB on some external server for a customer for example in the schema DB_MY_CUSTOMER What is the best/simplest way to export (dump) a DB_EMPTY, and import it in DB_MY_CUSTOMER? Possibly with SQL Server Management Studio? An easy way would be to use SQL

Dumping whole array: console.log and console.dir output “… NUM more items]”

浪尽此生 提交于 2019-12-02 21:44:02
I am trying to log a long array so I can copy it quickly in my terminal. However, if I try and log the array it looks like: ['item', 'item', >>more items<<< ... 399 more items ] How can I log the entire array so I can copy it really quickly? Michael Hellein Setting maxArrayLength There are a few methods all of which require setting maxArrayLength which otherwise defaults to 100. Provide the override as an option to console.log or console.dir console.log( myArry, {'maxArrayLength': null} ); Set util.inspect.defaultOptions.maxArrayLength = null; which will impact all calls to console.log and

How to dump part of binary file

佐手、 提交于 2019-12-02 19:39:19
I have binary and want to extract part of it, starting from know byte string (i.e. FF D8 FF D0) and ending with known byte string (AF FF D9) In the past I've used dd to cut part of binary file from beginning/ending but this command doesn't seem to support what I ask. What tool on terminal can do this? In a single pipe: xxd -c1 -p file | awk -v b="ffd8ffd0" -v e="aaffd9" ' found == 1 { print $0 str = str $0 if (str == e) {found = 0; exit} if (length(str) == length(e)) str = substr(str, 3)} found == 0 { str = str $0 if (str == b) {found = 1; print str; str = ""} if (length(str) == length(b)) str

C# and mysqldump

南楼画角 提交于 2019-12-02 19:08:20
问题 I'm writing an application which should make a complete copy of one database and then import it on the same server with different name. So, I guess I should use mysqldump and mysql and the parameters that I should pass to them. Okay, but I can't get the dump put the file where I want, because I have to know the location and then pass it to mysql. StringBuilder exportPath = new StringBuilder(); //exportPath.Append(Directory.GetCurrentDirectory()); exportPath.Append(@" > C:\Temp\backup.sql");

JavaCC dump method to print AST

倾然丶 夕夏残阳落幕 提交于 2019-12-02 18:52:28
问题 I am using JavaCC to print an AST in a particular format. I need it to be like this : LetNode( Identier(X), ExprNode( PlusNode( IntegerLiteral(8), IntegerLiteral(2) ))) but I am getting: Start(LetNode(Identifier(x)(ExprNode(IntegerLiteral(5)(PlusNode(IntegerLiteral(5)())) I am using the dump method to print this: public void dump(String prefix) { System.out.print(toString(prefix)); System.out.print("("); if (children != null) { for (int i = 0; i < children.length; ++i) { SimpleNode n =

dump conf from running nginx process

旧巷老猫 提交于 2019-12-02 18:46:08
Is it possible to get which conf the nginx is using only from a running nginx process? To get the conf file path. sometimes ps aux reveal it, sometimes it doesn't. It might be just something like nginx: master process /usr/sbin/nginx (same as /proc/PID/cmdline ) So is nginx -V the only solution? From this question , is it possible to dump conf data structure from nginx process directly? Or at least dump the conf file path? Gordon As of Nginx 1.9.2 you can dump the Nginx config with the -T flag: -T — same as -t , but additionally dump configuration files to standard output (1.9.2). Source: http

How to get the relative address of a field in a structure dump. [C]

戏子无情 提交于 2019-12-02 18:34:32
We're working on a C program compiled with arm-eabi-gcc under Linux. We're using a dump of a large structure and we're having problems determining at which adress we should read various fields of our structure (like 50 of them), (memory alignement and padding aren't so predictable to me). Is there any way to get the memory mapping of the structure produced by a our compiler. An option in gdb? Or any tool helping us find the correspondance between fields and adress in the dump? You can do it with gdb . As an example, I'll use this source: struct A { int a; char b; short c; }; int main() {