How to run a select against multiple databases
Dear experts,
I need to run a select against all our databases, which are running on a separate server each.
I found this:
Looping between multiple servers for SQL*Plus
which seemed to be doing the trick, but it relies on /etc/oratab, but in our environment this file
is not in use, i.e.
/var/opt/oracle/oratab - this file has comments only and does not contain any real entries
/oracle/<SID>/11203/install/oratab - this file has 0 size
Thank you!
Hello
Database link is a good technique for running a query against multiple database, but you will need to statically define the DB you want to access.
Best regards
CREATE DATABASE LINK dev_link CONNECT TO system IDENTIFIED BY password
USING '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =sapdev)(PORT = 1527)) ) (CONNECT_DATA = (SID = DEV) ) )';
select * from sapsr3.REORGJOBS@dev_link;
drop database link dev_link;
25383 - Database links, synonyms, remote DB
Similar Messages
-
How to run a select count(*) with multiple rows returned
Hi,
I have to run a select count(*) for different reports.
1) Select count(*) from table
where state = 'CA'
2) Select count(*) from table
where state = 'NY'
3) Select count(*) from table
where state = 'NV'
Instead of running this query again for 50 times, is there a way for me to just put it in one query and get multiple row returns? Thank you.Samantha wrote:
Hi,
I have to run a select count(*) for different reports.
1) Select count(*) from table
where state = 'CA'
2) Select count(*) from table
where state = 'NY'
3) Select count(*) from table
where state = 'NV'
Instead of running this query again for 50 times, is there a way for me to just put it in one query and get multiple row returns? Thank you.select state, count(*) from table group by state order by 1; -
How to use one query against multiple table and recieve one report?
I have duplicate tables, (except for their names of course) with commodities prices. They have the same column headings, but the data is different of course. I have a query that gives me a certain piece of information I am looking for but now I need to run this query against every table. I will do this every day as well, to see if the buying criteria is met. There are alot of tables though (256). Is there a way to say run query in all tables and return the results in one place? Thanks for your help.
hey
a. the all 256 tables whuld be one big partitoned table
b. you can use all_tables in order to write a select that will write the report for you:
SQL> set head off
SQL> select 'select * from (' from dual
2 union all
3 select 'select count(*) from ' || table_name || ' union all ' from a
4 where table_name like 'DB%' AND ROWNUM <= 3
5 union all
6 select ')' from dual;
select * from (
select count(*) from DBMS_LOCK_ALLOCATED union all
select count(*) from DBMS_ALERT_INFO union all
select count(*) from DBMS_UPG_LOG$ union all
remove the last 'union all', and tun the generated quary -
SQL> set head on
SQL> select * from (
2 select count(*) from DBMS_LOCK_ALLOCATED union all
3 select count(*) from DBMS_ALERT_INFO union all
4 select count(*) from DBMS_UPG_LOG$
5 );
COUNT(*)
0
0
0
Amiel -
Running a reports against different databases
I have written a report that uses a ref cur in a database package to derive the main query. I've compiled the report and it runs fine.
The problem is when I try to run it against a database other than the one it was compiled against (i.e. compile against DEV DB, test against TEST DB, finally migrate to PROD DB). Each of these databases are identical in terms of their objects but if I run the report against an environment it wasn't compiled against I get the following messages:
REP-1437 Run time error in the PL/SQL development environment (DE).
PDE-PSD001 Could not resolve reference to <Unknown Program Unit> while loading <unknown> <unknown>
I noticed initially that the report and the database package had the same name, I though this may be confusing things so I renamed the stored proc but I still get the same results.
I can get around the problem by either re-compiling it against each database or by getting the form to call the .rdf (rather than the .rep) so it is recompiled as and when required but this doesn't seem right.
Anyone have any ideas?Hi Steve,
You can try using the RECURSIVE_LOAD parameter. By default, it is set to YES. If you are running with the .rep, set it to NO on your command line. What this means, is that it will not try to recompile the plsql in your report.
Hope that helps,
Toby -
How to extend dynamic selection for Logical Database PNPCE
Hi All,
I need to extend dynamic selection for Logical Database PNPCE. Can someone able to help with steps?
Thanks
RanjithHi All,
I need to extend dynamic selection for Logical Database PNPCE. Can someone able to help with steps?
Thanks
Ranjith -
How to create linked server to multiple database on same server?
Hi Experts
I want to create linked server to multiple databases on the same server.
I have 2 database servers (ServerA and ServerB) and want to create linked server on ServerB to link multiple databases on ServerA).
I have admin right on ServerB.
I don't have admin right on ServerA but have different accounts to access on each databases on ServerA.
After I created one linked server object to a database, I cannot create another linked server object for another database as it has already used the server name which is ServerA.
Please advise.
Thanks.EXEC sp_addlinkedserver 'ServerADB1', '', 'SQLNCLI', 'ServerA', @catalog = 'DB1'
EXEC sp_addlinkedserver 'ServerADB2', '', 'SQLNCLI', 'ServerA', @catalog = 'DB2'
etc.
Please look up the details for sp_addlinkedserver as I typed this from memory.
I can certainly see a point in having one linked server per database, as then you don't have to hardcode the database name in the queries, and the linked-server definitions can be changed if the database name changes.
Erland Sommarskog, SQL Server MVP, [email protected] -
How to run batch select query ?
I have multiple "select" query .
how do i run the query in a efficient way and absorp the values into an ArrayList ?
addbatch() method is mainly used for "insert" kind of query .
and also , it would be bad idea to run "select:" query one by one .
can you tell whats the best use ?Are your queries related to each other, I mean, do you have something like
select xpto from someTable where someValue = 1
select xpto from someTable where someValue = 2
select xpto from someTable where someValue = 3
If it's something like this you can group
select xpto from someTable where someValue in(1,2,3)
If it is not I think there's no other way but running one at a time.
mleiria -
How to disable the SELECT-OPTINS multiple selection screen's Ranges options
Hi this is sekhar,
I have used the Select-options: statement with 'No-Interval' option. Now I need to restrict the user not to enter the values in the Ranges column of multiple selection screen. How can I do it....You can also refer this code as below : CHECK OUT SELECT OPTION sel_1_0.
*& Report ZTESTREP
REPORT ztestrep.
Include type pool SSCR
TYPE-POOLS sscr.
Define the object to be passed to the RESTRICTION parameter
DATA restrict TYPE sscr_restrict.
Auxiliary objects for filling RESTRICT
DATA opt_list TYPE sscr_opt_list.
DATA *** TYPE sscr_***.
Define the selection screen objects
First block: 3 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK block_0 WITH FRAME TITLE text-bl0.
SELECT-OPTIONS sel_0_0 FOR sy-tvar0.
SELECT-OPTIONS sel_0_1 FOR sy-tvar1.
SELECT-OPTIONS sel_0_2 FOR sy-tvar2.
SELECT-OPTIONS sel_0_3 FOR sy-tvar3.
SELECTION-SCREEN END OF BLOCK block_0.
Second block: 2 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK block_1 WITH FRAME TITLE text-bl1.
SELECT-OPTIONS sel_1_0 FOR sy-subrc.
SELECT-OPTIONS sel_1_1 FOR sy-repid.
SELECTION-SCREEN END OF BLOCK block_1.
INITIALIZATION.
Define the option list
ALL: All options allowed
MOVE 'ALL' TO opt_list-name.
MOVE 'X' TO: opt_list-options-bt,
opt_list-options-cp,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-nb,
opt_list-options-ne,
opt_list-options-np.
APPEND opt_list TO restrict-opt_list_tab.
NOPATTERN: CP and NP not allowed
CLEAR opt_list.
MOVE 'NOPATTERN' TO opt_list-name.
MOVE 'X' TO: opt_list-options-bt,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-nb,
opt_list-options-ne.
APPEND opt_list TO restrict-opt_list_tab.
NOINTERVLS: BT and NB not allowed
CLEAR opt_list.
MOVE 'NOINTERVLS' TO opt_list-name.
MOVE 'X' TO: opt_list-options-cp,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-ne,
opt_list-options-np.
APPEND opt_list TO restrict-opt_list_tab.
EQ_AND_CP: only EQ and CP allowed
CLEAR opt_list.
MOVE 'EQ_AND_CP' TO opt_list-name.
MOVE 'X' TO: opt_list-options-cp,
opt_list-options-eq.
APPEND opt_list TO restrict-opt_list_tab.
JUST_EQ: Only EQ allowed
CLEAR opt_list.
MOVE 'JUST_EQ' TO opt_list-name.
MOVE 'X' TO opt_list-options-eq.
APPEND opt_list TO restrict-opt_list_tab.
Assign selection screen objects to option list and sign
KIND = 'A': applies to all SELECT-OPTIONS
MOVE: 'A' TO ***-kind,
'*' TO ***-sg_main,
'NOPATTERN' TO ***-op_main,
'NOINTERVLS' TO ***-op_addy.
APPEND *** TO restrict-***_tab.
KIND = 'B': applies to all SELECT-OPTIONS in block BLOCK_0,
that is, SEL_0_0, SEL_0_1, SEL_0_2
CLEAR ***.
MOVE: 'B' TO ***-kind,
'BLOCK_0' TO ***-name,
'I' TO ***-sg_main,
'*' TO ***-sg_addy,
'NOINTERVLS' TO ***-op_main.
APPEND *** TO restrict-***_tab.
KIND = 'S': applies to SELECT-OPTION SEL-0-2
CLEAR ***.
MOVE: 'S' TO ***-kind,
'SEL_0_2' TO ***-name,
'I' TO ***-sg_main,
'*' TO ***-sg_addy,
'EQ_AND_CP' TO ***-op_main,
'ALL' TO ***-op_addy.
APPEND *** TO restrict-***_tab.
KIND = 'S': Applies to SELECT-OPTION SEL_0_3
CLEAR ***.
MOVE: 'S' TO ***-kind,
'SEL_0_3' TO ***-name,
'I' TO ***-sg_main,
'N' TO ***-sg_addy,
'JUST_EQ' TO ***-op_main.
APPEND *** TO restrict-***_tab.
Call function module
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restrict
DB = ' '
EXCEPTIONS
too_late = 1
repeated = 2
not_during_submit = 3
db_call_after_report_call = 4
selopt_without_options = 5
selopt_without_signs = 6
invalid_sign = 7
report_call_after_db_error = 8
empty_option_list = 9
invalid_kind = 10
repeated_kind_a = 11
OTHERS = 12. -
How to Run a Select Query stored in a Variable
Hello,
I have a following requirement:
Result of one select query on Var1 , result of other select query in Var2 ,
if Va2 = 'value11' OR Var2 = 'Value2' then Var1 = 'select query'. Now how can I run this SQL query at the end of the Pl/SQL?
so I'm writing following query for the same:
DECLARE
qry nvarchar2(500);
result nvarchar2(500);
BEGIN
select 'select TEXTVAL as "CHARG" FROM TABLE1 WHERE LOC =''[ParameterValue]'' and KEYNAME =''<<REPLACE>>''' INTO qry from dual;
SELECT CASE WHEN count(RW."CountofBATCH") > 1 then 'Mixing'
WHEN count(RW."CountofMAT") = 0 then 'None'
ELSE 'Other'
END
INTO result
FROM TABLENAME2 TT, XMLTable('/Rowsets/Rowset/Row' PASSING TT.XMLCOL
COLUMNS
"CountofBATCH" PATH '/Row[CLABS > 0]/CHARG',
"CountofMAT" PATH '/Row[MATNR = "[Parameter Value]"]/MAT'
) AS RW
where
TT.PL = '[Parameter Value]' and
TT.TANK = '[Parametr Value]' ;
IF result = 'Mixing' OR result = 'None' THEN
qry := replace( qry , '<<REPLACE>> ' , result);
else
qry := 'Nothing';
END IF;
This way the variable qry will have select statement. Now How can I run this qry variable to get the output of that select statement in the same query?you can use execute immediate if the output of the query is in the single query.
that is very simple.
have the query in the signle string and then pass like this
declare
qry varchar2(255);
result varcharf2(2500);
vempid number :=1;
begin
qry:='select empname from emp where empid=:empid';
execute immediate qry into result using vempid;
-----now the data result is in result
end; -
How to Set ORACLE_SID in a Multiple Database Server
Hi experts,
This server has 3 10.2.0.4 databases on Windows. Of course 1 of those is the default db.
When I need to oracle_sid to one of the non-default databases I have problems.
Just now I ran: set ORACLE_SID = ultrarpt
But echo %ORACLE_SID% still shows the default database (ultratst).
I'm sure this is easy - how can I point to this database and then confirm that ORACLE_SID is indeed referencing that database?
Thanks, johnuser629010 wrote:
Hi experts,
This server has 3 10.2.0.4 databases on Windows. Of course 1 of those is the default db.
When I need to oracle_sid to one of the non-default databases I have problems.
Just now I ran: set ORACLE_SID = ultrarpt
But echo %ORACLE_SID% still shows the default database (ultratst).
I'm sure this is easy - how can I point to this database and then confirm that ORACLE_SID is indeed referencing that database?
Thanks, johnremove the spaces around the '='
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
c:\temp>echo %oracle_sid%
%oracle_sid%
c:\temp>set oracle_sid = mytest
c:\temp>echo %oracle_sid%
%oracle_sid%
c:\temp>set oracle_sid=mytest
c:\temp>echo %oracle_sid%
mytest
c:\temp> -
How i can Insert selected records in database table using check box.
Hi Friends,
I have non database block, which displayed multiple records, now I add a Check Box to this block and now I want to insert the records in a database table which I checked. So when I press a button, all the checked records are inserted in the table.
Please send me the code of this solution.
Thanks in advance.
ShahzadI have almost the exact scenario but instead of inserting into the DB, I want to find the Checked records and process them in PL/SQL script.
I currently have a cursor that looks for all the checked records. It's only getting the first record, so I figured I need to loop through the block looking for checked records.
Also can I save them to a temp or PL/SQL table to process later? -
How to run Unix Host commands from Database Triggers?
Hi
I need to create few directories in the Unix O/s under a specific directory (From a Database Trigger). And the directory names will be determined in the DB Trigger based on the data.
I hope someone would have come across a requirement like this and will be able to help me out.
Thanks.
MohanHi Christopher
How is it possible to use System calls from Triggers. Is it possible to use Runtime Libraries in DB Triggers.
Thanks
Mohan
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Christopher Racicot ([email protected]):
Try using the system calls available in
the C runtime library by calling an external
C procedure from the trigger. We will be
enhancing the support in UTL_FILE to address
issues like this in an upcoming release,
but for now an external procedure should
do the trick.<HR></BLOCKQUOTE>
null -
How to Connect crystal report with multiple databases?
I Think my question is really clear
I ask this because i think i already used every way logic in my head
ConnectionInfo
IConnectionInfo
PropertyBag
DataDefModel
Etc
i found Ludek's post about "Ras Connection Info Code" i think this will solve my case but still no luck
Dear Ludek i try your suggestion from here Until the "Ras Connection Info Code" give an Error
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at CodeBuilder_RasConnectionInfo.frmRasConnectionInfo.VBConnectionCode(ReportDocument boReportDocument) in C:\Reza\Development\CodeBuilder-RasConnectionInfo\Form1.vb:line 183
at CodeBuilder_RasConnectionInfo.frmRasConnectionInfo.btnLoadReport_Click(Object sender, EventArgs e) in C:\Reza\Development\CodeBuilder-RasConnectionInfo\Form1.vb:line 16
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
CodeBuilder-RasConnectionInfo
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Reza/Development/CodeBuilder-RasConnectionInfo/bin/Debug/CodeBuilder-RasConnectionInfo.exe
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
CrystalDecisions.CrystalReports.Engine
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.CrystalReports.Engine/13.0.2000.0__692fbea5521e1304/CrystalDecisions.CrystalReports.Engine.dll
CrystalDecisions.Shared
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.Shared/13.0.2000.0__692fbea5521e1304/CrystalDecisions.Shared.dll
CrystalDecisions.ReportAppServer.CommLayer
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CommLayer/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CommLayer.dll
CrystalDecisions.ReportAppServer.ClientDoc
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ClientDoc/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ClientDoc.dll
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
CrystalDecisions.ReportAppServer.Controllers
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.Controllers/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.Controllers.dll
CrystalDecisions.ReportAppServer.DataDefModel
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataDefModel.dll
CrystalDecisions.ReportAppServer.DataSetConversion
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataSetConversion/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataSetConversion.dll
CrystalDecisions.ReportAppServer.CubeDefModel
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CubeDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CubeDefModel.dll
CrystalDecisions.ReportAppServer.ReportDefModel
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ReportDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ReportDefModel.dll
log4net
Assembly Version: 1.2.10.0
Win32 Version: 1.2.10.0
CodeBase: file:///C:/Windows/assembly/GAC_32/log4net/1.2.10.0__692fbea5521e1304/log4net.dll
System.Web
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
CustomMarshalers
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_32/CustomMarshalers/2.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
i don't know what happen
is there any way to solve my case??
actually i only need 3 databases connected in my report
in each databases i insert about 3 - 8 command
i'm using VS2010 Ultimate
CR Version=13.0.2000.0 (ASP.Net)
SQL Server Standard Edition 10.50.2500.0
and
SQL Server Standard Edition 10.50.1600.1 to test move the datasources
can someone give me an enlightment about my case
every suggestion would be great
Thanks
ZealJust as an FYI. there is a utility that will actually write the code out for you. See KBA 1553921 - Is there a utility that would help in writing database logon code?
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
Hi all,
Just having recently upgraded to 11.1.2.2, I'm just trying to update our batch files to automate the running of some business rulesets using CalcMgrCmdLineLauncher.cmd. I can get business rules working ok, and rulesets that only run rules within the same database working, but I can't seem to get the rulesets running where the rules are running against multiple databases.
I know the syntax is CalcMgrCmdLineLauncher.cmd -f:%PWD% /A:%PlanAPP% /U:%RUNUSR% /D:%EssbCapexDB% /S:%BR%
but for the /D: argument, putting one of the databases in there doesnt work.
The batch runs, it even says its successful in the log but its too quick and looking at the job console it didnt run.
I can run the ruleset manually no problems.
Anyone know how to fix this?
ThanksOne stated to "search cmd, right click, and run as admininstrator" but where is this?
In the search field in your Vista start menu, type cmd
Next, right-click on the cmd that comes up and select "Run as administrator". -
Multiple database updates vesus Tansaction
Hi,
I need some help from you great minds. Here us what I am trying to accomplish:
I have a message driven bean which does a multiple update calls to an Oracle database.
I want to commit all the db updates only at the end (after all update calls execute
okay) and if there occurs any problem in any of the update calls, I want to rollback
all the previously successful update calls I have already made. I am using container
managed transaction via a mdb.
I tried to use UserTransaciom.setRollbackOnly() call but that did not completely
help. This call rolled back the message altogether. All I wanted to do is, if
there occurs any error during a database update, rollback just the database changes
and just throw away the message. Is there a way I can just rollback the database
changes? Any suggestions?? please. Thanks
If I understand correctly what you want to do, is the purpose to do some task or run some script in multiple databases on the same server?
If so, this is done easily by listing the database (sids) in a file and reading the file in a loop statement.
In my case, I simply create a file on the server called localsids. I keep this in /var/opt/oracle directory.
Then, in my script, I set:
SIDFILE='/var/opt/oracle/localsids'
NEWPASS=`cat $HOME/.xlh/sys`
# This loop reads through the 'sidlist' and then looks for a password
# stored in a separate directory for each sid, but if individual
# directories do not exist, then it uses the standard system password.
# It then opens a sqlplus session for each sid (as it loops through the
# sidfile and executes some sql statement(s), or executes a sql script.
cat $SIDFILE | while read SID
do
ORACLE_SID=$SID
export ORACLE_SID
echo $SID # this is only for my own verbose purposes
sqlplus -s system/manager@$SID <<EOF > /tmp/chg_passwd_${SID}.sql
alter user system identified by $NEWPASS
alter user sys identified by $NEWPASS
EOF
done
exit
# In the above example, i am changing the sys and system passwords for all databases listed in the localsids file.
Hope this helps...
ji li
Message was edited by: ji li to simplify the example...
I have simplified the above example to hardcode the system password into this script, however, normally I would never do this in real practice. This is just as an example to simplify how to run a loop to run a common script or sql statement in each database.
Maybe you are looking for
-
Presence status not changed when using Lync 2010 Remote Call Control
Hello, I'm currently testing the Remote Call Control functionality of Lync 2010. Call management works fine but I'm surprised that my presence status does not change to "In a Call" when the call is established. OriginatedEvent, DeliveredEvent and Est
-
Office for mac lion compatibility
Will office for mac be compatible with "versions", the new feature from os lion?
-
Assignment of Profit center in cost center
Hello Friends, What is the significance of assignment of profit center in cost center ? System does not allow me to post activity prices in KP26 without assignment of profit center to cost center. It gives error that "Profit center 1000/DUMMY_PCA do
-
Maximum no'of Objects for one class
Hello friends Please, tell me....Maximum no'of Obects for One Java class. Thanks & Regards S.Rajakrishna
-
Change Struts DTDs to 1.3 version
Hi there, is it possible to upgrade struts support in JDeveloper (10.1.3.1) to support versión 1.3 DTDs? I get many warnings as I guess JDeveloper supports previous DTD versions. (For example, module parameter in <forward> tag) Thanks, Ignacio