Access Table Schemas or Execute a command via a Datagrip plugin - intellij-plugin

Is it possible to invoke the "execute" command for a selected text via a DataGrip plugin?
And if not (or regardless actually), is it possible to access the table definitions of the current schema?

"execute" command for a selected text via a DataGrip plugin
Selected text is executed on Cmd+Enter automatically. If no text is selected, DataGrip suggests you options what to execute (whole file, this statement, etc)
access the table definitions of the current schema
Cmd+F1 will show table's structure in the console:

Related

Set define off permanent

When running queries in SQL Developer and using the character & in my literals, a popup appears asking me to provide a variable. I then execute SET DEFINE OFF; and I can run my query for the rest of the session.
Is there any way to configure Oracle so it can never ask for manual variables when containing the & character?
Create a text file on your PC which contains set define off and any other set-up instructions you might want.
Then in SQL developer, go to the Tools menu and pick the Preferences... option. In the panel on the left click on Database.
Then either type the path to the file you created, or click Browse and navigate to the file in the 'Select connection startup script' dialog that appears.
That script will then be run every time you connect to any database.
Put SET DEFINE OFF into
login.sql (so that it works for you only, i.e. use user profile file), or
glogin.sql (so that its affect is global, i.e. use site profile file)

How to make functions and procedures visible in intellij database source

I have configured my oracle database in intellij and I already can see the tables, views ...etc (find attached screenshot).
I miss two things procedures and functions . How to make them visible?
UPDATE:
here how it looks like in sql developer:
Have you checked the routines node? It should be there. Note that you can navigate to a table/function via Navigate | Symbol action - just make sure that the filter in Navigate popup includes SQl files:

How to run code from sql file directly from toad oracle

i have a *.sql file on my desktop. How can i create a job in toad for oracle so that it can directly pick up the file and run it everyday at a specific time.
thank you
What version of Toad? If it's a somewhat newer one, check out the Automation Designer. It's available from the Utilities menu.
Create a new app on the left side, give it a meaningful name
On the DB Misc tab double click the Execute Script action to add it to your app.
Double click the new execute script action and add your file to it. Set other options within as desired.
Click Apply and exit the script action properties dialog.
Right click on your script action and choose Schedule. Work through the Windows Task Scheduler prompts and it will be setup for you.
well different version of the TOAD have different options
the best way i would suggest you is - on the button "Execute as script"
Execute as script --> Execute via SQL plus
then the SQL-plus window will pop up and it will auto connect to your DB.
Gather all your sql queries / script in the file and run below command
#C:\Users\Desktop\script.sql
this will start executing the script from file directly and will give the log in the SQL plus window.

Toad: 10.6: Seek clear instructions on automating reoccuring excel reports

I am new to Toad 10.6.1 and have a question about running a SQL script and email data as an excel file on a scheduled basis.
How do I run script and save as excel format and email as excel file to automatically? Thank you for your time.
Below is what I've done so far but dont think its correct as I get "ORA-00911: invalid character" on step #5 .
Select Utilities | Automation Designer menu option
Select DB Misc tab from right side pane
Last icon in this tab is Execute Script, double click on it to add under Action list
Double click on Execute Script 1 action to open it
Select Text radio button and enter query statement or File radio button and point to SQL file (I keep getting "ORA-00911: invalid character" as well)
Under Output pane, designate the Output destination, perhaps a file and if so, provide path and file for output file
Hit Apply and Cancel
Right click on Execute Script 1 action and hit Run. Check the above output path and file to ensure its created
Under utlities I added the email function, but unable to integrate steps 6 & 9 to automate report
When you say "script" are you really trying to export the results of a single query to Excel and then email that? If so, ditch the execute script action. Use the "Export Dataset" action instead which is intended to run a query and export the results to various formats. Execute Script is intended to emulate SQL*Plus functionality and your output is limited to text file.
Drop an "Execute Dataset" action into your app. It's available from the Import/Export tab in Automation Designer.
Double click it to edit its properties.
Select "File" as the output destination and click the "..." button to the right of the filename. Set your filename and choose the .xls file format. Set any other options as you see fit.
Select the Dataset tab and select "Export query." Enter your SQL there.
Apply and Cancel.
Drop an "Email" action into your app following your "Export Dataset" action. It's available from the Utilities tab.
Double click it to edit its properties.
Configure all properties as required for your mail server. *** Note that 10.6 only supports simple mail servers and no SSL/TLS so you can't use your Gmail account or anything like that. It's limiting. Newer versions of Toad support Gmail and the like.
In the Attachments area click "Add File" and specify your exported .xls filename.
Apply and Cancel.
Now when you run your app it will export to XLS and email the file.

How to get the SQL query from a file in SSIS

I'm new to SSIS. I have a DataBase from which i'm getting the data. Suppose DB is the source and destination may be anything. (I tried DB to Excel and it worked fine)
In the source i have a custom query to get the data. I have written that in the properties.
Now i want to change it. I want to put it in some configuration file (xml file). i.e., i want to
get the query of the source from the xml file. How can i do this?
I'm a complete newbie trying the things. So please give your answer specifically.
UPDATE:
This is my package
I double clicked the OLE DB source. Now This is what i written there
I want to put the query (select id, age from emp where exp > 4), in a configuration(xml) file.
Create a package level variable for your query:
Change your source editor to use SQL command from variable (with appropriate variable) instead of SQL command:
Go to the SSIS menu and click "Package Configurations..." then click the checkbox to Enable package configurations, then click the "Add..." button.
... By default, it uses an XML Configuration file, which is probably easiest to work with. Specify a filename - the file extension is .dtsConfig. If the file doesn't exist on your machine, it will create one for you. Click Next.
Find your Variable, find the Value property for the variable, and check the box for it. Click Next.
Choose a name for your configuration. Click Done, then click Close in the Package configuration list, making a note of where on your file system you saved your configuration file.
Find the configuration file on your file system. Right-click and edit with an XML editor as needed.