Best way to do a database ?

Hi,
I have an application which sorts through and reads a databse. Currently I have it split into small functions which are called for the appropriate database with if statements, I would have it in one large function but java me gives memory errors. Anyway I was wondering if anyone had a better way of doing it as I don't like using multiple functons....
this is the basic structure I've done, is there a more efficient way ?
public void GetMeADatabase() {
public int [][] database = { {0} };
if (databseuserwants==1)
getdatabse1();
else if (databseuserwants==2)
getdatabse2();
public void getdatabase1() {
database = new int[][] {
{1,2,3},
{4,5,6},
public void getdatabase2() {
database = new int[][] {
{7,8,9},
{10,11,12},
}Edited by: kob2040 on May 2, 2008 9:41 PM

I am not sure if i set up the linked server correctly here is the schema and an attempt to run a select and the resulting error:
SELECT  *
FROM  [CN5E6E9LM2.DATABASE.WINDOWS.NET,1433].[Mkerr_db].dbo.addr
OLE DB provider "SQLNCLI11" for linked server "CN5E6E9LM2.DATABASE.WINDOWS.NET,1433" returned message "Unspecified error".
Msg 40515, Level 16, State 2, Line 1
Reference to database and/or server name in 'Mkerr_db.sys.sp_tables_info_90_rowset_64' is not supported in this version of SQL Server.
McC

Similar Messages

  • What is the best way to create a database schema from XML

    What is the best way to create a database schema from XML?
    i have  a complex XML file that I want to create a database from and consistently import new XML files of the same schema type. Currently I have started off by mapping the XSD into Excel and using Mysql for Excel to push into MySQL.
    There must be a more .net microsoft solution for this but I cannot locate the topic and tools by searching. What are the best tools and way to manage this?
    Taking my C# further

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Best way to update DR database from PROD server automatic ?

    Hello Gurus,
    I want to decide best solution.
    Goal: Best way to update DR Database from PROD Server Database automatic.
    System: 32 bit Linux system with Oracle Database 10g Release 10.2.0.4.0 - Production (database version) Oracle version is standard.
    Please let me know how i can update my DR server with PROD data and this task should be automatic.
    Please ask me more information if required to solve this issue.
    Thanks- Priyank
    Edited by: Oracle DBA P on Nov 19, 2010 3:06 AM

    you mean to say data guard needs to implement ? i think that's one option but what you said is different ?
    tell me procedure how i can implement your idea ? steps i have to perform.
    Thanks
    Edited by: Oracle DBA P on Nov 19, 2010 3:38 AM

  • Best way to map CLOB database fields?

    I ran into a problem mapping CLOB fields a couple of months ago and couldn't find an easy answer to the problem. I got sidetracked and now find myself back at the same point...
    What is the best practice for mapping CLOB database fields in the mapping workbench? Do you map them as serialized (as a note I've got here) or can someone point me in the proper direction please? I've got everything else functioning properly, but I left my CLOB fields out of my mapping because they were giving me such trouble. Now, I need to get back to that specific area.
    ~ Tiffani

    Hi Tiffani,
    SerializedObjectMapping is generally used to map a multimedia object (for example image)to a BLOB field. For CLOB, I use simple direct-to-field mapping, and TopLink conversion manager will handle the read/write from the object String/Char[] to CLOB.
    King

  • The Best Way to Check a Database.

    Hello All,
    I'm working on an app. where I'll retrieve upwards of 1 million items.
    For each retrieval, I have to make sure that the item was not previously retrieved and stored. That means on the 1millionth item, I have to test the previous 999,999 items . If a match is found, I would ignore it. Other wise I would add it to the store.
    I thought about storing all items in a simple hashtable. But 1 million items in a hashtable probably wouldn't be supported on a standard 128MB pc.
    So my only other option seems to be database.
    But the time required to retrieve and compare to the database seems like it would take forever.
    My best guess would be to retrieve say 3000 items then do all my tests at that time and store. Clear the memory and repeat. Is that the strategy you guys would try ?
    Does that seem doable -- i'll be using a standard jdbc-odbc bridge by the way
    stev
    Then I'm going to dump it into a database (MSAccess 2000) using the batch method -if the addBatch method is supported by

    If you create your database table to have an index which requires unique values, then an insert of a duplicate will throw an exception. I don't know whether addBatch will be practical here -- it might throw the exception and not add the rest of the batch, but then again it might not. Of course, adding 1 million items is going to take some time, but the other advantage of the database is that the data is permanently stored in a form that's easy to access in a variety of ways.

  • Best Way to move MB database from single XCH 2010 to 2013 DAG

    Hi,
    We are migrating from a Single Exchange 2010 sp3 server to a 2-node exchange 2013 DAG cluster, located in another AD site.
    I can move a mailbox from 2010 to 2013 without issue, but the WAN link between 2010 and 2013 is very small.
    It will take us too long to move all mailboxes with move-mailbox over the line.
    Is there another way to move the mailboxes or Databases more quickly?
    I was thinking about copying the DB's to a physical disk from 2010 and then move and mount it on 2013. Is that even possible? I explored the possibility to seed the DB to 2013, but don't have the option to do so. 2010 is installed on 2008R2 standard.
    We prefer a short downtime and move over everthing in one go as opposed to having coeexistance for longer period of time to allow the move mailbox over the WAN to complete.
    Thanks for any suggestions.

    You can't move the databases from Exchange 2010 to Exchange 2013.
    I can think of three options.
    1.  Move the Exchange 2013 server to the same LAN as the Exchange 2010 server, move the mailboxes, then move the server back.
    2.  Move the Exchange 2010 server to the same LAN as the Exchange 2013 server and move the mailboxes.
    3.  Install a new Exchange 2010 server on the same LAN as the current Exchange 2010 server, create a DAG, add mailbox database copies on the new Exchange 2010 server, move that server to the same LAN as the Exchange 2013 server, activate the databases
    on that LAN, and then move the mailboxes.
    3a.  A variation of #3 is to build the Exchange 2010 server on the same LAN as the Exchange 2013 server and perform a manual seed of the database copies.  This is more trouble than option 3.
    Moving Exchange servers between sites is possible but there are other issues you would need to solve.  You might be best off just getting a temporary increase in your WAN link capacity for the period of the mailbox move.
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • Best way to move Oracle database to another machine

    Hello,
    I'm trying to find the best solution for that case:
    On first Unix machine I'm running 10g database. Whole oracle (binary files + datafiles + index + redo) takes about 350GB from my first storage.
    On second Unix machine (and second storage) I'd like to run exactly the same instance (the first one is going to be a backup server).
    I work in real OLTP environment, and I can only afford a 4-5 hours of downtime (in the night) to move from server 1. to 2.
    Could you recommend me the best solution for moving database to no. 2. My problem is, that between storage 1. and storage 2. I've only 30MB/s bandwidth, sequence:
    1) instance_on_1: shutdown immediate
    2) scp /u01/oracle server2:/u01/oracle
    3) instance_on_3: startup
    will take about 3-4 hours, so I would have no time to additional tasks.
    Best regards
    R.

    user2676302 wrote:
    Hello,
    I'm trying to find the best solution for that case:
    On first Unix machine I'm running 10g database. Whole oracle (binary files + datafiles + index + redo) takes about 350GB from my first storage.
    On second Unix machine (and second storage) I'd like to run exactly the same instance (the first one is going to be a backup server).
    I work in real OLTP environment, and I can only afford a 4-5 hours of downtime (in the night) to move from server 1. to 2.
    Could you recommend me the best solution for moving database to no. 2. My problem is, that between storage 1. and storage 2. I've only 30MB/s bandwidth, sequence:
    1) instance_on_1: shutdown immediate
    2) scp /u01/oracle server2:/u01/oracle
    3) instance_on_3: startup
    will take about 3-4 hours, so I would have no time to additional tasks.
    Best regards
    R.Hi and welcome to forum. Why don't you want to use DUPLICATE DATABASE command of RMAN to duplicate the databsae without any downtime?

  • What is the best way to install standby database?

    Hello.
    I'm trying to develop a good scenario for implementing standby database. I've already installed and configured standby. It's working.
    Is there any best practice for installing database instance for standby (i.e. using SWPM)?

    Hi
    If you are talking about an oracle standby database, logic assumption as you are posting in the Oracle space, SWPM won't help you, it is meant for installing SAP instance.
    For an Oracle standby DB you need to install an Oracle instance and restore the master DB on it.
    Regards
    http://docs.oracle.com/cd/E11882_01/server.112/e17022/rcmbackp.htm
    http://www.pythian.com/blog/creating-a-physical-standby/

  • Best way to drop standby database

    Hi
    Oracle RDBMS 11.2.0.2 on RHEL 5.6.
    I need to drop standby database completeley and rebuilt physical standby for the same database. We identified there are lot of inconsistencies between primary and standby. How do i need to remove the standby? And what is the best procedure?
    Thanks

    951368 wrote:
    Hi
    Oracle RDBMS 11.2.0.2 on RHEL 5.6.
    I need to drop standby database completeley and rebuilt physical standby for the same database. We identified there are lot of inconsistencies between primary and standby. How do i need to remove the standby? And what is the best procedure?
    ThanksFollow this *Step By Step How to Recreate Dataguard Broker Configuration [ID 808783.1]*

  • What is the best way to chage the Database drive Path.....

    I have production databases running at C:\ and D:\. Now the space alomost near to fill. I added two more drives E:\ and F:\
    What is the most reliable way to transfer some of our Databases from C:\, D:\ to E:\,F:\
    Could you please explain step by stepm process.?
    Thanking in advance.

    ALTER DATABASE
    Purpose
    Use the ALTER DATABASE statement to modify, maintain, or recover an existing database
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_15a.htm#SQLRF00802
    CREATE CONTROLFILE
    Caution:
    Oracle recommends that you perform a full backup of all files in the database before using this statement. For more information, see Oracle9i User-Managed Backup and Recovery Guide.
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_54a.htm#SQLRF01203
    Joel Pérez

  • Best way to calc this database -

    Let me start of by saying I know this should be an ASO cube
    But moving forward.
    What is the calc Script to the best to calc this
    This here are the Databases Dimensions
    Year – 8 members - Sparse
    Periods – 12 members – Dense
    Scenario – 3 Members – Sparse
    Account – 11080 members – Dense
    Company – 17 – members – Sparse
    Business Units – 4452 members – Sparse
    Division - 23 member – Sparse
    Regions – 20 members – Sparse
    Mtg Center - 78 members – Sparse
    Reporting – 146 members – Sparse

    I re did the Outline
    Accounts     Sparse     1293     1251
    Business Units     Sparse     4451     4451
    Company     Dense     17     17
    Division     Sparse     23     23
    MfgCenter     Sparse     78     78
    Period     Dense     17     12
    Regions     Sparse     20     20
    Scenario     Dense     3     2
    Years      Dense     9     8
    so now what is the best calc for this Outline
    Number of existing blocks     96616
    Block size (B)     26112
    Potential number of blocks     19,978,751,880
    Existing level 0 blocks     4213
    Existing upper-level blocks     92403
    Block density (%)     0.051%
    calc's and not my Strength !!!!
    LOL
    Is there a book on just writing Calc Scripts
    Please advise
    Edited by: Next Level on Dec 19, 2011 3:58 PM
    Edited by: Next Level on Dec 19, 2011 3:59 PM

  • Best way to clone oracle database

    Hi All,
    I have to make a clone of my running ora server on new computer as stand-by or some time for testing the taken cold-backup. pls advise the best/quick way to do.
    oracle - 8.0.5
    OS - Win-NT 4.0
    thanks
    mummy

    Check Metalink Note 1080849.6

  • I want to move the move my photoshop elements photo database from an old pc to a new pc without losing the modified dates and tags created, what is the best way to transfer the database with all the information about the photos

    an old pc to a new one. How to I transfer the database file to save dates that have been modified and tags that have been created

    See:
    Use Backup, Restore to move catalog | Organizer | Elements 6 or later

  • Best way to manage a database creation

    Hi,
    i need an advise, i have an Informix database that i have to create and delete.
    So, i created two kind of scripts : one to create the database and another one to delete it.
    If an user call twice the script to create the database Informix goes down because it tries to create a database which already exists.
    what is the right methodology to use :
    1) drop the database each time i have to create it
    2) check if the database exists and not created
    Any suggestion ?
    Cheers.
    Stefano

    If only developers use the scripts then drop it each time.
    If there is any chance that QA or production will use it then the scripts should check for an existing database, print an error message if there is one, and exit without doing anything.

  • Best way to copy a database?

    I have just tried to clone my old database. I did this with copying all data files into the new directories on the new server, making the changed needed in the control file, and running the edited control file when opening up the new database.
    I have also just finished doing an export. This I did by again copying the datafile to be copied into the target database. Then I exported the tablespaces I wanted to copy. Then, using import fromt he target database, I imported the data from the old database.
    Which method is preferred? From my small testing here, it seems and import /export is good for targeting specific tablespaces or tables, while the cloning procedure is better for a large scale copying. Not sure if Im right about this, or indeed if there is something else I should try (SQL Data Loading??).
    Just wanted to know the professional perspective on these.
    DA

    The duplicate process is also well documented under Oracle document site
    Preparing the RMAN DUPLICATE Auxiliary Instance: Basic Steps
    As per document,
    "Start RMAN with a connection to the target database, the auxiliary instance, and, if applicable, the recovery catalog database. "
    Meaning if you don't have catalog just ignore the connect to catalog part, RMAN will pick up control file information instead.
    Also need to note,
    If you do not have automatic channels configured, then before issuing the DUPLICATE command, manually allocate at least one auxiliary channel within the same RUN command.
    RUN
      # to manually allocate a channel of type sbt issue:
      ALLOCATE AUXILIARY CHANNEL ch1 DEVICE TYPE sbt;
      # to manually allocate three auxiliary channels for disk issue (specifying
      # whatever channel id that you want):
      ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK;
      ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK;
      ALLOCATE AUXILIARY CHANNEL aux3 DEVICE TYPE DISK;
      DUPLICATE TARGET DATABASE TO dupdb;
    }

Maybe you are looking for

  • Problem Installing Oracle 10g on Windows 2000

    Hi all, I´m trying to install the Oracle 10.2.0.1 on Windows 2000 Terminal, but I´m getting the following error: java.util.zip.ZipException: oversubscribed literal/length tree      at java.util.zip.InflaterInputStream.read(Unknown Source)      at jav

  • Cannot display certain french glyphs running in Chinese NT 4.0

    I have got a java application which supports english, french, german, spanish, italian languages. I have translations properties files which is loaded for the language the application is installed in(ResourceBundle, et al). I have a new requirement t

  • Main SWF that calls other SWFs convert to .mov, .avi, or .wmv

    I have a SWF demo that calls multiple SWF files & 3 FLV files. I want to upload this to Facebook as one file - .mov, .avi, .wmv - whatever works. Does anyone know how I can do this? Thanks in advance.

  • Create zone in Solaris 10 SMC 3.6 Client

    Hi, I have 2 solaris 10 server. 1 acting as smc server and the other one as smc client. In smc server, I install smc srv sw 3.6, agent 3.6, container manager in sol10 global zone, no agent yet in local zone In smc client I install I install smc agent

  • Espn wont play video

    Go to the global security settings panel in Flash player help  When it opens go to the 3rd icon from the left with the lock icon. Click on edit location and add espn.com  this worked for me