Database names in a combobox
Hi Everybody,
I really need your help!!!
I'm wondering if it's possible in Java to read all the database names that are installed in the computer. For example, I have about 3 databases in DB2 with the names: AAA, BBB, CCC and I want to put these names in a Combobox so that I can choose to which one to connect.
Connecting to the database or adding Items to the Combobox is not a problem , but I don't know how to get the names dynamically, I mean to avoid writing the names of the databases in a file.
Thanks in advance for any help
alina
IF your DB2 JDBC driver supports it then you can use java.sql.DatabaseMetaData to get the names of databases. Use the method getCatalogs()
Similar Messages
-
Passing the database name as a PL/SQL procedure parameter
How do I pass the name of the database as a parameter to a procedure?
If dbs is the variable name to which I pass the database name as shown in the example,
CREATE OR REPLACE PROCEDURE Extract_gl_acct_Tbl(dbs varchar2)
and I use dbs in the code as follows,
SELECT ACCOUNT,
SETID
FROM SYSADM.PS_GL_ACCOUNT_TBL@dbs
It gives me an error saying 'ORA-04054: database link DBS does not exist'.You will need to use dynamic SQL to handle this:
create or replace ...
is
type rc is ref cursor;
v_rc rc;
begin
open v_rc for 'select ... from sysadm.ps_gl_account_tbl@' || dbs;
fetch v_rc into ... -- some variables
-- if multiple rows, you'll need to do the fetch in a loop and exit when v_rc%notfound.
close v_rc;
end; -
[Symptom]
======================
In Exchange 2007, when you want to export mailbox to a .pst file, you should run the
Export-Mailbox cmdlet from a 32-bit computer that has the following installed:
The 32-bit version of the Exchange management tools
Microsoft Office Outlook 2003 SP2 or later versions
If not, you may encounter the following error message:
You check that you have these required installed, but you get the error below when you run Export-Mailbox in EMS.
“The specified mailbox database [Mailbox Database Name] does not exist.”
[Cause Analysis]
=======================================
This is because that the account you use to run Export-Mailbox cmdlet don’t have the Exchange Server Administrator role assigned.
You can check if this account has been delegated the Exchange Server Administrator role through the following path.
EMC -> Organization Configuration-> Check permissions in the result pane.
To delegate this Exchange Server Administrator role, right click on the
Organization Configuration node and choose Add Exchange Administrator,
you will see the Add Exchange Administrator window.
[More Information]
==============================
Export-Mailbox
http://technet.microsoft.com/en-gb/library/aa998579(v=exchg.80).aspx
How to Export and Import mailboxes to PST files in Exchange 2007 SP1
http://blogs.technet.com/b/exchange/archive/2007/04/13/3401913.aspx
Exchange 2007 cannot export pst files via its powershell
http://social.technet.microsoft.com/Forums/forefront/en-US/b3bc0dce-35f3-4a69-9a33-4f2a855b9f94/exchange-2007-cannot-export-pst-files-via-its-powershell?forum=exchangesvrgenerallegacy
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.Hi,
Based on my test, if you make the user the owner of the database (rather than a user with the db_owner role), when you create a query, it creates it under the dbo schema rather than DOMAIN\username.
Steps to do so (in Management Studio):
Right click database, select Properties
Click File
Change Owner in the textbox
OK to confirm
Downside - other users under db_owner role will still have their username appended. So schemas have to be created for these users.
Jaynet Zhang
TechNet Community Support -
How to develop a report in Crystal with flexible database name?
Hello
I am a Project Manager of a project of developing reports in Crystal 11.
The idea is to develop reports on top of the content in MS SQL tables.
The initial testing and demonstration to the customer is done within the Crystal development environment.
In a later stage, we need to integrate the reports with C# WPF application, using Crystal control.
We currently use ODBC connections.
We want the flexibility to set the actual database dynamically, by using the "default database" of the ODBC connection (or any other way). In other words, we want not just the flexibility to change the database server, but work with different database names, like "ProductDB_TEST", "ProductDB_PROD" etc. - without changing the report.
Unfortunately, we got the answer from the developer that the database name should be pre-defined for a given report. Although the connection can be set to another server, the DB name cannot be set dynamically.
Looking into the "Database" -> "Show SQL Query" menu, we see the following piece inside the query:
INNER JOIN "DATABASE_NAME"."dbo"."IncidentTypeSnapshotData"
So it looks like the query itself contains the DB name.
Is it really a limitation of Crystal, or rather the developer working on the project doesn't know the trick?
Thanks for any hint
MaxCR CR 2011 / "Crystal reports For Visual Studio 2010", you are correct.
Re. the database thinggy. You can connect to a database via ODBC, OLE DB or in some instances natively. Once a report is created you an change the datasource. A good sample app on how to do this is csharp_win_dbengine / vb_win_dbengine. A link to the samples is here:
Crystal Reports for .NET SDK Samples - Business Intelligence (BusinessObjects) - SCN Wiki
More info on connecting to dbs and changing them is in the developer help files:
SAP Crystal Reports .NET SDK Developer Guide
SAP Crystal Reports .NET API Guide
More info on CR APIs for .NET (applies to all versions of CR and VS):
Crystal Reports for Visual Studio 2005 Walkthro... | SCN
You can also use ADO .NET Datasets and in this way you handle the database connections in your app. A good sample is csharp_win_adodotnet (also available in VB) - same link as above.
More info on datasets:
Crystal Reports Guide To ADO.NET
Crystal Reports for Visual Studio .NET - Walkthrough - Reporting Off ADO.NET Datasets
For more complicated operations (e.g.; changing a report from ODBC to OLE DB, changing one table, etc., you will want to use the InProc RAS SDK that is also available in CRVS. Developer help files are here:
Report Application Server .NET SDK Developer Guide
Report Application Server .NET API Guide
Sample apps are here:
NET RAS SDK Samples - Business Intelligence (BusinessObjects) - SCN Wiki
and here:
Crystal Reports .NET In Process RAS (Unmanaged) SDK Sample Applications
More info on RAS SDK:
How to Use The RAS SDK .NET With In-Process RAS Server
Lastly, do use the search box in the top right corner. I find simple search strings such as 'crystal net parameter' return best results (KBAs, Blogs, docs, wikis, discussions and more).
- Ludek -
How can I get a list of database names from environment
Hi,
How can I get a list of database names from environment.
I had found a method in JE API Docs named Environment.getDatabaseNames(), and i couldn't found the same method in Berkeley DB.
I use java interface, is it supported?
Thanks.Hello,
I don't know if it would work for you, but have you checked the db_archive utility at:
http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/db_archive.html
Check the -s option.
Thanks,
Sandra -
Can we enable Database Name box while scheduling report
Hi, I am boxi administrator and I am working on a unique client requirement. I don't know if it needs to be in administration forum or crystal reports. we are using crystal reports and We are on boxi R2 SP3 on IIS.
We have 8 DB servers for load balancing ( look www.intersystems.com for details of how). We want to publish report in BOXI and user will then schedule report. We don't want multiple copies as it will be difficult to maintain at several places. So please rule out the possibility of 8 copies of same Crystal report connected to each 8 DB servers.
When user schedules report then we want to load balance the DB servers i.e. we have defined 8 ODBC connections on each application servers and want to use all ODBC ( DB) for each report. When we schedule reports then I see server name and Database name is disabled in Database logon properties.
Please let me know if this is possible. We will be using standard infoview to schedule reports.
Thanks,This is not feasible. I figured out one option that is using Virtual IP with Load balancer. We can load balance ODBC using this. This is tested in another project of state govt.
Thanks, -
Hi gurues, I'm facing this issue with an IDES on MaxDB with Windows.
System was up and running until someone tries to make an upgrade of the kernel. Since then we can not start our system. we tried to rollback kernel release to the previous one but it didn't work.
When we start our system from MMC console we can see all process in green but work processes are in RUN state and after a few minutes they goes down with the following error
trc file: "dev_w0", trc level: 1, release: "701"
ACTIVE TRACE LEVEL 1
ACTIVE TRACE COMPONENTS all, MJ
B
B Mon May 16 23:57:31 2011
B create_con (con_name=R/3)
B Loading DB library '
sirillium1\sapmnt\SED\SYS\exe\uc\NTAMD64\dbsdbslib.dll' ...
B Library '
sirillium1\sapmnt\SED\SYS\exe\uc\NTAMD64\dbsdbslib.dll' loaded
B Version of '
sirillium1\sapmnt\SED\SYS\exe\uc\NTAMD64\dbsdbslib.dll' is "700.08", patchlevel (0.24)
B New connection 0 created
M sysno 00
M sid SED
M systemid 562 (PC with Windows NT)
M relno 7010
M patchlevel 0
M patchno 32
M intno 20020600
M make: multithreaded, Unicode, 64 bit, optimized
M pid 212
M
M kernel runs with dp version 241000(ext=110000) (@(#) DPLIB-INT-VERSION-241000-UC)
M length of sys_adm_ext is 576 bytes
M ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 212) [dpxxdisp.c 1348]
I MtxInit: 30000 0 0
M DpSysAdmExtCreate: ABAP is active
M DpSysAdmExtCreate: VMC (JAVA VM in WP) is not active
M DpShMCreate: sizeof(wp_adm) 22784 (1752)
M DpShMCreate: sizeof(tm_adm) 5912704 (29416)
M DpShMCreate: sizeof(wp_ca_adm) 24064 (80)
M DpShMCreate: sizeof(appc_ca_adm) 8000 (80)
M DpCommTableSize: max/headSize/ftSize/tableSize=500/16/552064/552080
M DpShMCreate: sizeof(comm_adm) 552080 (1088)
M DpSlockTableSize: max/headSize/ftSize/fiSize/tableSize=0/0/0/0/0
M DpShMCreate: sizeof(slock_adm) 0 (104)
M DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
M DpShMCreate: sizeof(file_adm) 0 (72)
M DpShMCreate: sizeof(vmc_adm) 0 (1864)
M DpShMCreate: sizeof(wall_adm) (41664/36752/64/192)
M DpShMCreate: sizeof(gw_adm) 48
M DpShMCreate: SHM_DP_ADM_KEY (addr: 000000000B2C0050, size: 6607136)
M DpShMCreate: allocated sys_adm at 000000000B2C0050
M DpShMCreate: allocated wp_adm at 000000000B2C2270
M DpShMCreate: allocated tm_adm_list at 000000000B2C7B70
M DpShMCreate: allocated tm_adm at 000000000B2C7BD0
M DpShMCreate: allocated wp_ca_adm at 000000000B86B450
M DpShMCreate: allocated appc_ca_adm at 000000000B871250
M DpShMCreate: allocated comm_adm at 000000000B873190
M DpShMCreate: system runs without slock table
M DpShMCreate: system runs without file table
M DpShMCreate: allocated vmc_adm_list at 000000000B8F9E20
M DpShMCreate: allocated gw_adm at 000000000B8F9EA0
M DpShMCreate: system runs without vmc_adm
M DpShMCreate: allocated ca_info at 000000000B8F9ED0
M DpShMCreate: allocated wall_adm at 000000000B8F9EE0
M
M Mon May 16 23:57:32 2011
M rdisp/queue_size_check_value : -> off
M ThTaskStatus: rdisp/reset_online_during_debug 0
X EmInit: MmSetImplementation( 2 ).
X MM global diagnostic options set: 0
X <ES> client 0 initializing ....
X Using implementation view
X <EsNT> Using memory model view.
M <EsNT> Memory Reset disabled as NT default
X ES initialized.
M ThInit: running on host sirillium1
M
M Mon May 16 23:57:33 2011
M calling db_connect ...
C
C DBSDBSLIB : version 700.08, patch 0.024 (Make PL 0.32)
C MAXDB shared library (dbsdbslib) patchlevels (last 10)
C (0.024) Default value for max. input variables is 2000 (note 655018)
C (0.024) Profile parameter to define max. input variables (note 655018)
C (0.024) Switch SQLMODE after CREATE INDEX SERIAL (note 1267841)
C (0.024) Input parameters for SQL statements increased (note 655018)
C (0.018) Create index serial for MaxDB 7.6 (note 1267841)
C (0.018) More trace in case of packed to string conversion error (note 1262799)
C (0.016) R3trans export aborts with signal 6 (note 1262245)
C (0.009) IA64 alignment errors (note 1245982)
C (0.007) Support DB-Type 'SAP DB' by UPDSTAT (note 1225668)
C
C
C Loading SQLDBC client runtime ...
C SQLDBC SDK Version : SQLDBC.H 7.6.0 BUILD 007-123-091-175
C SQLDBC Library Version : libSQLDBC 7.6.5 BUILD 015-123-202-938
C SQLDBC client runtime is MaxDB 7.6.5.015 CL 202938
C SQLDBC supports new DECIMAL interface : 0
C SQLDBC supports VARIABLE INPUT data : 1
C SQLDBC supports keepAlive indicator : 0
C INFO : SQLOPT= -I 0 -t 0 -S SAPR3
C Try to connect (DEFAULT) on connection 0 ...
C *** ERROR => Connect to database failed, rc = -10709 (Connection failed (RTE:Database name is missing))
[dbsdbsql.cpp 137]
B ***LOG BV3=> severe db error -10709 ; work process is stopped [dbsh#2 @ 1203] [dbsh 1203 ]
B ***LOG BY2=> sql error -10709 performing CON [dblink#3 @ 431] [dblink 0431 ]
B ***LOG BY0=> Connection failed (RTE:Database name is missing) [dblink#3 @ 431] [dblink 0431 ]
M ***LOG R19=> ThInit, db_connect ( DB-Connect 000256) [thxxhead.c 1449]
M in_ThErrHandle: 1
M *** ERROR => ThInit: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c 10563]
M
M Info for wp 0
M
M pid = 212
M severity = 0
M status = 0
M stat = WP_RUN
M waiting_for = NO_WAITING
M reqtype = DP_RQ_DIAWP
M act_reqtype = NO_REQTYPE
M rq_info = 0
M tid = -1
M mode = 255
M len = -1
M rq_id = 65535
M rq_source =
M last_tid = 0
M last_mode = 0
M semaphore = 0
M act_cs_count = 0
M csTrack = 0
M csTrackRwExcl = 0
M csTrackRwShrd = 0
M mode_cleaned_counter = 0
M control_flag = 0
M int_checked_resource(RFC) = 0
M ext_checked_resource(RFC) = 0
M int_checked_resource(HTTP) = 0
M ext_checked_resource(HTTP) = 0
M report = > <
M action = 0
M tab_name = > <
M attachedVm = no VM
M
M *****************************************************************************
M *
M * LOCATION SAP-Server sirillium1_SED_00 on host sirillium1 (wp 0)
M * ERROR ThInit: db_connect
M *
M * TIME Mon May 16 23:57:33 2011
M * RELEASE 701
M * COMPONENT Taskhandler
M * VERSION 1
M * RC 13
M * MODULE thxxhead.c
M * LINE 10783
M * COUNTER 1
M *
M *****************************************************************************
M
M PfStatDisconnect: disconnect statistics
M Entering TH_CALLHOOKS
M ThCallHooks: call hook >BtcCallLgCl< for event BEFORE_DUMP
M ThCallHooks: call hook >ThrSaveSPAFields< for event BEFORE_DUMP
M *** ERROR => ThrSaveSPAFields: no valid thr_wpadm [thxxrun1.c 723]
M *** ERROR => ThCallHooks: event handler ThrSaveSPAFields for event BEFORE_DUMP failed [thxxtool3.c 261]
M Entering ThSetStatError
M ThIErrHandle: do not call ThrCoreInfo (no_core_info=0, in_dynp_env=0)
M Entering ThReadDetachMode
M call ThrShutDown (1)...
M ***LOG Q02=> wp_halt, WPStop (Workproc 0 212) [dpnttool.c 334]
We check several entries on this SDN site, and look for a lot of notes on the marketplace, and they always are related to default user in xuser files, but our xuser list output is ok. We have a DEFAULT connection to SAPSID user, a DBM connection to CONTROL user and a USERDBA connection.
XUSER Entry 1
Key :DEFAULT
Username :SAPSID
UsernameUCS2:S.A.P.S.E.D. . . . . . . . . . . . . . . . . . . . . . . . . . .
Password :?????????
PasswordUCS2:?????????
Dbname :SID
Nodename :server1
Sqlmode :SAPR3
Cachelimit :-1
Timeout
Isolation
Charset :<unspecified>
XUSER Entry 2
Key :c
Username :CONTROL
UsernameUCS2:C.O.N.T.R.O.L. . . . . . . . . . . . . . . . . . . . . . . . . .
Password :?????????
PasswordUCS2:?????????
Dbname :SID
Nodename :server1
Sqlmode :INTERNAL
Cachelimit :-1
Timeout :-1
Isolation :-1
Charset :<unspecified>
XUSER Entry 3
Key :c_J2EE
Username :CONTROL
UsernameUCS2:C.O.N.T.R.O.L. . . . . . . . . . . . . . . . . . . . . . . . . .
Password :?????????
PasswordUCS2:?????????
Dbname :SID
Nodename :server1
Sqlmode :SAPR3
Cachelimit :-1
Timeout
Isolation
Charset :<unspecified>
XUSER Entry 4
Key :w
Username :SUPERDBA
UsernameUCS2:S.U.P.E.R.D.B.A. . . . . . . . . . . . . . . . . . . . . . . . .
Password :?????????
PasswordUCS2:?????????
Dbname :SID
Nodename :server1
Sqlmode :INTERNAL
Cachelimit :-1
Timeout :-1
Isolation :-1
Charset :<unspecified>
Any idea? we are out of ideas at this moment.
Regards
Edited by: Gustavo Goicochea on May 17, 2011 6:37 PMNatalia, this system was not resored nor copied, it was up and running before kernel update. We did some of the tests you said and someothers, here are some outputs.
We update kernel to release 142
R3trans -d and -x exit with (all with user SIDADM)
SVERS table does exist and belongs to SAPSID
dbmcli on SID>sql_execute select * from domain.tables where tablename='SVERS'
OK
END
'SAPSID';'SAPSID';'SVERS';'';'TABLE';'TABLE';'20100406';'00054637';'20100406';'00054637';'20100406';'00054638';'NO';(null);20000;(null);x'0000000000004842';'NO';'NO';'YES';'NO';(null)
Why it still says that SVERS table does not exist and SQL error 942?
C Now I'm connected to SAP DB
C 00: server1-SID, since=20110518015619, ABAP= <unknown> (0)
B Connection 0 opened (DBSL handle 0)
C *** ERROR => prepare() of C_0000, rc=1, rcSQL=-942 (POS(28) Unknown table name:SVERS) [
dbsdbsql.cpp 1604]
C *** ERROR => SQL PREPARE on connection 0, rc=-942 (POS(28) Unknown table name:SVERS) [dbslsdb.cpp 7253]
C sc_p=000000000CFAECC0,no=0,idc_p=0000000000000000,con=0,act=0,slen=34,smax=256,#vars=0,stmt=0000000002EA0AF0,table=SVERS
C SELECT VERSION INTO ? FROM SVERS ;
B ***LOG BZA=> table SVERS does not exist on database [dblink#4 @ 1301] [dblink 1301 ]
M ***LOG R19=> ThInit, db_connect ( DB-Connect 004096) [thxxhead.c 1515]
M in_ThErrHandle: 1
M *** ERROR => ThInit: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c 10824]
M
Users seem to be ok
dbmcli on SID>sql_execute SELECT username, usermode FROM users
OK
END
'CONTROL';'ADMIN'
'SUPERDBA';'SYSDBA'
'SAPSID';'DBA'
'SAPR3';'DBA'
User SAPR3 does not have anything on database
dbmcli on SID>sql_execute select * from domain.tables where owner='SAPR3'
ERR
-24988,ERR_SQL: SQL error
100,Row not found
Any idea?
regards -
How can I get a report to use a DSN instead of a database name?
DSNs are great things. By using a DSN in a database connection string, you don't have to worry about what happens if you have to look at a different database, or if a database name changes. All you have to do is change the database the DSN points to, and everything that was built using that DSN still works.
Everything, that is, except Crystal Reports.
I am using CR XI. Our customer's database is named "Anneal", and it uses PostgreSQL. I have several copies of that database, taken at different times and for different purposes, on my machine: "Anneal", "AnnealTest", "Anneal_2_8_10", and on and on. I also have a DSN named "WinCaps". The reorts I have developed for this customer were set up to use an ODBC connection based on the WinCaps DSN. But if WinCaps pointed to the "AnnealTest" database when it the report was created, and then I delete the AnnealTest database and change the WinCaps DSN to point to a database named "Anneal", and then try to open the report, I get a complaint that the AnnealTest database does not exist! Yes, I know it doesn't exist. I am expecting CR to use the DSN I told it to use, which should get me to the Anneal database.
The fact that CR complains about the AnnealTest database tells me that internally, CR is retrieving the actual name of the database and storing that instead of storing the DSN name, completely defeating the purpose of the DSN.
Is there any way I can set up my report to use whatever database the DSN happens to be pointing to, instead of the database the DSN pointed to at design time?
Thanks very much!
Rob RichardsonHi Rob,
Crystal assumes you are setting location to the database and it stays that way when run. Yes we do keep the connection info in the RPT file.
There's a few options that may help. First, can you upgrade to CR XI R2? It' still supported...
Go to this link: http://www.sdn.sap.com/irj/boc and download the trial version of CR XI R2 and use your XI keycode, then apply the patches which you can get to by clicking on the BusinessObjects tab above, then Downloads.
Direct link to the Trial version: http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
Second, in the report itself check on the Verify on first refresh, save the report and then test it on another PC connecting another database.
Next option to to try these registry key changes, usual warnign about altering the registry:
HKEY_CURRENT_USERSoftwareBusiness ObjectsSuite 11.0Crystal ReportsDatabaseOptions - VerifyWhenDBDriverUpgraded = Yes
And try changing this one also - DontAutoConvertODBC = Yes
Close the Designer first or your changes won't stay.
THey may have to simply verify the data manually and then save the report so the updated location info is saved in the Report.
Crystal is very database dependant obviously so asumming changes made to the DSN are automatically updated can cause a lot of issues for the end user also but it depends on your point of view. We consider this working as expected.
Thank you
Don -
How to display database name in page footer in webi report
Hi Every one,
I have migrated deski report from BO 6.5 to BI 4.1. and converted Deski to WEBI in 4.1.
In Bo 6.5 page footer displaying database name but BI 4.1 it showing database type (like Oracle 10g,9i ..etc..).
I want database name in page footer.
Please any one help me to solve this issue.
ThanksHi Thanks for your reply.
We have tried this option but its not helpful.
Below syntax is in both BO 6.5 and BI 4.1.but in 6.5 it showing database name where as in BI 4.1 it showing database type
="Track GPQ Database - " + Upper(Substr(Connection((DataProvider(([product])))) ;Pos(Connection((DataProvider(([Product])))) ;"DATABASE")+9 ;7)). -
Can we rename the database name in oracle 10g
Hi,
Can we rename the database name in oracle 10g.
Please helpYes as already said, using DBNEWID Utility can renamed the database name.
You can also take a look at the Oracle Metalink Note:429674.1 (Which was written by me) - Subject: How We Used the Oracle DBNEWID Utility to Change the Database Name
Regards,
Sabdar Syed. -
hi experts,
pls give me the main logical databases names used for taking reports using SAP query in sq02.
ex hr- pnp,material ckm etcHi
Check the tables related to LDB's
LDBS
LDBT
T0220
see the doc on LDB
A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.
LDB offers an easy-to-use selection screens. You can modify the pre-generated selection screen to your needs. It offers check functions to check whether user input is complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for data base accesses. Enhancements such as improved performance immediately apply to all report programs that use the logical database.
Less coding s required to retrieve data compared to normal internel tables.
Tables used LDB are in hierarchial structure.
Mainly we used LDBs in HR Abap Programming.
Where all tables are highly inter related so LDBs can optimize the performance there.
Check this Document. All abt LDB's
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fabap%2fabap-code-samples%2fldb+browser.doc
GO THROUGH LINKS -
http://www.sap-basis-abap.com/saptab.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Re: **LDB**
www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html
www.sap-img.com/abap/abap-interview-question.htm
www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm
Gothru the blog which provides info on LDB's:
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Reward points for useful Answers
Regards
Anji -
SQL script based on hostname and database name?
I am trying to write a script that I can run on several unix servers and databases that will do different sql statements based on which server and database it is being run in.
Something like:
if hostname = 'A' and database name = 'D' then do this
else if hostname = 'B' and database name = 'F' then do that
I have tried many diifferent combinations of shell scripts and sql scripts but can't seem to get anything that works.
Can someone help me out? Thanks.Since you are already able to get he db and host info, you are well on your way to branching based on that information. All you need is the basic framework:
declare
db VARCHAR2(30);
host VARCHAR2(30);
sqlcmd VARCHAR2(4000);
begin
select sys_context('userenv','host') host
, sys_context('userenv','db_name') db_name
into host
, db
from dual;
case
when db = 'XE' and host = 'mypc' then
sqlcmd := q'[local_package.do_something('parm1', :db, :host)]';
execute IMMEDIATE sqlcmd USING db, host;
when db = 'DEV' and host in ('serv1','serv2') then
sqlcmd := q'[different_packge.do_something('parm1', :db, :host)]';
execute IMMEDIATE sqlcmd USING db, host;
else
dbms_output.put_line('unrecognized db/host combination: '||db||', '||host);
end case;
end;
/In this example I've used dynamic SQL since not all instances are guaranteed to have any or all of the package procedures referenced in the dynamic sql. With out the dynamic sql, you would get errors and be unable to run the script on any instance lacking one or more of the reference package procedures.. -
I can not connect to the database via C#. The database is showing full path of the database file instead of the database name. See the pic: a database showing only name 'emart' and the other database showing the full path.
: RobbyHi,
According to your post, I know that the database name is showing file path of the database rather than the database name in SQL Server Management Studio. You were not able to
establish a connection to the database using C#.
As Olaf said, was any error message thrown out when the connection failed? How did you create these databases?
You can use the following T-SQL to attach the database and see if the issue persists.
CREATE DATABASE
databasename
ON (FILENAME = 'filepath _Data.mdf'),
(FILENAME = 'filepath_Log.ldf')
FOR ATTACH;
Thanks.
Tracy Cai
TechNet Community Support -
Hi Gurus
I am using oracle 10g on Windows platform. The issue is I need to change my database name. When i gone through the Oracle docs I found there is an utility called 'DBNEWID' . But not getting a clear cut idea. Since my DB is So critical anybody please tell me the exact steps to change the DB-Name.
Thanks & Cheers
AntonyChanging Only the Database Name
C:\>SQLPLUS/NOLOG
SQL*Plus: Release 10.1.0.2.0 - Production on Tue Aug 22 10:54:38 2006
Copyright (c) 1982, 2004, Oracle. All rights reserved.
SQL> CONN / AS SYSDBA
Connected.
SQL> SELECT DBID,NAME FROM V$DATABASE;
DBID NAME
1230404613 DB01
SQL> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
Must be : Take Whole Database Backup (Oracle Recommended)
Otherwise u lost ur database.
SQL> STARTUP MOUNT;
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
Database mounted.
--Go Command Prompt
DBNEWID UTILITY >>>NID ( OS Path : d:\oracle\product\10.1.0\db_1\bin\nid)
C:\>SET ORACLE_SID=DB01
C:\>NID TARGET=SYS/ORACLE@DB01 DBNAME=ORADB01 SETNAME=YES
DBNEWID: Release 10.1.0.2.0 - Production
Copyright (c) 2001, 2004, Oracle. All rights reserved.
Connected to database DB01 (DBID=1230404613)
Connected to server version 10.1.0
Control Files in database:
D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\CONTROL01.CTL
D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\CONTROL02.CTL
D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\CONTROL03.CTL
Change database name of database DB01 to ORADB01? (Y/[N]) => Y
Proceeding with operation
Changing database name from DB01 to ORADB01
Control File D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\CONTROL01.CTL - modified
Control File D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\CONTROL02.CTL - modified
Control File D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\CONTROL03.CTL - modified
Datafile D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\SYSTEM01.DBF - wrote new name
Datafile D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\UNDOTBS01.DBF - wrote new nam
e
Datafile D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\SYSAUX01.DBF - wrote new name
Datafile D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\USERS01.DBF - wrote new name
Datafile D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\TEMP01.DBF - wrote new name
Control File D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\CONTROL01.CTL - wrote new
name
Control File D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\CONTROL02.CTL - wrote new
name
Control File D:\ORACLE\PRODUCT\10.1.0\ORADATA\DB01\CONTROL03.CTL - wrote new
name
Instance shut down
Database name changed to ORADB01.
Modify parameter file and generate a new password file before restarting.
Succesfully changed database name.
DBNEWID - Completed succesfully.
Set the DB_NAME initialization parameter in the initialization parameter file (PFILE) to the new database name.
Note:
The DBNEWID utility does not change the server parameter file (SPFILE). Therefore, if you use SPFILE to start your Oracle database, you must re-create the initialization parameter file from the server parameter file, remove the server parameter file, change the DB_NAME in the initialization parameter file, and then re-create the server parameter file.
---Create New Password File
cmd>orapwd file=d:\oracle\product\10.1.0\db_1\database\pwddb01.ora password=oracle entries=5
SQL> STARTUP PFILE=D:\Oracle\product\10.1.0\Db_1\database\initdb01.ora
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145488364 bytes
Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
Database mounted.
Database opened.
SQL> select dbid,name from v$database;
DBID NAME
1230404613 ORADB01
Note:
After Change DB Name Take Whole Database bkp.
Note: If i am missing some step or write wrong step plz. correct me.
Before doing this refer documentation.
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/dbnewid.htm
thanx
Message was edited by:
user526020
null -
ORA-01506: missing or illegal database name
Hi Gurus/Experts,
I am implementing dataguard for digaster consideration for my primary database mydb. I have changed some initilization parameter for this implementation and while doing this when I changed a paraneter like below:
SQL> alter system set db_file_name_convert="'/u01/app/oracle/oradata/mydb_un', '/u01/app/oracle/oradata/orcl_un'" scope=spfile;
System altered.
Because this parameter is static so I have restart my database with startup force option. But I am getting belwo error.:
SQL> startup force
ORA-01506: missing or illegal database name
Below is my entries in $ORACLE_HOME/dbs location :
hc_mydb.dat initmydb.ora init.ora lkMYDB lkMYDB_UN orapwmydb spfilemydb.ora
And below is my current pfile entry:
[oracle@localhost dbs]$ more initmydb.ora
mydb.__db_cache_size=67108864
mydb.__java_pool_size=4194304
mydb.__large_pool_size=4194304
mydb.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
mydb.__pga_aggregate_target=171966464
mydb.__sga_target=243269632
mydb.__shared_io_pool_size=0
mydb.__shared_pool_size=155189248
mydb.__streams_pool_size=4194304
*.audit_file_dest='/u01/app/oracle/admin/mydb/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/mydb/control01.ctl','/u01/app/oracle/flash_recovery_area/mydb/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='mydb'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4294967296
*.db_unique_name='mydb_un'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=mydbXDB)'
*.log_archive_config='DG_CONFIG=(mydb_un,orcl_un)'
*.log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST REOPEN=8 MAX_FAILURE=4'
*.log_archive_dest_2='SERVICE=orcl delay=10 db_unique_name=orcl_un'
*.memory_target=413138944
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
Please help me to get it relsove and let me know what wrong I did.
Regards,
MichelHi Mseberg,
As of now I do not have standby INIT file and one which INIT file which I am showing here that's for my primary database i.e mydb. I would like to let you know I am planning to implement dataguard where mydb would be my primary database ad orcl would be my stabd by database. Before creating standby database I am preparing all initilization parameter in my primary database.
I have started my database with SYSDBA but still getting the same error. Please check below:
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [oracle] ? mydb
The Oracle base for ORACLE_HOME=/u01/home/oracle/product/11.2.0/db_1 is /u01/app/oracle
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Jan 5 00:15:12 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-01506: missing or illegal database name
Regards,
Michel
Maybe you are looking for
-
International Calls cannot make
I have the new windows skype client. and cannot make anymore international calls. any suggestions.
-
My MG8120 won't print wirelessly from my MacBook running OS 10.9.5 (Mavericks). It works fine with all of the other HP printers in the office. Another user has the same problem with her PC running Windows 7. And she, too, has no problems printing
-
HT1688 How do you fix an iPhone that won receive regular text messages?!
I can't receive texts from anyone without an iPhone. It just happened this morning and I just need help.
-
Hi, I'd like to make a documentator of RFC, with a special format for my company. I'm using the RFCs: RFC_FUNCTION_SEARCH, RFC_GET_FUNCTION_INTERFACE. But I have to get 2 things important for the project: - The code of a RFC - The information of (Cre
-
Install problem because "install file is damaged"
My client is periodically getting the following error on some of their identically configured Win7 machines: "Sorry, an error has occurred. The application could not be installed because the installer file is damaged. Try obtaining a new installer