Moving sql 7.0 to to sql 2008

Can some kindly help me how to move sql 7.0 to sql 2008R2. We have 10 databases and there are 15 DTS Packages but when I script out the jobs I found that only one job is calling only two packages and seem like other are inactive. Can someone help me to find
out that these DTS Package are running or idle. Also step how to move everyone with breaking anything. Thanks

Follow this link for upgrading your dts packages. Check DTS packages log for the Execution history to verify they recently ran or not. It
is not simple to say move everything without breaking. Better open that two packages and check whether they are calling other dts packages too. 
Migrating DTS Packages to Integration Services
https://msdn.microsoft.com/en-us/library/bb500440%28v=sql.105%29.aspx

Similar Messages

  • Cannot connect to SERVER. Login failed for user 'DOMAIN\user'. (Microsoft SQL Server, Error 18456) - SQL Server 2012 on Windows Server 2008 R2

    I've seen multiple blogs and forums with similar problems and SQL 2012 or 2008. But no solutions that work for me.
    I have installed SQL Server in mixed mode (SQL and Windows authentication). I can create new Login accounts in either mode. However, I cannot get an AD security group Login account to work. I am trying to add group 'DOMAIN\Domain Admins' or 'SERVER\Administrators'
    as a Login so that any of the domain's administrator accounts can open SQL Server Management Studio and act as an 'sa' account on this server.
    I have deleted the SQL account 'DOMAIN\Domain Admins'.
    I have restarted SQL.
    I have restarted the Win2K8r2 server.
    I have launched SSMS as Administrator from the desktop of SERVER.
    I have launched SSMS as another user (and used 'DOMAIN\user' to lauch it) from the desktop of SERVER.
    I can create a login account named 'DOMAIN\user' (who happens to be a member of the 'DOMAIN\Domain Admins' group) and give this account 'sa' security, and when I do that, this account works as expected...
    How do I add a security group as a Login account and give all members of that group the ability to be an 'sa' account?

    Hi geoperkins,
    Are you getting the following error message?
    Error: 18456, Severity: 14, State: 11
    Login failed for user <Domain\user>. Reason: Token-based server access validation failed with an infrastructure error.
    If that is the case, the issue could be due to that the Windows login has no profile or that permissions could not be checked due to UAC. Please disable UAC firstly and check if it is successful to log in SQL Server.
    Another reason could be that the domain controller could not be reached. You may need to resort to re-creating the login. Create a new group in AD, add users to the new group, then add the group to the local admin group and create login for the group in SQL
    Server.
    There is a connect item describing similar issue for your reference.
    https://connect.microsoft.com/SQLServer/feedback/details/680705/cant-login-to-sql-using-windows-authentication-when-user-is-in-a-domain-security-group
    For more details about above error, please review the following blog.
    http://sqlblogcasts.com/blogs/simons/archive/2011/02/01/solution-login-failed-for-user-x-reason-token-based-server-access-validation-failed-and-error-18456.aspx
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • How to enable high availability on SQL Server 2005 with Windows Server 2008 Enterprise R2

    Dear Folks,
    I would like to ask you about this thing. I'm working for IT department for bank in Myanmar. Our bank have up to 96 branches across all of Myanmar including H.O. We are using Microsoft SQL Server 2005 with Windows Server 2008 for our banking
    information system. My main problem is having to backup and restore the database backup files every time the servers in branches goes down for whatever reasons. I want to deploy this feature of high availability and failover cluster using Windows Server 2008
    and SQL Server 2005. Our branches have 2 Servers. One is for Primary and other is for Backup. What I want to do is that, I want to change Backup Server to Primary Server whenever the Primary Server goes down for whatever reasons. All the working data and databases
    from Primary will immediately replicated into Backup Server along with all the IP information of Primary Server. Please give me step by step guide for this process.

    Try below
    http://blogs.msdn.com/b/cindygross/archive/2009/10/23/checklist-for-installing-sql-server-2005-as-a-clustered-instance.aspx
    I will recommend you to upgrade SQL server to newer version for support as well as flexibility.
    Regards,
    Vishal Patel
    Blog: http://vspatel.co.uk
    Site: http://lehrity.com

  • Transact-SQL debugger not working in SQL Server 2008: "...debugger does not support SQL Server 2005 or earlier..."

    I have recently installed SQL Server 2008. When I try to execute a query against an Access database, I receive this debugging error:
    "Unable to start Transact-SQL debugger. The Transact-SQL debugger does not support SQL Server 2005 or earlier versions of SQL Server. (SQLEditors)"
    Nor will the query execute; I get a transport-level error 0. Any thoughts?

    Hi Davidmhjr,
    >>Unable to start the Transact-SQL Debugger. The Transact-SQL Debugger does not support SQL Server 2005 or earlier versions of SQL Server. (SQLEditors).
    Have you tried to restart the server once you have installed SQL Server 2008? As Naomi N mentioned please check the version of SQL Server you are using.
    If you tried to connect to SQL Server 2005 from SQL Server 2008 SSMS, you would not be able to debug and get this error, it happens because T-SQL debugger includes both server-side and client-side components. The server-side debugger components are installed
    with each instance of the SQL Server 2008 Database Engine. The client-side components are installed when you install the SQL Server 2008 client-side tools.
    So it works with SQL Server 2008 only so far. Another way is you can triy to use SQL Server 2005 SSMS to connect to SQL Server 2005.
    More information about configuration requirement to run T-SQL debugger as below, please refer:
    There are no configuration requirements to run the Transact-SQL debugger when SQL Server Management Studio is running on the same computer as the instance of the SQL Server Database Engine. However, to run the Transact-SQL debugger when SQL Server Management
    Studio is running on a different computer from the instance of the Database Engine, you must enable program and port exceptions by using the Windows Firewall Control Panel application on both computers.
    On the computer that is running the instance of the Database Engine, in Windows Firewall, specify the following information:
    •Add TCP port 135 to the exceptions list.
    •Add the program sqlservr.exe to the exceptions list. By default, sqlservr.exe is installed in C:\Program Files\Microsoft SQL Server\MSSQL10.InstanceName\MSSQL\Binn, where InstanceName is MSSQLSERVER for the default instance, and the instance name for
    any named instance.
    •If the domain policy requires network communications to be done through IPsec, you must also add UDP port 4500 and UDP port 500 to the exception list.
    On the computer that is running SQL Server Management Studio, in Windows Firewall, specify the following information:
    •Add TCP port 135 to the exceptions list.
    •Add program ssms.exe (SQL Server Management Studio) to the exceptions list. By default, ssms.exe is installed in C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE.
    Hope it is helpful.
    Regards, Amber zhang

  • How to find out sql server administrator account in sql server 2008 R2

    how to find out sql server administrator account in sql server 2008 R2
    adil

    there is any way to find out actual administrator
    because i forget that user i used to logon to server and installed sqlserver
    adil
    Hi adilahmed,
    According to your description, you forgot the account which was used to install SQL Server. SQL Server service account information is stored in Windows Registry database. You can get this information from Services Console or SQL Server Configuration.
    For example, to get account information from Services Console.
    1. Go to Start > Run > Services.msc
    2. Right Click on SQL Server Service, i.e. “SQL Server (InstanceName)” and go to properties
    3. The account information is available under Log On tab.
    Or you can get the information by using DMV and so on.
    SELECT servicename, service_account FROM   sys.dm_server_servicesGO
    If you now log in SQL Server by using sysadmin account, you can check all login names in security and find the original account to login.
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • I installed visual studio 2010 in my windows 8.1 system.during the installation sql server 2008 r2 features were installed.so which version of sql server i need to install(2008 or 2008 r2)?

    hi,
    I installed visual studio 2010 in my windows 8.1 system.during the installation sql server 2008 r2 features were installed.so which version of sql server i need to install(2008 or 2008 r2)?
    regards,
    harsha.

    My guess is SQL Server 2008 R2.
    Check the following KB article for details:
    http://support.microsoft.com/kb/2681562
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Have you moved from Unix/Oracle to Windows/SQL Server

    I am looking for people that have moved from Unix/Oracle to Windows/SQL Server...
    Would you do it again ?
    Did you save money ?
    Were you using Zones to virutalize on Unix ?
    Did you gain or loose overall Performance ?
    Have you had to perform a recovery on SQL Server ? 
    Have you done a recovery in Oracle ?
    Were you using Rman ?
    Which worked better ?
    We are going through an analysis of does it really make sense, save money and effect performance to move from a strong unix/oracle environment to a MS/SQL environment.
    THanks Rob
    [email protected]

    Hi,
    All our R/3 legacy systems are Windows/Oracle.
    All the new systems (BW, SRM, CRM, XI) are Windows/MSSQL.
    It was an order from the management to make the switch because of the high prices of Oracle licences.
    The official motto is now Oracle on Unix only and SQL server on Windows only.
    We get the same level of performance as with Oracle, but we, old SAP Oracle grumpy admins, are much more comfortable with Oracle admin than SQL server admin.
    imho, SQL server may seem simplier but it is much easier to look under the hood whith Oracle.
    We have to reinvent the wheel and it's kind of frustrating but we will cope with it...
    I would say that SQL server is not a good choice for BW usage because there is a lot more litterature on BW database optimisation for Oracle than MSSQL.
    The official SAP class does not speak at all about SQL server but has several chapters on Oracle...
    Regards,
    Olivier

  • Deployment of SQL Server Business Intelligence Development Studio (2008 R2)

    Looking for some guidance on deploying SQL Server Business Intelligence Development studio (2008 R2).  I have a requirement from our Data Warehouse developers, and they require the SQL Server Business Intelligence Studio deployed to
    the server that will hold the production data warehouse.  Is the SQL Server Business Intelligence development studio normally deployed on a production server?
    I am hesitant about installing the SQL Server Business Intelligence Development studio since it's a development tool.  I haven't seen anything that it is required to run the developed objects.
    Any information you can provide will be appreciated.
    Thanks.
    DJ

    Hi DonsJones,
    The SQL Server Business Intelligence Development studio (BIDS) is a client tool for BI Projects development and won’t be installed on the production server in most cases. For a DW/BI system, the BIDS is generally used to develop ETL packages, Data Mining,
    and Reporting. The development activities should be performed in the Dev environment, and the eventually ETL packages or reports should be deployed to the production server or report server. For a production server that will run the ETL packages (usually in
    SQL Server Agent jobs), SSIS should be installed on the production server.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Upgrade MS SQL 2005 platform to MS SQL 2008 - Update the JDBC driver...

    Hello to all,
    This is the second post that I created reporting this error because in the first one I open this message in group of "SAP on SQL Server" but without any kind of help from community:
    My problem is...
    I´m planning to do an upgrade of a sap system (SAP ECC 6.0) from SQL Server 2005 to a SQL Server 2008 but I´m facing with a little problem. This system has two stacks - ABAP + JAVA - and because of that the Upgrade Guide to MS SQL Server 2008 describe which are the requirements for this upgrade DB platform, and one of them is this:
    "If you use a Java system, you have updated the JDBC driver as described in SAP Note 639702"
    ... the updated of JDBC driver when we have in system a Java part, like it has in this case! But I´m with a serious problems to find in SAP System Files in Windows 2003 Server the four files that is mentioned in that note 639702. I can´t find it anywhere... in note says:
    Depending on the SAP release and the system configuration, the driver files base.jar, util.jar, sqlserver.jar, and spy.jar are available in an installed system at:
    (NetWeaver'04, Java:) usrsap<SAP SID>JC<InstanceNumber>j2eejdbc
    (NetWeaver'04, ABAP+Java:) usrsap<SAP SID>DVEBMGS<InstanceNumber>j2eejdbc
    (NetWeaver 2004s:) usrsap<SAPSID>SYSexe<NUC|UC>Platformmssjdbc
    But... still I didn´t find them! I also read other note 1109274 - New JDBC driver for NetWeaver 7.0 and higher but even so I still can´t find it!
    Can you help me to find this files on my operation system? I have to update that JDBC... but of course for this task I have to find it first!!!
    Best regards,
    João Dimas - Portugal

    Hi,
    Have you considered the possibility that the directory that was supposed to contain the jdbc drivers has been replaced by a recent kernel upgrade and you never noticed?
    Anyway, looking forward, put in a new set of JDBC drivers in the correct location.
    Also, with reference to the following point from the first note:
    Check your JDBC Driver version before you download it. To do this, unpack the attached check tool SAPCheckVersion in the relevant JDBC directory (refer to the previous paragraph). Then open a command prompt there and execute the following command:
    SAPCheckVersion.cmd <server name> <username> <password>
    Replace <server name> with the name of the database server, <username> and <password> with the logon data of an SQL user (for example, sa or SAP<SID>DB). If you call SAPCheckVersion.cmd without a parameter, the system displays detailed help. The tool supports both DataDirect and Microsoft drivers.
    *The download name tells you which version of the driver you need to download from SAP Service Marketplace.*
    Run this SAPCheckVersion and find out which drivers you need to download and then download them and use them.
    Regards,
    Shitij

  • Upgrade MS SQL 2005 platform to MS SQL 2008 - Update the JDBC driver issue

    Hello to all,
    I´m planning to do an upgrade of a sap system (SAP ECC 6.0) from SQL Server 2005 to an SQL Server 2008 but I´m facing with a little problem. This system has two stacks - ABAP + JAVA - and because of that the Upgrade Guide to MS SQL Server 2008 describe which are the requirements for this upgrade DB platform, and one of them is this:
    "If you use a Java system, you have updated the JDBC driver as described in SAP Note 639702"
    ... the updated of JDBC driver when we have in system a Java part, like it has in this case! But I´m with a serious problems to find in SAP System Files in Windows 2003 Server the four files that is mentioned in that note 639702. I can´t find it anywhere... in note says:
    Depending on the SAP release and the system configuration, the driver files base.jar, util.jar, sqlserver.jar, and spy.jar are available in an installed system at:
    (NetWeaver'04, Java:) usrsap<SAP SID>JC<InstanceNumber>j2eejdbc
    (NetWeaver'04, ABAP+Java:) usrsap<SAP SID>DVEBMGS<InstanceNumber>j2eejdbc
    (NetWeaver 2004s:) usrsap<SAPSID>SYSexe<NUC|UC>Platformmssjdbc
    But... still I didn´t find them!  I also read other note 1109274 - New JDBC driver for NetWeaver 7.0 and higher but even so I still can´t find it! 
    Can you help me to find this files on my operation system? I have to update that JDBC... but of course for this task I have to find it first!!!
    Best regards,
    João Dimas - Portugal

    Hello John Feely,
    Yeah I already know that you mentioned! In my first post/previous message I mentioned that, I already read the note 639702 and it was there I read that explanation... regarding that creation that you refer in the case of files are not in those directories, so you said that I could download this four files and put in there... but where? and how..? Sorry but that solution seems does not make any sense!
    I also look other systems with double stack ABAP + JAVA and I one more time I didn´t see that directories or files that are mentioned in that note!! DAMN!
    Any tip?
    Kind regards,
    João Dimas - Portugal

  • SQL calculation in expression editor CR 2008

    This SQL expression works on MS SQL Server 2005 but not in the SQL Expression Editor of Crystal Reports.
    Why? Any alternatives?
    declare @Trash Decimal
    declare @Done Decimal
    set @Trash =
      select count(*) from dbo.NL_NM_NUON
      WHERE MAN_CAMPAIGNNAME = '9.304_Winback TM CM Jan 2010 - Bosch'  AND
        fldFormalities In ('Persoon is verhuisd', 'Adres matcht niet met telefoonnummer',
             'Weigering Gesprek', 'Dubbel in bestand', 'Persoon overleden',
             'Beslisser tijdens actieperiode afwezig')
        OR
        fldEndresult = 'Is sinds kort klant bij NUON'
    set @Done =
      select count(*) from
      NL_NM_NUON Where
      NL_NM_NUON.MAN_CAMPAIGNNAME = '9.304_Winback TM CM Jan 2010 - Bosch' AND
      STATUS IN ('U','F')
    Select (@Trash / @Done) * 100
    Edited by: Valmont on Feb 10, 2010 2:36 PM

    Create two different sql expressions like this
    %Expression1:
      select count(*) from dbo.NL_NM_NUON
      WHERE MAN_CAMPAIGNNAME = '9.304_Winback TM CM Jan 2010 - Bosch'  AND
        fldFormalities In ('Persoon is verhuisd', 'Adres matcht niet met telefoonnummer',
             'Weigering Gesprek', 'Dubbel in bestand', 'Persoon overleden',
             'Beslisser tijdens actieperiode afwezig')
        OR
        fldEndresult = 'Is sinds kort klant bij NUON'
    %Expression2:
      select count(*) from
      NL_NM_NUON Where
      NL_NM_NUON.MAN_CAMPAIGNNAME = '9.304_Winback TM CM Jan 2010 - Bosch' AND
      STATUS IN ('U','F')
    Now Create a formula like this
    ({%Expression1}/{%Expression2})*100
    HTH
    Raghavendra.G

  • Which is the best way to migrate the SQL SERVER 2000 Database to SQL SERVER 2003 Database?

    Hi,
        I  need to migrate the Production database sql server 2000 to Sql server 2003, Please give me the best idea to migrate the database without any loss data, credentials and  Objects. 
    Nandha Kumar

    SQL server does not have any version named SQL server 2003 please check the version correctly it should be either SQL 2005,2008,2008 R2,2012
    You can use the backup/restore to upgrade the SQL 2000 database to till SQL 2005,2008,2008R2
    For SQL Server 2000 to 2012
    First upgrade from SQL 2000 database to either SQL 2005, 2008 or 2008R2 and than upgrade it to SQL 2012.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/eaa1eb44-729f-466b-8233-cb768fbb4208/upgrading-to-sql-server-2008-from-sql-server-2000?forum=sqlsetupandupgrade
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/4fac7511-2c75-46a0-802b-807dd26b12bf/sql-2012-will-not-convert-a-sql-2000-database?forum=sqlservermigration
    And after migration to SQL 2005 or 2008, if you want to script the database than can generate scripts pick DB and check off "script all objects in the selected database".
    http://blog.sqlauthority.com/2011/05/07/sql-server-2008-2008-r2-create-script-to-copy-database-schema-and-all-the-objects-data-schema-stored-procedure-functions-triggers-tables-views-constraints-and-all-other-database-objects/
    You can upgrade from SQL Server 2005, SQL Server 2008, and SQL Server 2008 R2 to SQL Server 2012.
    http://msdn.microsoft.com/en-us/library/ms143393(v=sql.110).aspx
    Please click the Mark as answer button and vote as helpful if this reply solves your problem

  • How to get Host name and SQL Instance Name by T-SQL

    I am using SQL 2000, 2005 and 2008. I have few multi instances SQL servers. I would like to gather following information:
    Host Name
    SQL Instance Name
    SQL Version
    Server1
    Server1
    SQL 2000
    Server1
    Server1\ABC
    SQL 2005
    Server1
    Server1\XYZ
    SQL 2008
    Server2
    Server2
    SQL 2008
    Is there any way I can get it by T-SQL? Any help would be appreciated.
    Thanks
    Saumen 

    SELECT
    SERVERPROPERTY('MachineName') AS [ServerName],
    SERVERPROPERTY('ServerName') AS [ServerInstanceName],
    SERVERPROPERTY('InstanceName') AS [Instance],
    SERVERPROPERTY('Edition') AS [Edition],
    SERVERPROPERTY('ProductVersion') AS [ProductVersion],
    Left(@@Version, Charindex('-', @@version) - 2) As VersionName
     |
    Blog: MSBICOE.com |
    MCITP - BI, SQL Developer & DBA
    Hate to mislead others, if I'm wrong slap me. Thanks!

  • Error 45 Initializing In SQL*Plus When Running A Sql Script

    Hi All
    I have a daily scheduled jobs running on Windows server 2003 and 2008. Oracle Version :10.2.0.1 and 10.2.0.4
    right now jobs are not even starting when i run them manually. Found the error Error 45 Initializing In SQL*Plus When Running A Sql Script.
    it says Bug:3039738.
    what is the solution to fix this Bug ?
    thanks
    Shawn

    user9174724 wrote:
    Hi
    do you think the Problem is not with the script ?
    when i run the job its reaching SQLPLUS and giving error
    Error 45 Initializing In SQL*Plus When Running A Sql Script .
    Server:windows 2003 and oracle version :10.2.0.1
    CMD /C %ORACLE_HOME_PRIME%\bin\sqlplus.exe /NOLOG @ %xxxx_HOME%\DBA_Backup\BackupDo.sql testdb BackupFull
    The above line does the following:
    1) launches a command procesor
    2) passes that command processor the following command line parms:
    /C
    (process the following command, then terminate)
    %ORACLE_HOME_PRIME%\bin\sqlplus.exe
    the launched processor will process the executable 'sqlplus.exe' found in the \bin subdirectory, found in the directory indicated by the environment variable ' ORACLE_HOME_PRIME'. The remainder of the command line will be passed to sqlplus.exe for interpretation and processing
    /NOLOG
    tell sqlplus to start up without trying to immediately log on to a database
    typically used to indicate to sqlplus that the immediately following string names a file of sql and sqlplus commands to be processed.
    %xxxx_HOME%\DBA_Backup\BackupDo.sql
    tell sqlplus to execute the commands found in the file 'BackupDo.sql', found in the subdirectory DBA_Backup, found in the directory name by the environment variable 'xxxx_HOME'.
    testdb
    BackupFull
    pass the values 'testdb' and 'BackupFull' to be used as values for substitution variables &1 and &2 in the file 'BackupDo.sql'
    Script:
    rmanbackup.rman
    BACKUP AS COMPRESSED BACKUPSET DATABASE FORCE PLUS ARCHIVELOG;
    DELETE NOPROMPT ARCHIVELOG ALL BACKED UP 2 TIMES TO DEVICE TYPE DISK;
    LIST BACKUP SUMMARY;
    LIST BACKUP;
    EXIT;I don't know what you expect of this. It is an rman script and we've seen no sign of an rman script being executed in any of what you've shown us. RMAN commands are processed by rman, not sqlplus.
    Unfortunately, you didn't think showing us the contents of BackupDo.sql was of any value in finding out what your problem was.
    Edited by: EdStevens on Jul 11, 2011 7:58 PM

  • VSS snapshots for DPM 2010 Hyper-V backup conflict with SQL backup on a virtual SQL server

    We currently use DPM 2010 to backup our virtual servers which reside on a 5 node Hyper-V clustered share volume.  DPM uses the hardware VSS writer to backup the Hyper-V guests.   Several of these Hyper-V guests are SQL servers (SQL 2008) and they
    are all configured to run point in time SQL backups using SQL Management Plans.
    The SQL backups are scheduled to run a full database backup on a Friday and differential backups on the other days of the week.  Transaction backups are scheduled to run several times throughout the day.
    However we have recently discovered that there is a conflict between these two methods as it seems as though when a restore is required using a differential SQL backup, it fails as the snapshot created by DPM forces SQL to believe it has had a full backup
    carried out externally from the Management Plan and is therefore unable to perform the restore.
    DPM backs up the Hyper-V guests on a daily basis from 8pm.
    Can anyone provide any advice or guidance on this as we need both types of backup to run successfully.  We are required to backup SQL with point in time backups and we also need to protect the Hyper-V guests in their entirety.

    Thanks Mike,
    I have tried this but unfortunately it has no effect.  The VM has Oracle installed (although not the Oracle VSS Writer).  It is the Oracle application server, not the database server, and the customer has a script that is used to stop and start
    the Oracle application when required.  Through troubleshooting this with them I have noticed that after the WLS_Reports service/process is stopped the backups run successfully but when it is running the backups fail.
    I have also noticed that when I stop the Hyper-V Volume Shadow Copy Requestor the backup runs successfully, which I guess is as expected.
    When the backups fail I get 2 errors in the application log:
    Event Id 12293, VSS - Error calling a routine on a shadow copy provider {GUID for the Hyper-V IC Software Shadow Copy Provider}.  Routine details PreFinalCommitSnapshots ({GUID}, 5) [hr = 0x800705b4, This operation returned because
    the timeout period expired.]
    Event Id 19, vmicvss - Not all the shadow volumes arrived in the guest operating system.
    This is also part of the same problem I have posted here: Backup
    fails for a Hyper-V guest with VSS Writer failures using DPM 2012 R2 - Hyper-V guest has Oracle application installed
    Regards
    Chris

  • How can I load my data faster?  Is there a SQL solution instead of PL/SQL?

    11.2.0.2
    Solaris 10 sparc
    I need to backfill invoices from a customer. The raw data has 3.1 million records. I have used pl/sql to load these invoices into our system (dev), however, our issue is the amount of time it's taking to run the load - effectively running at approx 4 hours. (Raw data has been loaded into a staging table)
    My research keeps coming back to one concept: sql is faster than pl/sql. Where I'm stuck is the need to programmatically load the data. The invoice table has a sequence on it (primary key = invoice_id)...the invoice_header and invoice_address tables use the invoice_id as a foreign key. So my script takes advantage of knowing the primary key and uses that on the subsequent inserts to the subordinate invoice_header and invoice_address tables, respectively.
    My script is below. What I'm asking is if there are other ideas on the quickest way to load this data...what am I not considering? I have to load the data in dev, qa, then production so the sequences and such change between the environments. I've dummied down the code to protect the customer; syntax and correctness of the code posted here (on the forum) is moot...it's only posted to give the framework for what I currently have.
    Any advice would be greatly appreciated; how can I load the data faster knowing that I need to know sequence values for inserts into other tables?
    DECLARE
       v_inv_id        invoice.invoice_id%TYPE;
       v_inv_addr_id    invoice_address.invoice_address_id%TYPE;
       errString        invoice_errors.sqlerrmsg%TYPE;
       v_guid          VARCHAR2 (128);
       v_str           VARCHAR2 (256);
       v_err_loc       NUMBER;
       v_count         NUMBER := 0;
       l_start_time    NUMBER;
       TYPE rec IS RECORD
          BILLING_TYPE             VARCHAR2 (256),
          CURRENCY                 VARCHAR2 (256),
          BILLING_DOCUMENT         VARCHAR2 (256),
          DROP_SHIP_IND            VARCHAR2 (256),
          TO_PO_NUMBER        VARCHAR2 (256),
          TO_PURCHASE_ORDER   VARCHAR2 (256),
          DUE_DATE                 DATE,
          BILL_DATE                DATE,
          TAX_AMT                  VARCHAR2 (256),
          PAYER_CUSTOMER           VARCHAR2 (256),
          TO_ACCT_NO          VARCHAR2 (256),
          BILL_TO_ACCT_NO          VARCHAR2 (256),
          NET_AMOUNT               VARCHAR2 (256),
          NET_AMOUNT_CURRENCY      VARCHAR2 (256),
          ORDER_DT             DATE,
          TO_CUSTOMER         VARCHAR2 (256),
          TO_NAME             VARCHAR2 (256),
          FRANCHISES       VARCHAR2 (4000),
          UPDT_DT                  DATE
       TYPE tab IS TABLE OF rec
                      INDEX BY BINARY_INTEGER;
       pltab           tab;
       CURSOR c
       IS
          SELECT   billing_type,
                   currency,
                   billing_document,
                   drop_ship_ind,
                   to_po_number,
                   to_purchase_order,
                   due_date,
                   bill_date,
                   tax_amt,
                   payer_customer,
                   to_acct_no,
                   bill_to_acct_no,
                   net_amount,
                   net_amount_currency,
                   order_dt,
                   to_customer,
                   to_name,
                   franchises,
                   updt_dt
            FROM   BACKFILL_INVOICES;
    BEGIN
       l_start_time := DBMS_UTILITY.get_time;
       OPEN c;
       LOOP
          FETCH c
          BULK COLLECT INTO pltab
          LIMIT 1000;
          v_err_loc := 1;
          FOR i IN 1 .. pltab.COUNT
          LOOP
             BEGIN
                v_inv_id :=  SEQ_INVOICE_ID.NEXTVAL;
                v_guid := 'import' || TO_CHAR (CURRENT_TIMESTAMP, 'hhmissff');
                v_str := str_parser (pltab (i).FRANCHISES); --function to string parse  - this could be done in advance, yes.
                v_err_loc := 2;
                v_count := v_count + 1;
                INSERT INTO    invoice nologging
                     VALUES   (v_inv_id,
                               pltab (i).BILL_DATE,
                               v_guid,
                               '111111',
                               'NONE',
                               TO_TIMESTAMP (pltab (i).BILL_DATE),
                               TO_TIMESTAMP (pltab (i).UPDT_DT),
                               'READ',
                               'PAPER',
                               pltab (i).payer_customer,
                               v_str,
                               '111111');
                v_err_loc := 3;
                INSERT INTO    invoice_header nologging
                     VALUES   (v_inv_id,
                               TRIM (LEADING 0 FROM pltab (i).billing_document), --invoice_num
                               NULL,
                               pltab (i).BILL_DATE,                 --invoice_date
                               pltab (i).TO_PO_NUMBER,
                               NULL,
                               pltab (i).net_amount,
                               NULL,
                               pltab (i).tax_amt,
                               NULL,
                               NULL,
                               pltab (i).due_date,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               TO_TIMESTAMP (SYSDATE),
                               TO_TIMESTAMP (SYSDATE),
                               PLTAB (I).NET_AMOUNT_CURRENCY,
                               (SELECT   i.bc_value
                                  FROM   invsvc_owner.billing_codes i
                                 WHERE   i.bc_name = PLTAB (I).BILLING_TYPE),
                               PLTAB (I).BILL_DATE);
                v_err_loc := 4;
                INSERT INTO    invoice_address nologging
                     VALUES   (invsvc_owner.SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
                               v_inv_id,
                               'BLAH INITIAL',
                               pltab (i).BILL_DATE,
                               NULL,
                               pltab (i).to_acct_no,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               SYSTIMESTAMP,
                               NULL);
                v_err_loc := 5;
                INSERT INTO    invoice_address nologging
                     VALUES   ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
                               v_inv_id,
                               'BLAH',
                               pltab (i).BILL_DATE,
                               NULL,
                               pltab (i).TO_ACCT_NO,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               SYSTIMESTAMP,
                               NULL);
                v_err_loc := 6;
                INSERT INTO    invoice_address nologging
                     VALUES   ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
                               v_inv_id,
                               'BLAH2',
                               pltab (i).BILL_DATE,
                               NULL,
                               pltab (i).TO_CUSTOMER,
                               pltab (i).to_name,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               SYSTIMESTAMP,
                               NULL);
                v_err_loc := 7;
                INSERT INTO    invoice_address nologging
                     VALUES   ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
                               v_inv_id,
                               'BLAH3',
                               pltab (i).BILL_DATE,
                               NULL,
                               'SOME PROPRIETARY DATA',
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               NULL,
                               SYSTIMESTAMP,
                               NULL);
                v_err_loc := 8;
                INSERT
                  INTO    invoice_event nologging (id,
                                                             eid,
                                                             root_eid,
                                                             invoice_number,
                                                             event_type,
                                                             event_email_address,
                                                             event_ts)
                VALUES   ( SEQ_INVOICE_EVENT_ID.NEXTVAL,
                          '111111',
                          '222222',
                          TRIM (LEADING 0 FROM pltab (i).billing_document),
                          'READ',
                          'some_user@some_company.com',
                          SYSTIMESTAMP);
                v_err_loc := 9;
                INSERT INTO   backfill_invoice_mapping
                     VALUES   (v_inv_id,
                               v_guid,
                               pltab (i).billing_document,
                               pltab (i).payer_customer,
                               pltab (i).net_amount);
                IF v_count = 10000
                THEN
                   COMMIT;              
                END IF;
             EXCEPTION
                WHEN OTHERS
                THEN
                   errString := SQLERRM;
                   INSERT INTO   backfill_invoice_errors
                        VALUES   (
                                    pltab (i).billing_document,
                                    pltab (i).payer_customer,
                                    errString || ' ' || v_err_loc
                   COMMIT;
             END;
          END LOOP;
          v_err_loc := 10;
          INSERT INTO   backfill_invoice_timing
               VALUES   (
                           ROUND ( (DBMS_UTILITY.get_time - l_start_time) / 100,
                                  2)
                           || ' seconds.',
                           (SELECT   COUNT (1)
                              FROM   backfill_invoice_mapping),
                           (SELECT   COUNT (1)
                              FROM   backfill_invoice_errors),
                           SYSDATE
          COMMIT;
          EXIT WHEN c%NOTFOUND;
       END LOOP;
       COMMIT;
    EXCEPTION
       WHEN OTHERS
       THEN
          errString := SQLERRM;
          INSERT INTO   backfill_invoice_errors
               VALUES   (NULL, NULL, errString || ' ' || v_err_loc);
          COMMIT;
    END;

    Hello
    You could use insert all in your case and make use of sequence.NEXTVAL and sequence.CURRVAL like so (excuse any typos - I can't test without table definitions). I've done the first 2 tables, so it's just a matter of adding the rest in...
    INSERT ALL
         INTO      invoice nologging
                    VALUES   (     SEQ_INVOICE_ID.NEXTVAL,
                                   BILL_DATE,
                                    my_guid,
                                    '111111',
                                    'NONE',
                                    CAST(BILL_DATE AS TIMESTAMP),
                                    CAST(UPDT_DT AS TIMESTAMP),
                                    'READ',
                                    'PAPER',
                                    payer_customer,
                                    parsed_francises,
                                    '111111'
         INTO      invoice_header
              VALUES   (      SEQ_INVOICE_ID.CURRVAL,
                        TRIM (LEADING 0 FROM billing_document), --invoice_num
                        NULL,
                        BILL_DATE,                 --invoice_date
                        TO_PO_NUMBER,
                        NULL,
                        net_amount,
                        NULL,
                        tax_amt,
                        NULL,
                        NULL,
                        due_date,
                        NULL,
                        NULL,
                        NULL,
                        NULL,
                        NULL,
                        SYSTIMESTAMP,
                        SYSTIMESTAMP,
                        NET_AMOUNT_CURRENCY,
                        bc_value,
                        BILL_DATE)
         SELECT 
         src.billing_type,
              src.currency,
              src.billing_document,
              src.drop_ship_ind,
              src.to_po_number,
              src.to_purchase_order,
              src.due_date,
              src.bill_date,
              src.tax_amt,
              src.payer_customer,
              src.to_acct_no,
              src.bill_to_acct_no,
              src.net_amount,
              src.net_amount_currency,
              src.order_dt,
              src.to_customer,
              src.to_name,
              src.franchises,
              src.updt_dt,
              str_parser (src.FRANCHISES) parsed_franchises,
              'import' || TO_CHAR (CURRENT_TIMESTAMP, 'hhmissff') my_guid,
              i.bc_value
            FROM        BACKFILL_INVOICES src,
                 invsvc_owner.billing_codes i
         WHERE   i.bc_name = src.BILLING_TYPE;Some things to note
    1. Don't commit in a loop - you only add to the run time and load on the box ultimately reducing scalability and removing transactional integrity. Commit once at the end of the job.
    2. Make sure you specify the list of columns you are inserting into as well as the values or columns you are selecting. This is good practice as it protects your code from compilation issues in the event of new columns being added to tables. Also it makes it very clear what you are inserting where.
    3. If you use WHEN OTHERS THEN... to log something, make sure you either rollback or raise the exception. What you have done in your code is say - I don't care what the problem is, just commit whatever has been done. This is not good practice.
    HTH
    David
    Edited by: Bravid on Oct 13, 2011 4:35 PM

Maybe you are looking for

  • Database tab is disable in Web As ABAP technical system

    Hi All, When i am creating abap technical system in portal, 'database' tab is disable. Anyone can suggest ? How to push system information from back end using SLD? Thanks & Regards, Vijay

  • Error handling from MAXL into a batch file

    Hello all I need to know how do we pass a value to a batch file from MAXL script if an error occurs. I have used the following in my MAXL to catch an error. ======================== login username password on server01; Iferror 'error'; Define Label '

  • Refuses to automatically forward to hyperlinked page. How can I change this?

    When I come to a page shift (usually required by the site) a bar opens at the top saying FF will not automatically transfer me - I need to click an 'allow' box at the right of the bar. Never have seen this before last week - is there a setting I can

  • Records Management - SharePoint 2013

    Currently my organization uses Fortis SE as our content management system.  All the documents are either TIFFs or PDFs.  We outsource many of our documents to be scanned (TIFFs).  Then we import these images into Fortis along with a corresponding tex

  • JSP redirection

    I have setup a jsp file for user verification, making sure that the user has properly logged in to view a page. This JSP is included on each secure area page. If the user is not verified, I want to redirect them to another page, but I'm getting a ser