Neo4j Export database using dump in windows - shell

I'm new to Neo4j and I found a couple of posts regarding dump but they use something called neo4j-shell that is not present in my installation.
I have a cypher-shell.bat that opens a shell that can be the right one but the problem is that the dump command used in the samples when executed does nothing, and I haven't found also any command to quit the shell.
If you have any clue on how to create a dump of the whole database it will be appreciated.
Thank you in advance.

In general, answers to questions like this can be found by searching the Neo4j documentation (make sure you're reading the version of the manual corresponding to your version of Neo4j). In this case, section 10.3 of the operations manual for version 3.1 of Neo4j explains:
A Neo4j database can be dumped and loaded using the dump and load commands of neo4j-admin
e.g.
neo4j-admin dump --database=<database> --to=<destination-path>
Like the cypher-shell, neo4j-admin is, by default, located in the "bin" folder of your neo4j installation.
FYI: neo4j-shell was depreciated and replaced by cypher-shell.

Related

SQL Developer - No readers registered for SQL type error

I am using Oracle 11g. I had exported data using the installed version of SQL Developer to a sql file called "export.sql". Now, I have downloaded the new version which is 3.1.07 and when I try to import data by clicking on the tree view and choosing Tables | Import Data and navigating to "export.sql", I get the following error:
no readers are registered for the sql type
When I first started the application it asked for the path to java.exe and I have shown that path and application started. I have the started the application from the path where it was downloaded (C:\users\kaushik\Downloads\sqldeveloper)
You can call the file directly from sql developer.
Example: If you saved you file to c:\Oracle\MyBackups\Export.sql
Then from within Sql Developer, connect to your database and use the sql command:
#C:\Oracle\MyBackups\Export.sql
and that will execute the Export.Sql script.
If you have a valid SQL file, you simply need to execute the script. Open the file (File | Open and navigate to export.sql), hit the Run Script button (F5 on Windows), and choose the connection you want to use. The Data Import Wizard supports a number of different file formats (Excel, CSV, etc.). It doesn't support SQL files. If you want to ask the developers why they don't support SQL (or why they use the general file navigation dialog rather than using different dialogs for different sorts of files) you can ask them over in the SQL Developer forum on OTN. I assume the problem is that most SQL scripts contain much more than simple INSERT statements and it would be challenging to figure out whether any particular script was actually just a bunch of INSERT statements that could be used to import data.
Yes, SQL Developer is written in Java so you need to have an appropriate version of the JVM installed. Different SQL Developer download options include a bundled JVM or you can download a smaller file and use an already installed JVM.
One of oracle client tools to make session to database is sqlDeveloper and its graphical interface tool Programmed with Java Lang and its installed independently from oracle_home its a stand alone product and Of Course it needs SDK Or JDK to work
make sure to set the path and check it
read this link http://www.ehow.com/how_5127784_set-java-path.html
all of this if sql developer didn't run and other similar problem
this to answer
Is JDK is needed or what ? Yes
use sql Developer higher version
i am upgraded to Version 20.2.0.175
issue resolved

Using SchemaSpy to visualize a SQLite database (windows)

I am trying to make a sqlite dump with SchemaSpy.
I got SchemaSpy up and running and was able to properly dump a MySQL database.
Now I have an .sqlite file (from an iOS application) and a sqlite driver from Christian Werner (http://www.ch-werner.de/javasqlite/overview-summary.html). An example over here explains how to work with that but to be honest - I don't understand what to do.
Is there someone who knows how I can use SchemaSpy on Windows? It is not necessary for me to use the GUI tool, though.
I also ran into this problem but finally made it work. You need the DLL for the SQLite library.
You can download it here, and then you can put it on system32 folder of your windows installation (C:\Windows\System32 for example)
Lastly, don't forget to specify the exact JDBC driver path:
java -jar… -dp "D:\SchemaSpy\driver\j2sdk1.4.2_03\jre\lib\ext\sqlite.jar" …
I'm the author of one of the articles you mentioned.
You need to compile the schemaspy JDBC driver. It was written for UNIX but someone sent the author notes on building it in a Windows environment. But there is a set of files for windows prebuilt with the sqlite.jar and .dll you need. Once you've got that on the classpath its straightforward.
If this is all too much for you, you can always fire up the sqlite3 CLI and use the .schema command to dump the tables, and set them up in a database you do know how to connect to. Or set up and Ubuntu VM ;)
I realize this is an old question, but for the record it's possible to make SchemaSpy use the Xerial SQLite JDBC driver, without a huge amount of difficulty, by rolling a new .properties file for it, following the instructions on http://schemaspy.sourceforge.net/dbtypes.html
All you really need to do is copy the existing sqlite.properties, renaming it to something like sqlite-xerial.properties and change the relevant lines; for example:
driver=org.sqlite.JDBC
description=SQLite-Xerial
driverPath=sqlite-jdbc-3.7.2.jar
The Xerial driver doesn't need the JNI DLL file and also has the benefit of picking up any configured FK relationships correctly - at least with the SQLite 3 database I've tested it against.
It does throw up some warnings when referencing table or column names that are also keywords, but that may be SchemaSpy's fault for not wrapping them in []. Or schema designers' faults for using keywords as table and column names :)
I do wonder why you need to get the sqlite driver. Just tell SchemaSpy your DB type is sqlite and you shall be okay. Something like
java -jar schemaSpy.jar -t sqlite -db <your file> -o <output>
It's usually best to grab the latest beta version of SchemaSpy. The invocation should be similar to running against MySQL except you specify your database type with -t sqlite and point the "database" to your .sqlite file.
The SQLite drivers use JNI for their implementation, so you'll need to make sure sqlite_jni.dll is in your PATH. To temporarily add it to your PATH in a Windows command prompt:
set PATH=%PATH%;directoryContainingTheJniDll

Can I install postgresql8.2 via command prompt or running any batch or registry file?

Is it possible to install the entire database(postgresql8.2) via command prompt or batch file or registry file bypassing the trivial procedure for installation. But then to a question comes that, how can we supply default parameters such as name,password,language,default location of database? Currently I'm working on 'Windows XP' platform.
Thank you.
For 8.3 and lower the obvious answer is: http://pginstaller.projects.pgfoundry.org/ which supports or supported silent installations. For more recent versions, please read: http://forums.enterprisedb.com/posts/list/2135.page
Use of existing installers would simplify your life and be where I would start.
This being said there is no reason you can't generate a script to register dll's properly run initdb, etc. This will take some extra knowledge of both PostgreSQL and Windows, and will be mostly suitable for custom solutions (i.e. not cases where you merely are packaging software that runs with PostgreSQL). I don't think an complete answer can be given here because once you need such a solution you need to design your installation around if. Books could be written on that topic. The docs http://www.postgresql.org/docs/9.0/static/install-windows.html should get you started however since the only difference really between installing from source and installing from the precompiled source is just that you need to compile the source files first.
Failing that you could take a look at the binary zip packages. Typically these can be extracted and PostgreSQL can be run from inside them.

How come the unix locate command still shows files/folders that aren't there any more?

I recently moved my whole local web development area over to using MacPorts stuff, rather than using MAMP on my Mac. I've been getting into Python/Django and didn't really need MAMP any more.
Thing is, I have uninstalled MAMP from the Applications folder, with the preferences file too, but how come when I run the 'locate MAMP' command in the Terminal it still shows all my /Applications/MAMP/ stuff as if it's all still there? And when I 'cd' into /Applications/MAMP/ it doesn't exist?
Something to do with locate being a kind of index searching system, hence things these old filepaths are cached? Please explain why, and how to sort it so they don't show anymore.
You've got the right idea: locate uses a database called 'locatedb'. It's normally updated by system cron jobs (not sure which on OS X); you can force an update with the updatedb command. See http://linux-sxs.org/utilities/updatedb.html among others.
Also, if you don't find files which you expect to, note this important caveat from the BUGS section of OSX' locate(1) man-page:
The locate database is typically built by user ''nobody'' and the
locate.updatedb(8) utility skips directories which are not readable
for user ''nobody'', group ''nobody'', or world. For example, if your
HOME directory is not world-readable, none of your files are in the database.
The other answers are correct about needing to update the locate database. I've got this alias to update my locate DB:
alias update_locate='sudo /usr/libexec/locate.updatedb'
I actually don't use locate all that much anymore now that I've found mdfind. It uses the spotlight file index which OSX is much better at keeping up to date compared to the locatedb. It also has quite a bit more power in what it can search from the command line.
Indeed the locate command searches through an index, that's why it's pretty fast.
The index is generated by the updatedb command, which is usually run as a nightly
or weekly job.
So to update it manually, just run updatedb.
According to the man page, its database is updated once a week:
NAME
locate.updatedb -- update locate database
SYNOPSIS
/usr/libexec/locate.updatedb
DESCRIPTION
The locate.updatedb utility updates the database used by locate(1). It is typically run once a week by
the /etc/periodic/weekly/310.locate script.
Take a look at the locate man page
http://unixhelp.ed.ac.uk/CGI/man-cgi?locate+1
You'll see that locate searches a database, not your actual filesystem.
You can update that database by using the updatedb command.
Also, since it's a database, unless you do update it regularly, locate wouln't find files that are in your filesystem that arn't in the database.

Is there an easy way to backup Oracle SQL Developer's User Snippets?

I love Oracle SQL Developer so I find myself using it a lot to complete my daily tasks. The thing is that my collection of custom snippets only keeps growing so I though it'd be interesting to learn how to backup them.
Before asking blindly I did a bit of work trying to figure out how. I've performed a search within the application's folder by "snippet" and found the following file:
oracle.sqldeveloper.snippet.jar
which quite probably contains my beloved pieces of code. I could just save that file hoping the best, but why not doing it the right way and perhaps being able to, say, only backup the ones and I've created, avoiding the ones that came out-of-the-box, et cétera?
Any suggestion would be really appreciated!
On my WinXP machine, I found my User Snippets at:
C:\Documents and Settings\eddie\Application Data\SQL Developer\UserSnippets.xml
PS: Replace eddie with your username.
Agreeing with Eddie Awad, just copy the xml file. And for windows7 the sqldeveloper User-Snippets file can be found here:
C:\Users[username]\AppData\Roaming\SQL Developer\UserSnippets.xml
If you use SQL Developer on Mac OS X, then the snippets can be found in ~/Library/Application Support/SQL Developer/UserSnippets.xml
Are you running on Windows? Check your "C:\Documents and Settings\\Application Data\SQL Developer" directory for a UserSnippets.xml file, it contains all user defined snippets.
Also, check the online help for "Location of User-Related Information" topic. It has location of files that hold other user defined info.
-Dave
Why not create a package on the Oracle server for daily maintenance that way it's stored with your DB and in your DB backups?
EDIT: I do this and find it even easier to use them later on when performing routine maintenance tasks. Being able to call a packaged procedure is really, REALLY handy sometimes.
Agreeing with Spyder -
C:\Users\[username]\AppData\Roaming\SQL Developer\UserSnippets.xml
is the place. But I only found this after creating my first new Snippet.
After that, I was able to edit the xml to add new snippets and new categories. Once a change is made to the xml, SQLDev has to be relaunched. (And since it's an xml, I'm going to see if I can save it to Git to share amongst my team when I get a minute...)
For SQL Developer 3.2.20.09 on OS X Mountain Lion (10.8.*), the snippet file is located in ~/.sqldeveloper/UserSnippets.xml.
On OS-X Yosemite (10.10.5) I found the current UserSnippets.xml for the current SQL Developer ( Version 4.1.0.19 ) also in
~/.sqldeveloper/UserSnippets.xml

Resources