dump

Dumping CLOB fields into files?

帅比萌擦擦* 提交于 2019-12-05 00:59:25
问题 Say you have the table: Column_name | data_type Title | Varchar2 Text | CLOB with some rows: SomeUnkownMovie | A long time ago in a galaxy far, far away....(long text ahead) FredMercuryBio | Awesomeness and stuff....(more long text) Is there a way I could query that so it outputs files like SomeUnkownMovie.txt FredMercuryBio.txt (and ofc, with their respective texts inside) I reckon this should be a easy enough sqlplus script.. though I'm just not the one :( thanks! 回答1: This pl/sql code

How to prevent YAML to dump long line without new line

北城余情 提交于 2019-12-04 16:28:02
问题 Whenever my option goes beyond certain limit, pyyaml converts it into two lines. How to avoid this ? e.g. In [1]: x = "-c /home/user/test/test2/test23/tet/2s/test1/stest/longdirectory1/directory2/ --optnion12 --verbose" In [2]: import yaml In [3]: print yaml.dump([dict(ATTRIBUTES=[dict(CONFIG=x)])], default_flow_style=False) WRONG ONE - ATTRIBUTES: - CONFIG: -c /home/user/test/test2/test23/tet/2s/test1/stest/longdirectory1/directory2/ --optnion12 --verbose Which should be like - ATTRIBUTES: -

pg_dump: too many command line arguments

拜拜、爱过 提交于 2019-12-04 15:39:07
问题 what is wrong with this command: pg_dump -U postgres -W admin --disable-triggers -a -t employees -f D:\ddd.txt postgres This is giving error of too many command-line arguments 回答1: Looks like its the -W option. There is no value to go with that option. -W, --password force password prompt (should happen automatically) If you want to run the command without typing is a password, use a .pgpass file. http://www.postgresql.org/docs/9.1/static/libpq-pgpass.html 回答2: For posterity, note that pg

Can I selectively create a backup of Postgres database, with only certian tables?

*爱你&永不变心* 提交于 2019-12-04 14:59:06
Can I programatically(or whichever way works fine) create the backup of a database, with only the tables I want? I have around 100 tables in my database and I want only 10 tables backup(ofcourse all are interdependant). How can I achieve this? And by the way I have a postgresql database. Of course. pg_dump lets you pass list of tables with parameter -t To clear some doubts. True, the -t parameter accepts only one pattern. But it's a pattern very similar to regular expression, so if you want to dump tables A, B & C you can do: pg_dump -t '(A|B|C)' 来源: https://stackoverflow.com/questions/602730

How To Export/Import Large Database On MAMP

别等时光非礼了梦想. 提交于 2019-12-04 14:27:07
问题 How do I export/import large database on MAMP ? Using PHPMyAdmin does not work as it supposed to be. 回答1: It should be done via terminal as below. In the terminal navigate to bin folder of MAMP using below command cd /Applications/MAMP/library/bin Use this command to export the file ./mysqldump -u [USERNAME] -p [DATA_BASENAME] > [PATH_TO_FILE] . EG would be ./mysqldump -u root -p my_database_name > /Applications/MAMP/htdocs/folder_name/exported_db.sql Line should appear saying Enter password:

backup mysql tables with php

女生的网名这么多〃 提交于 2019-12-04 12:32:43
I would like to backup tables (with PHP) from a db if the table prefix is matching with a sub string. What I was trying and is not working error_reporting(1); $dbname = 'wp_dev'; if (!mysql_connect('127.0.0.1', 'root', '')) { echo 'Connection Error'; exit; } $sql = "SHOW TABLES FROM $dbname LIKE 'wp_%'"; $result = mysql_query($sql); if (!$result) { echo "DB tables could not be listed\n"; echo 'MySQL Fehler: ' . mysql_error(); exit; } while ($row = mysql_fetch_row($result)) { echo "<pre>Table: {$row[0]}\n</pre>"; system( 'mysqldump $dbname $row[0] > verlag_$row[0].sql'); } mysql_free_result(

Dump memory in lldb

强颜欢笑 提交于 2019-12-04 11:41:13
问题 As stated on this site. When I want to dump memory in gdb. The start point is 0x1000 and end 0x2000 . For lldb start is 0x1000 and end 0x1200 . Is there a reason for this or is just a mistake ? Main question is: How do I dump a memory area from 0x1000 to 0x2000 in lldb? 回答1: The following works fine for me: (lldb) memory read --outfile /tmp/mem.txt 0x6080000fe680 0x6080000fe680+1000 Dumps 1000 bytes of memory, from the given start address, in hex format, to /tmp/mem.txt. Use --binary for

Searching for (freeware) database migration tool [closed]

我的梦境 提交于 2019-12-04 11:03:56
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm searching for a tool to dump a database including DDL and content as plain SQL-Sсript, so that it can be archived in a plain text format. I know e.g. the Oracle dump tools or MySQL dump, but is there a tool which can connect to different data sources and get the job done? GUI would be great. Check out http://squirrel-sql.sourceforge.net/ . Gui, cross-platform and supports any database with jdbc

Migrating some objects from one database to another

夙愿已清 提交于 2019-12-04 09:43:13
问题 How can I dump one user with all his associations (comments, posts etc) from one database (development, sqlite) to insert it another (production, mysql). Should I dump it into yaml or to sql or something else? 回答1: Ok. God Save the YAML I've used YAML dumping into file from development and loading this in my production. There was hack with id, that have changed, due it is auto_increament. development user = User.find X posts = user.posts comments = user.comments ... File.open("user.yml", "w")

In windbg, what can cause the message “WARNING: Unable to verify timestamp for mydll.dll”?

六眼飞鱼酱① 提交于 2019-12-04 05:55:46
I have a dump (created by SysInternal's procdump ) and when I ask to view the call stack of a thread I get the error: "WARNING: Unable to verify timestamp for mydll.dll" I own the source code for mydll.dll and I have the PDB file for it, the call stack seems valid but I would like to know what can be the cause of the message. In the past I did not get that warning message. Thank you. The reason might be that you don’t have the the binary for your mydll.dll available. Try to either put it in the same location as the .pdb or use the File -> Image path to point at the location. NB both the .pdb