Accesing the tables of one schema in another schema
Hi
I have doubt .. suppose i have a user called DEMO and it has tables . now i have a another user called DEMO1
my doubt is . how can i get the tables of DEMO user into DEMO1. If update the table in DEMO1 that should reflect
in DEMO user. help me.........
Before going further, you should clarify your requirements and make sure you have a good understanding of:
- Synonyms
- Views
- Replication such as materialized views
- Basic security including object grants
Assuming this is all in the same database...
If you just need to have one user access data in another schema, you need grants.
If you need to make it 'look like' the data in that other schema is in your schema, you should be looking at synonyms or views.
If you need to capture the data periodically from the other schema, you should be looking at materialized views.
If you are straddling multiple databases then the choices may be less clear-cut but you should still be looking at these capabilities to assemble a solution
From what you have said so far, triggers should not even be on your radar.
Similar Messages
-
How to Move or Copy the Tables from One Database to Another Database ?
HI,
Can any one help me on this, How i can move or copy the tables from one database to another database in SQL server 2005 by using SQL query. Hope can anyone provide me the useful and valuable response.
Thanks
GopiHello,
Maybe these links help you out
http://www.microsoft.com/downloads/en/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en
http://www.suite101.com/content/how-to-copy-a-sql-database-a193532
Also, you can just detach the database make a copy and move it to the new server. -
How do I move a table from one schema to another schema on Oracle XE?
How do I move a table from one schema to another schema on Oracle XE?
Hi,
I tried to use the insert/select statement that you had given, it did not work.
The error is ORA-00913: too many values.
But finally what I did was, I went into the system schema where the table was and generated the DDL through the utilities and afterwards I imported them into the schema that I am currently working on. It solved the problem!
However I am still curious to know why the insert/select statement did not work? Do you know any site/tutorial which gives a real time example?
Thank you
Skye -
How do I move a table from one schema to another schema?
How do I move a table from one schema to another schema?
Grant access to the table from the source schema to destination schema.
GRANT SELECT ON <TABLE_NAME> TO <DESTINATION SCHEMA>A simple way would be to use CREATE Table with select syntax (in destination schema)
CREATE TABLE <TABLE_NAME> AS SELECT * FROM <SOURCE SCHEMA>.<TABLE_NAME><li>However, you would be in <b><u>trouble when the table has index,constraints and triggers</u></b>.
So you can better of grab the DDL statement of the table(and any additional components) andd then create the table in the destination schema.You can use SQL developer, Toad or Apex's Object browser for this.
After the table is created, Insert the records using SELECT.
INSERT INTO <TABLE_NAME> SELECT * FROM <SOURCE SCHEMA>.<TABLE_NAME>This question is discussed in great detail in this <b>AskTom thread</b> -
How can i access all the objects of one schema from another schema
Dear All,
How can i access all the objects(Tables,Views,Triggers,Procedures,Functions,Packages etc..) and do the modifications of one schema from another schema (Without using synonyms concept).
Thanks in advance,
MahiFirst of all, synonyms only help you easy reference the object. It doesn't have any implication of object privilege.
As long as you have proper privilege on target object. You can access it with or without synonyms.
Assuming you have proper privilege of objects, you can use following command to assume schema owner.
ALTER SESSION SET CURRENT_SCHEMA = Schema_owner -
How to transfer the tables from one file group to another file group in SQL 2008.?
Hello all,
I have few issues regarding the transfer of the tables from one file group to another file group in SQL 2008 and also How can we backup
and restore the particular database based on file group level.
Let’s say I have a tables stored within the different FG. such as
Tables
File group
Dimension tables
Primary
Fact tables
FG1
FG2…
zzz_tables
DEFAULT_FG
dim.table1 DEFAULT_FG
dim.table2 DEFAULT_FG
Here all I want to transfer the dim.table1 ,dim.table2 from DEFAULT_FG to the Primary File
group .So is there simple methods for transfer the dim.table1,2 from one FG to another .I have tried somewhat but I couldn’t get the exact way .So if someone have better idea please share your knowledge that would be really appreciated.
Secondly after moving those dim.table1 ,dim.table2 from DEFAULT_FG to Primary ,All I want to backup and restore the database only containing the Primary and FG1,FG2… not
a DEFAULT_FG.Is it possible or not.?
Hope to hear from the one who knows better approach for this kind of task .Your simple help will be much appreciated.
Regards,
Anil MaharjanWell after all my full day research on this topic had paid off, I finally got the solution and am so happy to research on these things. It makes
us feel really happy after all our research and hard work doesn't goes as waste.
Finally I got what I am looking for and want to make sure that I am able to transfer the tables from DEFAULT_FG to another FG without tables
having clustered index on that tables .
With the help of the link below I finally got my solution where Roberto’s coded store procedure simply works for this.
Really thanks to him for his great post and thanks to all for your response and your valuable time.
http://gallery.technet.microsoft.com/scriptcenter/c1da9334-2885-468c-a374-775da60f256f
Regards,
Anil Maharjan -
How Can I obtain the tables of one schema and the record size???
How Can I obtain the tables of one schema and the record size???
Example:
TableName Record Size
Tabla1 12500
Tabla2 7800
Tabla3 2046This is not an OWB question, but you can obtain bda-type information on tables by using the system view dba_tables.
Regards:
Igor -
Export One Schema to Another Schema
Hi
I would like to export some of my tables from one schema to another schema.
Can you help me on this
regards
GhouseHere you resuire two steps EXPORT AND IMPORT
STEP-1
First run the export utility (name EXP80.EXE) in the ORANT\BIN directory and make the .DMP file.
STEP-2
Secondly run the import utility (name IMP80.EXE) in the ORANT\BIN directory and call the above .DMP file
===============
THE END
=============== -
Transfer data in the Ztable from one client to another client in a same ser
Hi all,
How can i transfer or move data in the Ztable from one client to another client in a same server .
Thanks
Ajayhi,
create a transport request (Workbench type) and add the following line into the transport request:
R3TR TABU name_of_table
save and doubleclick this line and enter the table keys for the required entries (if you need all antries: client and an asterisk will do).
When it is done save again, release the transport and ask basis to import into target client (or you can do on your own in SCC1 transaction)
hope this helps
ec -
Passing the values from one pgm to another pgm (Calling pgm has no sel scr)
Hi gurus,
In my requirement i need to pass the values from one program to another program.
I am using SUBMIT statement . But , the program which i am calling has no selection screen.
So how can i pass the values?
Please help me ASAP.
Regards,
Bhanu.RExport your internal tables or work areas to a memory id in ur program before u use submit.
Then in second pgm you have to import from memory id given above.
example.
EXPORT gs_header FROM gs_header to memory id 'HEADER'.
EXPORT gt_item FROM gt_item to memory id 'ITEM'.
SUBMIT YFIIN_DISHC_MAILREPORT EXPORTING LIST TO MEMORY AND RETURN.
In your second pgm you can write
import gs_header TO gs_header from MEMORY id 'HEADER'.
import gt_item TO gt_item from MEMORY id 'ITEM'. -
Copying a table from one databse to another
Hi,
I used the following code to copy a table from one database to another.
set copycommit 1
set arraysize 1000
copy from username/passwd@tnsname -
create <tablename> -
using -
select * from <tablename>
But I get the following error:
set copycommit 1
ERROR at line 1:
ORA-00922: missing or invalid option
Could you please let me know how this can be done.
Thanks,
NarasimhanThanks for your suggestions.I created a database link.I had no problems.
Then when i issue the command
copy from uname/password@db
create <tablename>
using
select * from <tablename>
<Here db is database link to source database identified by uname and password>.
I still get the error
copy from uname/password@db
ERROR at line 1:
ORA-00900: invalid SQL statement
Does it mean that the command is wrong?Or I'm doing something different.
Thanks! -
Best Way to port the data from one DB to another DB using Biztalk
Hi,
please suggest best way to move the data from one db to another DB using biztalk.
Currently I am doing like that, for each transaction(getting from different source tables) through receive port, and do some mapping (some custom logic for data mapping), then insert to target normalized tables(multiple tables) and back to update the status
of transaction in source table in sourceDB. It is processing one by one.
How/best we we can do it using bulk transfer and update the status. Since it has more than 10000 transaction per call.
Thanks,
VinothHi Vinoth,
For SQL Bulk inserts you can always use SQL Bulk Load
adapter.
http://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalksyn/archive/2005/10/23/processing-a-large-flat-file-message-with-biztalk-and-the-sqlbulkinsert-adapter.aspx
However, even though a SQL Bulk Load adapter can efficiently insert a large amount of data into SQL you are still stuck with the issues of transmitting the
MessageBox database and the memory issues of dealing with really large messages.
I would personally suggest you to use SSIS, as you have mentioned that records have to be processed in specific time of day as opposed to when the
records are available.
Please refer to this link to get more information about SSIS: http://msdn.microsoft.com/en-us/library/ms141026.aspx
If you have any more questions related to SSIS, please ask it in
SSIS
forum and you will get specific support.
Rachit -
Cutting and pasting tables from one project to another
When cutting and pasting existing tables from one project to
another, the line weights for the cell borders seem to vary at
random - some are the original line weight and some are heavier
when pasted.
I've tried sorting things out with the table properties
dialogue, but to no effect.
Is there a quick fix, or am I better importing in whole
topics and then editing the imported topic?Hi Colum/Peter,
It's not a custom table, I just need to copy an existing
table from one project to another.
My blasted developers (may the fleas of a thousand camels,
etc), just decided to change the toolbars in one of our
applications. As this toolbar appears in slightly different guises
in about 6 tabs, I was trying to update the table that shows what
icon does what and cut and paste that table into all the sub
projects I have. Each table then only needs a minor edit for a few
icons specific to that sub-project.
Peter's on the right track. When I cut and pasted the table
it also pasted in a number of lines of HTML associated with the
styles in the other project. If I delete those lines, the table
then appears as it should.
Thanks for prompt response -
How to copy a physical Alias table from one rpd to another
Hi
I am copy pasting the physical tables from one rpd to another. I first copied the physical table and then tried to copy the alias table i get the message ' Unknown Error' when i click ok it says
'Failed to copy from clip board"Identify the "class=MyStyle" string in the MTML code, and use the Multi-File Find and Replace feature to step through each topic and change the specific instances to "class=MyOtherStyle." (I doubt that you'll want to "Replace All".)
Sorry, there's no silver bullet!
Good luck,
Leon -
To copy table from one database to another
hai,
I will be really pleased if someone can me tell me that how can i copy table from one database to another. I am having two databases.
GursimranYou can Also do
++ Create a database link on the TARGET to SOURCE
CREATE PUBLIC DATABASE LINK <<DBLNK_NAME>> CONNECT TO <<USER>> IDENTIFIED BY <<PASSOWORD>> USING '<<TNS_NAME>>';
++ And copy as below
CREATE TABLE EMP AS SELECT * FROM EMP@DBLNK_NAME;
Maybe you are looking for
-
After replacing the logic board in my Macbook Pro it will no longer connect to the App Store.
I recently had to replace the logic board in my early 11 Macbook Pro (first gen i7). With the release of Yosemite just a few weeks away I am trying to update from Snow Leopard 10.6.8 to Mavericks. I'm afraid if I don't after this update it will bec
-
Kernel Panic, MacBook Pro, Lightroom 1.0
After being a user of Apple Aperture for the last few months, I just decided to download a trial of Adobe Photoshop Lightroom. It's a great product, and I really enjoy its flexibility. However, every time I use it, the program spectacularly crashes i
-
How do i get the app world if I have the mac os x 10.5.8
help!
-
Wireless AP 1041 Autonomous to Lightweight
Is it possible to convert a 1041 in Autonomous AP mode to Lightweight? Since on the cco page there is no upgrade tool under the 1040 series AP, and also i didnt find any document with the procedure. Thanks in advace. Nuno
-
Is iPhoto 9.3 Compatible With iOS 6?
For various reasons I cannot upgrade a MacBook to Mountain Lion yet, but I would like to start using iOS 6 on an iPad, primarily to get access to Photo Stream Sharing in iCloud, which does not seem to otherwise require a Mac. So a couple of questions