tool to view test.h2.db (H2 database) [closed] - sql

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
My java code is using h2 database and generating test.h2.db file.
I searched online but couldn't find any tool to import this DB file and look what are the tables are available in that DB file.
I tried DbVisulizer but couldn't import this DB file.
If any one worked or faced the same problem, please let me know the solution.

As shown here, you can use the Shell command to open the database file. In the example below, the database is named test and the database file name test.h2.db is inferred. As noted here, the url specifies that the database file resides in the user's home directory.
$ java -cp h2.jar org.h2.tools.Shell -url \
"jdbc:h2:file:~/test;ifexists=true" -user "sa" -password ""
At the prompt, type ? for help or enter SQL commands:
sql> show tables;
TABLE_NAME | TABLE_SCHEMA
CUSTOMER | PUBLIC
…
Note that the schema may be empty if you previously neglected the ifexists predicate.

You can use the H2 DB installation.
You need to:
install the H2 DB (for example: h2-setup-2019-10-14.exe),
go to folder where you install the H2 DB (for example: \H2\bin)
run the H2 DB (launch the file: h2.bat)
you should see the Console H2 in the browser (or use the url in browser: http://localhost:8082/
in Console H2 set option:
Genercic H2 (Embedded)
Genercic H2 (Embedded)
Driver: org.h2.Driver
JDBC URL: jdbc:h2:D:/Java/H#_DB/db/repository.mv.db (appropriate path in your disk where is the file )
User:
Password:

Related

scp not allowing file transfer except to home directory [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I need to automate a file transfer using scp and I have created a new ssh key and sent the public key to the remote server where I'll be sending files to (# ~/.ssh).
The problem is that it won't allow me to scp the file anywhere except the home directory. If I transfer it to the home directory, it works fine, but not anywhere else.
Is there something that needs to be done here? Thanks!
If you can scp the file to your home directory, then your key is working. That is unlikely to be an issue.
The kinds of problems you might have would be:
You don't have permission to write to the destination directory
$ scp test.txt myserver:/root
scp /root/test.txt: Permission denied
In this case you need to get permission to write to the directory, or choose a different destination that you do have access to.
The destination directory doesn't exist
$ scp test.txt myserver:foo/bar/
scp foo/bar: No such file or directory
In this case, check that you're uploading to the correct path.
A destination like myserver:foo/bar/ (note: no / after the :) means a relative path to your home directory. So, it might be /home/seumasmac/foo/bar/ in this case.
A destination like myserver:/var/www/ (note: there is a / after the :) is an absolute path. It means the directory /var/www/ on the server.
The error that you get when you try to upload should tell you which of the above is the problem in this case.

Windows Server 2012R2 - Access to folder denied for admin [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I have a folder on Windows Server 2012 that I want to delete. However, even when I try it in PowerShell or cmd.exe as admin, I'm not allowed to delete or view it. I also tried changing permissions with icals as admin, but was also denied.
The error message when I try to delete it looks like this.
rmdir : Access to the path 'C:\Tomcat8.0\webapps\geoserver\data\coverages' is denied.
At line:1 char:1
rmdir .\data
CategoryInfo : PermissionDenied: (C:\Tomcat8.0\webapps\geoserver\data:String) [Remove-Item], UnauthorizedAccessException
FullyQualifiedErrorId : RemoveItemUnauthorizedAccessError,Microsoft.PowerShell.Commands.RemoveItemCommand
I read that this can be caused by a bug in UAC (User Account Control), so I set it to Never notify, but that didn't change it either.
Background (I'm not sure if this caused the problem): The folder was created by deploying geoserver on Tomcat 8 and trying to manually delete it. The entire folder structure was deleted except for this one folder.
Edit: Maybe it's also worth mentioning that it doesn't matter whether Tomcat is running or not.
I figured out how to delete it now. The folder seemed to be locked by the explorer process somehow.
Solution: Open cmd as administrator, then stop the explorer task, delete the folder and start a new instance of explorer.exe.
The below solution:
Open cmd as administrator, then stop the explorer task,
or open the task manger and end task windows explorer
delete the folder and
start a new instance of explorer.exe from task manger (explorer).
This worked for me.

SSH Viewing/editing files across multiple accounts [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Apologies if this has already been asked already, but I tried a quick search and couldn't find my problem.
Basically I am trying to SSH a file onto my friends server from my computer for him to read and modify himself. He has given me my own login and sufficent rights etc, but he is unable to see what I've uploaded to the server, nor can I see what he has added.
I am currently using:
scp hello.txt username#domain.com:/home/username/
which uploads correctly and I can see it.
Could someone please help me out and explain why he is unable to view what he's uploaded, and vice versa?
How can we set it up so we can see each others files and modify them (some sort of public folder?)?
The problem are most likely the access rights on the directory/file. A non-root user might not be able to see the contents of the home directory of another user. If you upload a file to your home directory, your friend can consequently not see the uploaded file and vice versa.
The solution is simple: you need a directory on which both of you have the appropriate permissions, as you already assumed. Try this:
# on the server
mkdir /var/your_share/
chmod o+rwx /var/your_share/
# on your host
scp hello.txt username#domain.com:/var/your_share/
# on the server
ls -l /var/your_share/hello.txt
The ls -l displays the permissions of the uploaded file.
-rw-r--r-- 1 username username 10 Oct 13 15:49 hello.txt
If it says something like this, your friend will not have permissions to change the file but only to read it. Use the following command to grant him write permissions for that file:
# on the server
chmod o+w /var/your_share/hello.txt
ls -l /var/your_share/hello.txt
The output should then be something like:
-rw-r--rw- 1 username username 10 Oct 13 15:49 hello.txt
Note: The permissions granted in these commands are not only for the account of your friend but for all accounts on the server. That means everybody can read and write to the file. If you want to change that, you have to setup a group and only grant rights to the group.

Is there an online LDAP emulator? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 months ago.
Improve this question
I'm doing some homework with LDAP that consists of creating LDIF files, adding them to the LDAP server, and afterwards performing some searches and viewing the results.
To avoid installing LDAP in my computer, I'm wondering if there exists some LDAP emulator online service where I can execute these instructions.
I've seen something similar with "online sql emulator", but not anything about LDAP.
Another alternative is the in-memory directory server provided by the UnboundID LDAP SDK, which I talk about here. There is no need to install a server. LdapListenerExample.java gives an example of how to use the in-memory directory server. The example shows how to create the server, start it listening, load schema files listed as command line options, and load a file containing LDIF into the server database.
Unfortunately, I'm not aware of such a thing.
As an alternative, I'd suggest you use OpenDS, which is very easy to deploy (e.g. via Install with QuickSetup) and to get rid of afterwards. It's import-ldif, make-ldif and export-ldif commands could be useful for your work.
I recently wrote godap - a very minimalistic LDAP server library in Go. It doesn't read LDIFs, but you can easily make it response to bind and search operations. (It also may provide insight into the LDAP protocol.)

Is there any free ldap server with data? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I need to test an application which uses LDAP for authentication, but still I don't have access to the server I have to use, but I need to test my application.
Does somebody know if is there any LDAP server with data that i can use for access??
Here you go: Online LDAP Test Server
It's free, contains data, browsable.
Make sure you use LDAP v3 when trying to bind.
Example of using from command line:
ldapsearch -W -h ldap.forumsys.com -D "uid=tesla,dc=example,dc=com" -b "dc=example,dc=com"
Password: password
Returns:
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
...
# search result
search: 2
result: 0 Success
# numResponses: 16
# numEntries: 15
If you use the UnboundID LDAP SDK, you can stand up an in-memory LDAP server to use for testing. The API to deploy an in-memory server is included in the API. The standard edition is free, and the source code is included. I've included an example in this blog entry.
If you use a unix-like OS, I wrote a simple server in Java, that uses the Apache Directory Studio SDK to serve LDAP:
https://github.com/intelie/dummyldap
ldap://directory.verisign.com is available according to one of Terry's blogs.