SQL Developer How to export store procedures into separate files? - oracle

I am using Oracle SQL Developer 3.2 and I have about 100 stored procedures/functions that I'd like to export them into separate individual files. Here's what I'd like to achieve:
Each file name should be the same as the stored procedure/function name.
The file content is just the content of the stored procedure/function, as if I open the stored procedure, copy and paste into a text file and save.
Any one knows how to do it? Thanks.

As a1ex07 stated in his comment. You can achieve that. Go Tools -> Database Export -> Select the file where you want to create stored procedure/function and select the connection name -> Types to Export -> Specify Object -> Specify Data -> Finish

Related

PL/SQL delete static workspace file

I've been searching on google and still not found anything.
Is there any possible way to delete a file from the Static Workspace Files within the database?
For example you can remove a file from the Static Application Files with this procedure wwv_flow_api.remove_app_static_file
Regards
Looking at the source code for app 4000 page 315 (the page used to delete a static workspace file through the APEX Builder), it doesn't seem to be using any sort of API to remove the file. It just seems to be performing a DELETE on WWV_FLOW_COMPANY_STATIC_FILES. You should be able to perform the DELETE yourself if you prepend your APEX schema to the beginning of the table like this:
DELETE FROM APEX_190200.WWV_FLOW_COMPANY_STATIC_FILES
WHERE id IN (SELECT workspace_file_id
FROM apex_workspace_static_files
WHERE workspace = 'MY WORKSPACE' AND file_name = 'temp.txt');

how can import "export user object" in pl/sql?

Step 1:
I went to the tools menu in origin oracle pl sql then choose export user object and select that file i need to convert to destination database like view and functions and packages etc...
Step 2 :
after that i went to destination database and open new command window and paste that file create in step1.
after that i get this error for many objects:
ora00900 : invalid sql statement
how can i import that file created with pl/sql export user object?
If you are using Oracle SQL Developer and trying to export DDL and Data, make sure that selected format is "insert". Other formats are not applicable to run as SQL statement.
If your goal is full export consider using Oracle DataPump: https://docs.oracle.com/en/database/oracle/oracle-database/19/sutil/oracle-data-pump-overview.html

Database Project; Add object to schema

I'm creating a database project is VS2013. I am manually building up the database as and when the objects are required (it's basically a gradual copy from an existing database). I have done imports to a database project from an actual database and I'm trying to follow the same project structure (i.e. [Schema Name Folder] > [Tables Folder] > [Actual Table Script File]).
The issue I am having is that when I add a new table, regardless of where in the project tree, it will use the default dbo schema and the only way I can change the schema of a given object is to change the T-SQL of the table's script file which is a slow and error-prone solution. This is even worse if you include the 'Include schema name in file name' option in the database properties as you would have to rename each object you create.
I must be missing something here, is there a way to create an object in a specific schema?

Microsoft office cannot find the input table or query

I am trying to migrate an access database from 2000 to 20007 version. I have two .mdb files one used as a front end and the other containing only the back end tables. I performed all the necessary initialization for the migration like export of table, extension with .accd, etc.. But when i execute the following code , i get an error " Microsoft office cannot find the input table or query . Check spelling and so".
set Db=currentDb
SQLText ='some sql query'
Db.OpenRecordset(SQLText, dbOpenDynaset)
When i tried to output the value of Db with a msgbox (MSgbox Db), it shows the message "ABC, type mismatch", where ABC is the function name. But, Msgbox Db.name showing the correct database name. But, the same code has been running fine on the older version.
Please help me on this
Okay, you do not have to "migrate" to a different version persay. You only have to import everything from an MDB to ACCDB file. That is all. Scratch whatever you have done, start afresh.
Create a new "empty" accdb file, then using the options under
External Data-> Import/Link From Access. Select the Front End Access
file. Use the Option IMPORT Forms, Report etc., select all Forms, Reports, Queries, Mods then click OK. This
will import all objects.
Create a new "empty" accdb file, then using the options under
External Data-> Import/Link From Access. Select the Back End Access file. Use the Option IMPORT Forms, Report etc., select all tables and click OK. This will import all the tables over to the new file.
Now open up your new "front end" (the one with accdb extension). Under External Data -> Import/Link. Select the new "back end" (the one with the accdb extension). Use the Link to the Data Source option. Then select all tables and click OK.
Now perform a Compact & Repair, follow it with a Compile of the VBA code.
The whole strategy will fail if you have a backend DB in a different platform like SQL or Oracle.

Can I export a report design layout from Access?

I'm converting an application from access to c#. I have a adp file for the access application. I've only been able to export the report as a .cls file, which does nothing for me. Is there a way to export the report design view so that I don't have to redo it from scratch??
Thanks!
Are you able to use the SaveAsText method to export your report e.g:
saveastext(acReport,"ReportName","FileName.txt")
And then re-import the report using the LoadFromText method e.g:
loadfromtext(acReport,"ReportName","FileName.txt")
This approach allows to export elements from MS Access to a text file containing all the file attributes etc and then allows you to load it back in keeping all it's settings/configurations

Resources