Exporting a Database using Oracle SQL Developer - database

I've done a database using Oracle SQL Developer for a University exam. Now, I've to send it to my Professor by email.
It's possible to export the database completely as one directory, containing all files I've created, in order to allow my Professor to import it into SQL Developer and test it?
I've tried using "Tools">"Database Export" but I've obtained only a lot of separate files.

Wrong, I'm afraid. You've (tried to) export just one schema, not entire database.
Anyway: if you got bunch of files, then it is because you instructed the tool to do so. Next time choose single file:

Related

How can I export my Oracle database as a file?

I am dealing with a Java web project for my course. I have been told to add my database file too while sending my homework. However, I have no idea about database file since I am using a database in a project for the first time. I am using Oracle 11g database for storing and manipulating necessary data.
I have written several JSP scripts. I access to the Oracle database while running these files with the line
connection=DriverManager.getConnection("jdbc:oracle:thin:#localhost:1521:xe","selubamih","123456");
But I am not sure how can I send this database to my teacher because I am using it through the connection with my password. How can I export the database to send it as a file along with my JSP codes? I searched files for keeping databases, it seems like .csv and .db are most commonly used extensions. Should I export my database as one of these files? If so, how can I export my database? I will appreciate any of your help.

Can I automatically export data from a Cognos report into a database?

The overall goal is to have data from an automated daily Cognos report stored in a database so that I am able to report not only on that day but also historical data if I so choose. My general thought is that if I can find a way to automatically add the new daily data to an existing Excel file, I can then use that as my data source and create a dashboard in Tableau. However, I don't have any programming experience, so I'm floundering here.
I'm committed to using Tableau, but I chose Excel only because I'm more familiar with that program than others, along with the fact that an Excel output file is an option in Cognos. If you have better ideas, please don't hesitate to suggest them along with why you believe it's a better idea.
Update: I'm still jumping through hoops to try to get read-only access to the backend database to make this process a lot more efficient, but in the meantime I've moved forward with the long method utilizing Cognos.
I was able to leverage a coworker to create a system file folder to automatically save the Cognos reports to, and then I scheduled a job to run the reports I need. Each of those now saves into a folder in a shared network drive (so my entire team has access to the files), and I wrote a series of macros to append the data each day from those feeder files in the shared drive to a Master File. Now all that's left is to create a Tableau dashboard using the Master File as the data source and I'll have what I need.
Thanks for all your help!
I'm posting this an an answer because, it's just too much to leave as a comment.
What you need are 3 things.
Figure out how to have COGNOS run your report and download your Excel file.
Use Visual Studio with BIDS (which is the suite of SQL analysis, reporting, and integration services) to automate all the stuff you need to do to append your Excel files, etc... Then you can use the same tools to import that data to your SQL server.
In fact, if all you're doing is trying to get this data into SQL, you can skip the Append Excel part, and just append the data directly to your SQL table.
Once your package is built, you can save it as an automated job on your SQL server to run whenever you wish.
Tableau can use your SQL server as a data source. Once you have that updated, you can run your reports.

how do i determine oracle database name of data source

I've been searching around and haven't found anything on my scenario that I understand:
I have a list of all of the Oracle databases and corresponding servers that my company owns (about 80 servers 150 databases). I am trying to figure out which one a specific file is being downloaded from (from a webpage).
I am mechanical engineer, not in software so if you could eli5 that would be very helpful.
Specifically I need the SID name, but figuring out the server name
would also be helpful.
Your question is kind of tricky here. if your downloading the file from web application(I assuming it is a Java webapp), oracle database could act as either the data store or a report server that can generate the oracle reports directly
In the first case, you need to find out if what kind of file you are downloading?
is it a PDF? is it a excel file? or just text file or anything? the best idea is to check out the file link and then decide what software generating this file. it could be any software in back end to generate the file like, POI(for generating excel file), or even a direct file link, but not oracle at all.
Also, In this case, the file is usually generated at backend by server-let. You need ask the developer which report or file generating engine they are employing. and if oracle database is also being used, it is usually providing the data fro that report or file engine.
In the second case, you can just check out the the URL and give it to the webmaster asking them which oracle server it is using. it is usually configured in the web server.

XML : save data from sql server to file

I'd like to save data from a SQL Server database table to a file, then load it into another database that has the same table already created in it
How can I do this? I know there should be some simple way of doing it, but stackoverflowsearch and google aren't yielding good answers (or I'm not asking a good question).
SQL Server Import and Export Wizard
It's located under the SQL Server startup menu folder.
As far as I know there is no simple way to do this in SQL only.
Probably best way to handle this is to create your own simple application in whatever programming language that will query first database, write the file where it needs to be written and also import data into another database.

Database under source control again!

We use MS SQL Server and C#. Our database is under sourse control and I will tell you some details of our implementation. We had implemented two operations:
Export database to plain-text files. Database schema files:
tables.sql
relationships.sql
views.sql
...
and table contents files:
Data/table1.txt
Data/table2.txt
...
It is easy to review database changes using source control logs because all these files has plain-text format.
Imlementation is based on classes from namespace Microsoft.SqlServer.Management.Smo.
Import database from this plain-text files. Implementation is strightforward - just execute sql statements from *.sql files, and then execute a bunch of inserts.
So we have two bat-files: create-test-databse.bat and export-test-database.bat. When a developer needs a new test database he just executes the bat-file and waits for a minute.
Every functional test, which needs a database creates a new database, uses it, and then kills it. But I should say that it is not very fast operation. :(
So what instruments do YOU use to put your database under source control?
I mean how do you implement operations "create test database" and "export test database" for example?
I think you are asking two questions here. The first is how to get your database under source control. Your solution is interesting, and I've also used Visual Studio Team Edition for Database Professionals (here's a tutorial I wrote on TDD of stored procedures using it)
The second is how to you set up your database for integration tests. Setting up and tearing down the entire database seems like it might be a bit overkill. There are several solutions out there. I've used DBFit. Roy Osherove published a tool called XtUnit a while back that I haven't played with. And, of course, you could always setup your tests to do a transaction start in the SetUp, and a Rollback during teardown.
We use Visual Studio for Database Professionals. Don't leave home without it.
I use VSTS for DB Pros. You point it at your SQL server and it analyzes your database and creates the individual files for you. You can even have it generate test data for you. The next release will include support for third party providers (think Oracle, MySQL, DB2).
The really great feature in here is the validation. We found that parts of our database were totally broken (they were vestigial, not used by the code anymore). It basically makes it possible to deploy your database on demand.

Resources