How to change all datasources from one database to another
I have many datasources defined in weblogic connect to one database, login as different users to different sachems.
Is there any easy way to switch all of them to another database? changing each of them through console seems not so easy.
Thanks
you can use WLST - use the console to record the step for 1 datasource, and use the generated python file as a reference
connect('weblogic', 'weblogic1', 't3:yourhost:7001')
datasource='your_datasource'
datasource_url='your_new_url'
edit()
startEdit()
cd('/JDBCSystemResources/' + datasource + '/JDBCResource/' + datasource + '/JDBCDriverParams/' + datasource)
cmo.setUrl(datasource_url)
save()
activate()
Similar Messages
-
How to change the datasource from one server to another server?
i need to change the datasource from development environment to production server. i had configured the JNDI informations like the following in the 'context.xml':
<Context path="/RFT" docBase="RFT" reloadable="true">
<Resource
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
validationQuery="select 1"
name="jdbc/datasource"
username="sa"
password="$m1sbag$"
maxIdle="-1"
maxActive="0"
maxWait="5000"
url="jdbc:microsoft:sqlserver://172.24.151.149:1433;databaseName=Projectgold" />
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
and in 'web.xml' included the following code:
<resource-ref>
<res-ref-name>jdbc/datasource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
and mentioned the JNDI Connection Name in the .rpt file as 'jdbc/datasource', but still getting the same connection which one is configured during the report design. need a help to resolve this...
Thanks,
Rameventhough it's working fine. I may have deployment problem. Anyway thanks for the reply.
Regards,
Ram -
Simple: How to copy a Table from one Database to another?
I already know how to do it by creating an identical table and then inserting the Data.
Like so:
SET IDENTITY_INSERT dByDtMinusC5 ON
INSERT INTO [DB1]..T1 ([Id], [HbyD] , [K] )
SELECT [Id], [[HbyD]]] ,[K] FROM [DB2]..T2
As you can see I need to have T1 in order to copy T2 into DB1. Is there any way that I could auto create T1 and copy T2?
There are so many forums in sql server Category, I hope I posted in the right one :0 . We need tag system for forums.Hi Bhupinder,
According to your description, you want to copy a table with Primary keys from one database to another database.
As per my understanding, I think the best method is use Transfer SQL Server Objects Task in SQL Server Integration Services. The Transfer SQL Server Objects task transfers one or more types of objects in a SQL Server database between instances of SQL Server.
Server roles, roles, and users from the specified database can be copied, as well as the permissions for the transferred objects. Indexes, Triggers, Full-text indexes, Primary keys, Foreign keys can also be copied.
To use the Transfer SQL Server Objects Task, we should create a SQL Server Integration Services Project in SQL Server Data Tools, then drag a Transfer SQL Server Objects Task to Control Flow pane. Specify SourceConnection, SourceDatabase, DestinationConnection
and DestinationDatabase for the Connection, select the table in the ObjectsToCopy category, then change CopyPrimaryKeys to True and the other corresponding properties in the task.
References:
Transfer SQL Server Objects Task
Transfer SQL Server Objects Task in SSIS 2008 R2 With Example
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
How to Add Sales order from one database to another database
Hi All,
I am trying to add sales order with sales order object.
I have completed connectivity from one database to another database.
but i am unable to post sales order with orders object.
My code is
ObjSales = objMain.objUtilities.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
ObjSales.DocDate = Date.Parse(System.DateTime.Now().ToString("d"))
ObjSales.DocDueDate = Date.Parse(System.DateTime.Now().ToString("d"))
ObjSales.TaxDate = Date.Parse(System.DateTime.Now().ToString("d"))
ObjSales.CardCode = "C0006"
ObjSales.Series = 92
ObjSales.PaymentGroupCode = 3
ObjSales.Comments = "vivek"
ObjSales.Lines.Add()
ObjSales.Lines.SetCurrentLine(1)
ObjSales.Lines.ItemCode = "5127"
ObjSales.Lines.Quantity = 100
ObjSales.Lines.UnitPrice = 10
ObjSales.Lines.WarehouseCode = "01"
ObjSales.Lines.TaxCode = "0"
ObjSales.Lines.DiscountPercent = "0.00"
ObjSales.DocTotal = 1000
If ObjSales.Add <> 0 Then
objMain.objApplication.SetStatusBarMessage("Sales or Not Posted", SAPbouiCOM.BoMessageTime.bmt_Short, True)
Exit Sub
else
objMain.objUtilities.ShowSuccessMessage("Sales Order Posted successfully")
End If
The above code is executing successfully.But the Sales order is not getting added.
Thanks in advance.Hi Vivek,
If the code you posted is not throwing any errors, then the order really does get created. Apparently just not to both databases, am I correct ?
vivek.Y wrote:
> I have completed connectivity from one database to another database.
That means that apparently you have not gotten this bit right.
Generally speaking if you want to create an order into two databases, you first need to connect to both databases and create separate order objects for each database. So you need to do this bit twice; once for each database. Something like this:
ObjSales1 = objMain.objUtilities1.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
ObjSales2 = objMain.objUtilities2.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
Then at the end you also need to add both objects separately:
If ObjSales1.Add <> 0 Then
etc.
If ObjSales2.Add <> 0 Then
etc
Good luck,
Johan -
How to Copy the PLD from one database to another
Dear Members,
i have designed the PLD for Purchase Order, i want to copy the particular PLD into another Database.
i tried to copy the PLD from one database to another through copy express.. i copied the PLD sucessfully. But the problem is,it copies all PLD's from one database to another. i want only the Purchaseorder PLD has to be copied in to another database.any body can help me in this regard.
With Regards,
G.shankar GaneshHi,
select * into A1 from RDOC where Author !='System'
select * into A2 from RITM where Doccode in (select Doccode from A1 )
select * from A1
select * from A2
sp_generate_inserts 'A1'
sp_generate_inserts 'A2'
you will get Insert scripts of A1 and A2 tables .After that You 'll Replace A1 to RDOC and A2 to RITM.
So that you can RUN this SQL srcipts any where (In any Database)
but First u have to run sp_generate_inserts Storeprocedure(from websites) .
drop table A1,A2 -
How to change XML Structure from one form to another form using OO ABAP.
Hi Experts,
In my Scenario, i need to do ABAP Mapping in order to change Incoming structure from one form to another.
My Input to ABAP Mapping (OO ABAP Program)would be :
<A>..........</A>
<B>..........</B>
<C> .........</C>
<D>..........</D>
<E>..........</E>
<F>..........</F>
OO ABAP Program need to read this input and change the XML Structure into below form:
<A>..........</A>
<B>..........</B>
<C> .........</C>
<X>
<D>..........</D>
<E>..........</E>
<F>...............<F>
Please provide inputs (sample Code) to solve this issue.
Thanks,
Kish.
Edited by: Kishore Reddy Thamma on Jan 22, 2008 2:51 PM
Edited by: Kishore Reddy Thamma on Jan 22, 2008 2:52 PMHi,
Please provide sample code or Material for converting XML Structure from one form to another using OO ABAP and
Steps for ABAP MAPPING.
Thanks,
Kish. -
How to copy the data from one database to another database without DB link
Good Day,
I want to copy the data from one database to another database with out DB link but the structure is same in both.
Thanks
NiharYou could use SQL*Plus' COPY command
http://technology.amis.nl/blog/432/little-gold-nugget-sqlplus-copy-command
http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/apb.htm#sthref3702
Edited by: Alex Nuijten on Sep 16, 2009 8:13 AM -
How to change the webserver from one server to another server
Hi all,
Can you please provide the document for changing the web server location from one server to another server?
Thanks in Advance.
Thanks & Regards,
Siva Prasad BSiva Prasad wrote:
Hi Michel,
Coping PS_HOME is enough to relocate the web server? And Michel and I said earlier you need to reinstall your webserver... and redeploy the PIA, what's not clear ?
Nicolas. -
How to change app store from one country to another then your contry of residence
How you can switch from one country app store to another country app store the your country of residence.
You can only use the store in the country where you are - to use another country's store you will need to be in that country and have a valid billing address in that country on your account. If there is a particular item that you would like to buy then you can try requesting that it be added to your country's store, but ultimately it's the content provider (app developer, record company, film studio etc) that will have to grant Apple a license to sell it there : http://www.apple.com/feedback/itunes.html
-
How could I copy contraints from one database to another?
Hi,
I have a specific problem.
I have taken a datadump and executed in another database. Some how the contraints were not copied.
So I created following script to genrated alter statement and then run the script in target database:
declare
cursor get_cons is
select distinct dc.table_name table_name, decode ( substr(dc.constraint_name,1,3), 'SYS', ' ', 'CONSTRAINT ' dc.constraint_name ) contraint, wmsys.wm_concat(ucc.column_name) over ( partition by dc.constraint_name order by dc.constraint_name ) cols
from user_constraints dc,
user_cons_columns ucc
where dc.table_name like '%'
and dc.constraint_type = 'P'
and dc.table_name = ucc.table_name
and dc.constraint_name = ucc.constraint_name;
lv_sql varchar2(2000);
begin
for i in get_cons
loop
lv_sql := 'ALTER TABLE '
I.TABLE_NAME
+' ADD ('+
i.contraint
+' PRIMARY KEY ( '+
I.COLS
+' )); ';+
dbms_output.put_line( lv_sql );
end loop;
end;
Is there a better way to do it?
Thank You,
RanjeethHi,
do u have idea about move data from development environment to production environment.
what is the simpleast way. suppose if we refer DATAPUMP or EXP/IMP. How to do it.
through EXP command i am exporting full database or specified tables. but problem is i am not able import which i exported tables.
can u give me the steps to how to import .DMP files through command prompt.
Thanks
Venkat. -
How to move a schema from one database to another on ASM?
Hi All
I have a schema in database A on ASM and I want to move the complete schema to database B on ASM . Both databases are on RAC and on the same server.
Please tell me the steps how to do it or if there is a script to do it.
Thank you.There is nothing special which you need to do for ASM instance. In this case too, you will be required to use export/import utility to do the same.
Cheers
Amit
http://askdba.org/weblog/ -
How to import the datafiles from one database to another
Hi,
I have got some datafiles from the existing database(Consider it as Database A), but it has been removed as of now.
I am having the datafiles and control files of it.
I have freshly installed one oracle Database(database B), I am planning to load those datafiles in the newly installed
database.
Is it possible, if so wat is the procedure.
Both the databses are Oracle 11g.
Help me out of this.
Thanks.
Regards
GathaHi,
As you said that you have data files and Control files, then using import quite no possbile, but you need to do it manually (as it exits in the Source System in same path).
Initially, you copy these files from the Source System to Destination System that is
Data Files and Control Files
Next, you will get the DBID from the controlfile backup is you have Example :-
CTL_SP_BAK_C-1507972899-20070228-00, then " 1507972899" is the DBID,
Try to use the RMAN for this
example :-
Open the rman
set dbid 1507972899
then you need to build the initilizaition file to start an instance based on the Configuration
or Copy the spfile from the back from source system if exits.
Startup the DB in mount mode.
You might get the error
ORA-01078: failure in processing system parameters
Now restore spfile from 'backup path' where you have copied files
startup force nomount
Now the instance is started
connect to DB as sysdba
check the control file parameter values and online redo Log files paths (Log_Archive_dest)
Restore the old control file from backup, since the new instance must the know where the files are located
restore controlfile from 'backup path'
then shutdown the DB
start in mount mode
restore the DB - restore database
Note: Recovery is dependent on the available archived (and online) redo logs.
Final step will be Alter database open resetlogs;
- Pavan Kumar N -
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; -
How to move only subset of data from one database to another?
Both source & destination are Oracle11g databases.
The requirement details are as below,
1) The database contains static as well as transactional data for telecom domain.
2) We have to move region-wise data from one database to another.
3) There are around 10 regions.
4) The region wise data extraction from source db is based on around 40 to 50 tables. Rest of the tables contains
static data & it will not change.
5) The volume is around 1 million subscribers per region.
6) The migration is required because
a) The client is upgrading its base product which uses this database
b) There is a change in structure of static tables
c) Hardware upgrade
d) The client want to start with single region on new database & rest of the regions will be operated from old
database.
7) Keep execution time to very minimum.
I am thinking to have solution as below,
1) Create destination database with upgraded db structure (as mentioned in 6b)
2) Create database links to access source db in destination db.
3) Write SQL queries to fetch data from all the respective tables for a specific region
4) Write separate PL/SQL blocks for each table to fetch data from source db & insert into respective table in
destination db
a) Use FOR ALL & bulk collect to improve the performance
b) Divide table data into multiple chunks & execute parallel batches (around 10) to insert the data
5) Validate pre & post counts to verify the success of migration
Is there any other better way?
Regards,
SandeepHow to move only subset of data from a partiular table by using transportable tablespace?
E.g. SUB table using SMP_SUB tablespace contains subscriber data in source database.
The indexes defined on SUB table are under SMP_IDX_SUB tablespace
The subscribers data can be categorized by different regions, say region_id column. Then how to move data & indexes of SUB table from source db to destination db?
any specific example would be helpful. -
How do I change an Ipad from one ownership to another?
How do I change an Ipad from one ownership to another? My husband passed away in June, and I can's seem to
figure out how to delete his acct. I created a new acct on it in my name, but I can't buy, update, or change anything
purchased 7/1/13 Ipad 2 - 32G
Thank you,
LynnFollow these instructions: What to do before selling or giving away your iPhone, iPad, or iPod touch.
Maybe you are looking for
-
How do I print on a greeting card in landscape when I can't save custom paper size?
I have a J6450 running on XP SP3 with the latest drivers and patches installed. I have greeting card stock measuring 6.5 by 10.0 inches and a Microsoft Word document with a custom paper size matching the that stock prints in landscape mode. The pri
-
I use floating time zone with all of my iCal entries. But then the times of the entries do not print when printing month view. Is there a fix for this?
-
Hyperlinks to open in new window?
I'm trying to set my external hyperlinks to open in a new (browser) window but haven't had any luck. I thought that the "Display in Browser" option when setting up the HTML Jump would do this, but it still opens within the help window. Can anyone pro
-
How do I burn my home vids from imovie onto a dvd through my macbook dvd burner?
-
I write as a total novice and just joining kinvey in an effort to launch a mobile app project. Although I intend to install an Android SDK to a Windows desktop I would want a similar SDK on my Android 4.0.4 generic mobile device. I have navigated to