Sending Oracle database record using https request to Google form with no internet permission of oracle database - sql

I am facing this problem in getting the new, update or deleted record from table in Oracle database to prefilled Google Form.
The Oracle database is with disabled permission to access the internet (ACL list) and according to recommendations that this is the best practice for Oracle databases.
I have managed to write some triggers in PL/SQL, but still no permission.
I have searched the internet, but I have not found anything that can help me with this scenario.
What I am thinking is to create a new Oracle database on the same server but with HTTPS permission access, using trigger on the old database to copy the record to the new database and a trigger on the new database to submit the record to Google form.
I have tried this idea, but each time I try to create new database I get errors.
So please, if you have other ideas in solving this issue, or helping with applying the scenario that I am thinking of.
My knowledge in Oracle databases is very shallow and their documentation from my point of view is that your topic is distributed under different chapters and sections which accumulate the felling of doubt that you are not in the right place the more you read in these sections.

Related

SQL - is it bad practice to give Read-Only access to the entire company?

I work in my companies small IT department. I have been creating automation via VBA in Excel to pull data from SQL and put it into Excel, then dynamically format and summarize the data. The issue I am running into is the IT department does not want to give anyone outside the IT department SQL Read-Only Access. They view SQL as a privilege not a right...even if it is only Read-Only. They claim security reasons.
Just to be clear, we are NOT installing SQL on these peoples' computers nor do they have the technical understanding on how to write queries. Also, they can already view all the information on the front-end website.
I currently have to specify which database and which tables they can have access to and it takes about 1-2 weeks to give them access (they drag their feet doing the requests).
I am not trying to vent, I am actually wondering do they have a legit concern about security and is this actually a best practice on their part?
The worst thing that could happen is a user knows just enough to connect MS Access to the database, write some poor queries, and grind everything to a halt. You should always have non-IT users access data in a safe, structured way. Especially if this database is a transactional one, and not a reporting database.
Sure, they can access all the data per business process. So then, create a nice, safe query to read all the data and dump it to Excel - if that's what the users want.
Otherwise, IT-created queries - preferably in Stored Procedures - should be reading the data and presenting it to the users.
So it's not a security issue per se. It's more an issue of "we don't want non-IT users getting crafty and bringing down the database with poorly written queries."
I believe the connection properties to the SQL server is embedded in your VBA code, as long as the code is not visible to the user then there is no way they can query the SQL server directly.
Sounds like you need an SQL read only service account which you can use for Query connections. Create an Excel data connection that has the security details to connect to SQL, then your VBA hooks into that data connection.

Prevent Derby SQL User Authentication Change

Can someone tell me if there exists SQL code for Derby to change a username or password of a database? How may I reproduce this to prevent it in future in my application?
What I'm busy doing, is to create a custom SQL query builder in my Java desktop application, but I want to prevent an end-user to accidentally or purposefully delete any table or database, change the username or password.
What SQL scripts can be run here which I may cancel out in my coding, and what basic things am I missing here?
All thoughts appreciated.
(This question has been asked on SE/Security to get different views. I want to get as much info on this as possible)
Derby has an entire manual on security topics: http://db.apache.org/derby/docs/10.11/security/
Perhaps you can start by studying that manual, and experimenting with the approaches it suggests, and then ask some more specific questions?

Oracle database - copying objects to remote database and modifying so they use the remote database only if the local database is offline

I'm new to the forum and am studying Oracle SQL and PL/SQL. I have created a local database and a database link to a remote database to which I have to copy all my objects.
I think I'll be able to do the copying of the objects from local to remote database, but neither my course material nor my googling have given me much of a steer in terms of the modifying the objects to use the remote tables only if the local database is offline.
I'd be hugely grateful if anyone has done a similar task and could point me in the direction of any good material on the subject.
(I'm working with Oracle 11g Express and Oracle SQL Developer)
Many thanks in advance
Edit from original poster:
I got some clarification on the task requirement (see comments below) and I've created a new thread to ask my next question about creating packages at the remote database end. thanks guys for your help so far.
If database A is offline, a database link from database A to database B will not do you any good, as it will not be accessible. The same is the case with PL/SQL, PL/SQL on database A will not be available if database A is down. This is not a problem you will solve with PL/SQL and database links.
Transparent Application Failover (http://docs.oracle.com/cd/B19306_01/java.102/b14355/ocitaf.htm) could solve part of the problem, allowing a connection to failover to database B if database A is down. However, it will not automatically switch back to database A when the database comes back up, unless you try a connection to database A again. You will need to have your PL/SQL code copied on both databases.
There are already robust failover mechanisms in Oracle, some free and required some hacking, such as redo log application, some costly but well supported, such as Oracle Data Guard. I would suggest you review your design and what you are trying to accomplish. If I had to absolutely do what you are trying to do, I would throw a web service in front of each database, use a load balancer in front of the web services that always connected to service A, unless it was down, in which case it would connect to service B.

Is it possible to update a clone database only with changes in the source database?

For reasons I'm not about to explain, We keep a Access database that is to be a copy of a subset of a larger oracle database. It is not feasible to refer to data directly in the Oracle database due to speed issues (don't ask).
Every time a specific application is opened the local Access database is updated from the newest data found to the time of opening the application. First of all this does not capture changes in the existing records. Secondly it does not take into account changes in the source database made after opening the application.
For this reason several checks may be needed when carrying out certain operations in the application. So is it possible to update the local Access database only with changes in the Oracle database in a smarter and faster way than the hard way I am imagining (I'm not a PL/SQL / SQL expert)? Possibly it might be sufficient to look for changes only after a certain date (stored in one of the fields of the recordset retrieved).
Any suggestions?
You might want to look into data replication beethween Oracle en MSAccess databases. For example thru an ODBS drive or sqlserver database. Just google "ms access oracle replication" an see if this solves your problem.

SQL Server trigger to update Sharepoint List

So, it looks like I'm gonna have to replicate a couple of reference tables from my SS2k5 db on SP2k7 in order to do dropdown boxes on my document library. Small tables, maybe a hundred entries, and not often updated. Ths SP Server is not the SS server.
I know how to build triggers, but how do I reference the SP table to update it from the SS trigger, and what are the authentication issues?
Anybody do this before?
I know there is a thing called Business Catalog Data or something like that, but I don't have full privs on this SP site, so I'm likely not to be able to get to that, and I've never used it before, hence the trigger idea.
Does it really need to be real time via a trigger? Or can it be delayed and processed via an ETL job? If the latter is acceptable, I recommend taking a look at Extracting and Loading SharePoint Data in SQL Server Integration Services. I have used this adapter on past projects to transfer data between SQL Server and SharePoint.
P.S. I would not recommend writing directly to the SharePoint content database. Making changes directly to a content database is not supported and is not considered a best practice.