Can't edit and execute store procedure direct from squirrel-sql client - postgresql

PostgreSQL 9.6
squirrel-sql-snapshot-20220608_2238
I success connect and execute sql queries. Nice.
But when I open source of store procedure I can't modify it and can't execut it.

Related

Oracle READ WRITE mode in postgres

I am migrating Oracle database to Postgres Aurora. There is one Oracle PL/SQL block which checks if the database is in read write open mode. Below is the query like:
Select open_mode into v_open_mode from v$database;
if v_open_mode = 'READ WRITE' then
-- perform some steps.
I want to know if we have any equivalent query in Postgres. Or even if I can know the postgres node is WRITE mode.
I am also open to get anything which is native to Aurora which show if the node is reader or writer.
I am not sure what the Oracle thing does, but I assume the closest thing would be to check if Postgres is in recovery mode using pg_is_in_recovery()
So something like:
if not pg_is_in_recovery() then
-- do some steps
end if;
That is from "stock" Postgres, I don't know if Amazon Aurora does anything different or provides other functions.

DB2 Z/OS - Revalidate UDF and Stored Procedure

On DB2 AIX I can use the SYSPROC.ADMIN_REVALIDATE_DB_OBJECTS stored procedure to revalidate all Stored Procedures and Functions defined in my schema.
How can I do the same thing on DB2 z/OS (v.12)?
Thanks
REGENERATE automatically rebinds, at the local server, the package for the SQL control statements for the procedure and rebinds the package for the SQL statements that are included in the procedure body. If a remote bind is also needed, the BIND PACKAGE COPY command must be explicitly done for all of the remote servers.
ALTER PROCEDURE SCHEMA.NAME_SP REGENERATE ACTIVE VERSION;
For the moment I have not found anything that automatically revalidates/regenerates all Stored/UDFs of a Schema.

Is it possible using t-sql, to create a stored procedure where you query a remote database using an ODBC data-source in the stored procedure?

Is it possible, using t-sql, to create a stored procedure where you query a remote database using an ODBC data-source in the stored procedure?
I have a server with an ODBC data-source.
I use via Power Bi successfully. I would like to create a stored procedure to query the remote database using the stored procedure with the odbc data-source.
I have looked at opendatasource command, but it only uses OLE DB connections.
Thanks in advance for your time.
Dean-O
Thanks all, Tim Mylott, we got it to work, had to use the ip address of the remote server but the rest of the info given above was correct. from statements needed to include the linked_Server_Name dot DB_Name dot schema dot table_Name

Setting up environment for SQL queries

I know the basic syntax of queries but otherwise I'm a beginner with SQL.
I have an SQL file (.sql) and I downloaded a couple programs (pgadmin and sql workbench).
I have no idea how to get from where I am now to actually writing queries and finding information. How do I set up so I can actually import my SQL file and start writing queries?
pgAdmin is the default GUI for PostgreSQL.
SQL Workbench is a free, DBMS-independent, cross-platform SQL query tool.
Either way, you need to connect to a database to actually run queries. The DBMS can either run on your local machine or you can connect to a remote server - where you need access privileges of course.

Can firebird database connect to other databases using like linked server in SQL Server?

I know that SQL Server has linked server that allow it to connect to other database and execute query. Now I am using firebird. I wonder if firebird has its "linked server" to access other databases. Thanks!
Firebird doesn't have a linked server feature. There is a limited method for accessing other Firebird databases (either remote or locally) using EXECUTE STATEMENT, however this only supports Firebird database, and you need to provide the data source information on each invocation.