Will delete user for Oracle 10g database deleted the data corrsopds to the user? - oracle10g

I am new to the Administration part of the Oracle server,Just want to know will deleting a user means data related to that user will also get deleted?
Thanks you.

Review cascade option for drop user command
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9008.htm#SQLRF01811

Depends upon what you mean by "related". Every user in the database has a corresponding schema, with tables, indexes and so on. If you drop a user, their schema and all the data in it goes too. If the user has put data into other tables, that data does not go anywhere.

Related

How to get a user from CDC tables in SQL Server?

I wonder if anyone had ever stumbled upon finding a user which made a data change (update) in the table that has activated CDC (Change Data Capture).
For example, table "User" has its corresponding table, in which info about changes is stored, called "User_CT" and it has a column called __$start_lsn which can be used in a function sys.fn_cdc_map_lsn_to_time to get the time of that transaction. Can you, somehow, find which user executed that transaction?
I really hope that there is an answer to that question.

How to replicate rows into different tables of different database in postgresql?

I use postgresql. I have many databases in a server. There is one database which I use the most say 'main'. This 'main' has many tables inside it. And also other databases have many tables inside them.
What I want to do is, whenever a new row is inserted into 'main.users' table I wish to insert the same data into 'users' table of other databases. How shall I do it in postgresql? Similarly I wish to do the same for all actions like UPDATE, DELETE etc.,
I had gone through the "logical replication" concept as suggested by you. In my case I know the source db name up front and I will come to know the target db name as part of the query. So it is going to be dynamic.
How to achieve this? is there any db concept available in postgresql? Or I welcome all other possible ways as well. Please share me some idea on this.
If this is all on the same Postgres instance (aka "cluster"), then I would recommend to use a foreign table to access the tables from the "main" database in the other databases.
Those foreign tables look like "local" tables inside each database, but access the original data in the source database directly, so there is no need to synchronize anything.
Upgrade to a recent PostgreSQL release and use logical replication.
Add a trigger on the table in the master database that uses dblink to access and write the other databases.
Be sure to consider what should be done if the row alreasdy exists remotely, or if the rome server is unreachable.
Also not that updates propogated usign dblink are not rolled back if the inboking transaction is rolled back

Making MS Access queries that allow data entry to PostgreSQL database via an ODBC driver

I've been asked to modify an Access database by putting the data themselves into a Postgres database while keeping the old Access file as a frontend. So far everything has worked just fine, with every linked table, query and form working just like before when viewed.
The issue is, however, that all of the forms call on MS Access queries which users can insert data into, but after the tables have been migrated into PostgreSQL, those queries no longer allow for data inserts, which means the forms no longer allow for data inserts. I can edit the rows already entered, but I cannot make new rows, and I can insert new rows into the linked tables. This is as a superuser.
I have made Access queries in the past that allowed for data entry to a Postgres database, but I don't have access to those files now, and I can't for the life of me figure out what I did diferently back then.
Highly appreciate any leads. Couldn't find anything on this. Using MS Access 2010 and PostgreSQL 9.1
Solved
Andre pointed out that these MS Access queries must include the primary key to give the option of creating new rows. Once I added the id field to the query, the forms worked like they did before.
The answer, supplied by Andre, is that simple MS Access queries allow for inserts into PostgreSQL if the queries include the primary key of the queried table. Cheers!

Append only data in phoenix, ecto and postgres

One of my models in Phoenix application has append-only semantics. There will be events that can be created, but should never be updated by the application (read only after creation).
Is there a postgres mechanism to enforce such thing on a table?
How should I define my migration to use it?
You can set the permissions on the table to allow INSERT and SELECT but not, for example, UPDATE or DELETE for the role that is used to access the data. This way there is no possibility to alter the data.
More information on permissions.

Application event logging for statistics

I have app in production and working. It is hosted on heroku and uses Postgres 9.3 in the cloud. There are 2 databases: master and (read-only follower) slave. There are tables like Users, Likes, Followings, Subscriptions and so on. We need to store complete log about events like userCreated, userDeleted, userLikedSomething, userUnlikedSomething, userFollowedSomeone, userUnfollowedSomeone and so on. Later on we have to prepare statistic reports/charts about current and historical data. The main proble is that when user is deleted it is just removed from db so we can't retrieve users that were deleted from db because they are not stored in db anymore. Same applies to likes/unlikes follows/unfollows and so on. There are few things I don't know how to handle properly:
If we will store events in same database with foreign keys to user profiles then historical data will change because each event will be "linked" to current user profile which will change in time.
If we will store events in separate postgres database (db just for logs to offload the main database) then to join the events with actual user profiles we would have to use cross-db joins (dblink) which might be slow I guess (I have never used this feature before). Anyway this wont solve the problem from point 1.
I thought about using different type of database for storing logs - maybe MongoDb - as I remember mongoDb is more "write-heavy" than postgres (which is more "read-heavy"?) so it might be more suitable for storing logs/events. However then I would have to store user profiles in two databases (and even user profile per each event to solve point 1).
I know this is very general question but maybe there is some kind of standard approach or special database type for storing such data?