Database maintenance for sqlserver database to improve performance

In our company sqlserver 2008 R2 is working as a project server database.
I want to know commands for database maintenance.
Please let me know all command in order which i need to run in sqlserver for database maintenance.
because i want to increase performance of projectserver 2010.

Hi John.Eddie,
For increasing SQL Server performance, you can do full daily backup, transaction log backups, check database integrity, rebuild index and update statistics in database maintenance plan.
 However, you need to note that running "Shrink Database", it causes disk and as well as index fragmentation and leads to performance issues.
To ensure your database stays healthy and available, there are a few "'must do" tasks. For example:
1.Remove excessive transaction log file fragmentation.
2.Set auto-growth correctly.
3.Turn off any scheduled shrink operations.
4.Turn on AUTO_CREATE_STATISTICS and AUTO_UPDATE_STATISTICS, plus have a regular process in place to update statistics.
5.Have a regular process to run DBCC CHECKDB, take full database backups, plus differential and log backups for point-in-time recovery.
For more information about database maintenance, you can review the following article.
http://technet.microsoft.com/en-us/magazine/2008.08.database.aspx
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support

Similar Messages

  • Alternate for inner join to improve performance

    Hi all,
    I have used an inner join query to fetch data from five different tables into an internal table with where clause conditions.
    The execution time is almost 5-6 min for this particular query(I have more data in all five DB tables- more than 10 million records in every table).
    Is there any alternate for inner join to improve performance.?
    TIA.
    Regards,
    Karthik

    Hi All,
    Thanks for all your interest.
    SELECT  a~object_id a~description a~descr_language
                a~guid AS object_guid a~process_type
                a~changed_at
                a~created_at AS created_timestamp
                a~zzorderadm_h0207 AS cpid
                a~zzorderadm_h0208 AS submitter
                a~zzorderadm_h0303 AS cust_ref
                a~zzorderadm_h1001 AS summary
                a~zzorderadm_h1005 AS summary_uc
                a~zzclose_date     AS clsd_date
                d~stat AS status
                f~priority
                FROM crmd_orderadm_h AS a INNER JOIN crmd_link AS b ON  a~guid = b~guid_hi
                INNER JOIN crmd_partner AS c ON b~guid_set = c~guid
                INNER JOIN crm_jest AS d ON objnr  = a~guid
                INNER JOIN crmd_activity_h AS f ON f~guid = a~guid
                INTO CORRESPONDING FIELDS OF TABLE et_service_request_list
                WHERE process_type IN lt_processtyperange
                AND   a~created_at IN lt_daterange
                AND   partner_no IN lr_partner_no
                AND   stat IN lt_statusrange
                AND   object_id IN lt_requestnumberrange
                AND   zzorderadm_h0207 IN r_cpid
                AND   zzorderadm_h0208 IN r_submitter
                AND   zzorderadm_h0303 IN r_cust_ref
                AND   zzorderadm_h1005 IN r_trans_desc
                AND   d~inact = ' '
                AND   b~objtype_hi = '05'
                AND   b~objtype_set = '07'.
                f~priority
                FROM crmd_orderadm_h AS a INNER JOIN crmd_link AS b ON  a~guid = b~guid_hi
                INNER JOIN crmd_partner AS c ON b~guid_set = c~guid
                INNER JOIN crm_jest AS d ON objnr  = a~guid
                INNER JOIN crmd_activity_h AS f ON f~guid = a~guid
                INTO CORRESPONDING FIELDS OF TABLE et_service_request_list
                WHERE process_type IN lt_processtyperange
                AND   a~created_at IN lt_daterange
                AND   partner_no IN lr_partner_no
                AND   stat IN lt_statusrange
                AND   object_id IN lt_requestnumberrange
                AND   zzorderadm_h0207 IN r_cpid
                AND   zzorderadm_h0208 IN r_submitter
                AND   zzorderadm_h0303 IN r_cust_ref
                AND   zzorderadm_h1005 IN r_trans_desc
                AND   d~inact = ' '
                AND   b~objtype_hi = '05'
                AND   b~objtype_set = '07'.

  • Database not found/Error: ORA-16621: database name for ADD DATABASE must be

    I am new to Data Guard and am trying to set up Data Guard Broker. I had created a configuration file with both my primary and standby databases and at one time I could show both databases. But now I can no longer show the standby database nor can I enable, disable or reinstate it. Here is what I have:
    Primary Database: orcl10g
    Standby Database: 10gSB
    DGMGRL> show configuration
    Configuration
    Name: orcl10g
    Enabled: YES
    Protection Mode: MaxPerformance
    Fast-Start Failover: DISABLED
    Databases:
    orcl10g - Primary database
    10gSB - Physical standby database
    Current status for "orcl10g":
    SUCCESS
    DGMGRL> show database verbose orcl10g
    Database
    Name: orcl10g
    Role: PRIMARY
    Enabled: YES
    Intended State: ONLINE
    Instance(s):
    orcl10g
    Properties:
    InitialConnectIdentifier = 'orcl10g'
    LogXptMode = 'ASYNC'
    Dependency = ''
    DelayMins = '0'
    Binding = 'OPTIONAL'
    MaxFailure = '0'
    MaxConnections = '1'
    ReopenSecs = '300'
    NetTimeout = '180'
    LogShipping = 'ON'
    PreferredApplyInstance = ''
    ApplyInstanceTimeout = '0'
    ApplyParallel = 'AUTO'
    StandbyFileManagement = 'AUTO'
    ArchiveLagTarget = '0'
    LogArchiveMaxProcesses = '30'
    LogArchiveMinSucceedDest = '1'
    DbFileNameConvert = '10gSB, orcl10g'
    LogFileNameConvert = '/oracle/oracle/product/10.2.0/oradata/orcl10g/redo01.log, /oracle/oracle/product/10.2.0/oradata/10gSB/redo01.log, /oracle/oracle/product/10.2.0/oradata/orcl10g/redo02.log, /oracle/oracle/product/10.2.0/oradata/10gSB/redo02.log, /oracle/oracle/product/10.2.0/oradata/orcl10g/redo03.log, /oracle/oracle/product/10.2.0/oradata/10gSB/redo03.log'
    FastStartFailoverTarget = ''
    StatusReport = '(monitor)'
    InconsistentProperties = '(monitor)'
    InconsistentLogXptProps = '(monitor)'
    SendQEntries = '(monitor)'
    LogXptStatus = '(monitor)'
    RecvQEntries = '(monitor)'
    HostName = 'remarkable.mammothnetworks.com'
    SidName = 'orcl10g'
    LocalListenerAddress = '(ADDRESS=(PROTOCOL=tcp)(HOST=remarkable.mammothnetworks.com)(PORT=1521))'
    StandbyArchiveLocation = '/oracle/flash_recovery_area/orcl10g/archivelog'
    AlternateLocation = ''
    LogArchiveTrace = '1024'
    LogArchiveFormat = '%t_%s_%r.arc'
    LatestLog = '(monitor)'
    TopWaitEvents = '(monitor)'
    Current status for "orcl10g":
    SUCCESS
    DGMGRL> show database verbose 10gSB
    Object "10gsb" was not found
    DGMGRL>
    DGMGRL> remove database 10gSB
    Object "10gsb" was not found
    DGMGRL>
    DGMGRL> reinstate database 10gSB
    Object "10gsb" was not found
    DGMGRL>
    DGMGRL> enable database 10gSB
    Object "10gsb" was not found
    DGMGRL>
    DGMGRL> add database '10gSB' as
    connect identifier is 10gSB
    maintained as physical;Error: ORA-16621: database name for ADD DATABASE must be unique
    Failed.
    How can I get Data Guard to see the standby database correctly again?

    Thank you for the constructive feedback. I have been able to make progress on this issue.
    I did check the Data Guard Log files as you suggested. I did not find anything when I checked them before but this time I found the following:
    DG 2011-06-16-17:23:18 0 2 0 RSM detected log transport problem: log transport for database '10gSB' has the following error.
    DG 2011-06-16-17:23:18 0 2 0 RSM0: HEALTH CHECK ERROR: ORA-16737: the redo transport service for standby database "10gSB" has an error
    DG 2011-06-16-17:23:18 0 2 0 NSV1: Failed to connect to remote database 10gSB. Error is ORA-12514
    DG 2011-06-16-17:23:18 0 2 0 RSM0: Failed to connect to remote database 10gSB. Error is ORA-12514
    DG 2011-06-16-17:23:18 0 2 753988034 Operation CTL_GET_STATUS cancelled during phase 2, error = ORA-16778
    DG 2011-06-16-17:23:18 0 2 753988034 Operation CTL_GET_STATUS cancelled during phase 2, error = ORA-16778
    I verified that I am able to connect to both the primary and standby databases via external connections:
    -bash-3.2$ lsnrctl status
    LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-JUN-2011 12:41:03
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
    Start Date 17-JUN-2011 01:40:30
    Uptime 0 days 11 hr. 0 min. 32 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
    Listener Log File /oracle/oracle/product/10.2.0/db_1/network/log/listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=remarkable.mammothnetworks.com)(PORT=1521)))
    Services Summary...
    Service "10gSB" has 1 instance(s).
    Instance "10gSB", status READY, has 1 handler(s) for this service...
    Service "10gSB_DGB" has 1 instance(s).
    Instance "10gSB", status READY, has 1 handler(s) for this service...
    Service "10gSB_XPT" has 1 instance(s).
    Instance "10gSB", status READY, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl10g" has 1 instance(s).
    Instance "orcl10g", status READY, has 1 handler(s) for this service...
    Service "orcl10gXDB" has 1 instance(s).
    Instance "orcl10g", status READY, has 1 handler(s) for this service...
    Service "orcl10g_DGB" has 1 instance(s).
    Instance "orcl10g", status READY, has 1 handler(s) for this service...
    Service "orcl10g_XPT" has 1 instance(s).
    Instance "orcl10g", status READY, has 1 handler(s) for this service...
    The command completed successfully
    -bash-3.2$
    -bash-3.2$
    -bash-3.2$ sqlplus system/dbas4ever@orcl10g
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jun 17 12:43:41 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    -bash-3.2$ sqlplus system/dbas4ver@10gSB
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jun 17 12:43:59 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    ERROR:
    ORA-01033: ORACLE initialization or shutdown in progress <== I think this is normal since the database is in mount mode
    Enter user-name:
    I also checked the listener log file and did see and error associated with a known bug:
    WARNING: Subscription for node down event still pending
    So I added the following to the listener.ora file and bounced the listener:
    SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
    That seems to have taken care of the error.
    The following is my listener.ora file:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /oracle/oracle/product/10.2.0/db_1)
    (PROGRAM = extproc)
    (SID_DESC = ( GLOBAL_DBNAME = 10gsb_DGMGRL.remarkable.mammothnetworks.com )
    ( SERVICE_NAME = 10gsb.remarkable.mammothnetworks.com )
    ( SID_NAME = 10gsb )
    ( ORACLE_HOME = /oracle/oracle/product/10.2.0/db_1 )
    (SID_DESC = ( GLOBAL_DBNAME = orcl10g_DGMGRL.remarkable.mammothnetworks.com )
    ( SERVICE_NAME = orcl10g.remarkable.mammothnetworks.com )
    ( SID_NAME = orcl10g )
    ( ORACLE_HOME = /oracle/oracle/product/10.2.0/db_1 )
    (SID_DESC = ( GLOBAL_DBNAME = orcl10g.remarkable.mammothnetworks.com )
    ( SERVICE_NAME = orcl10g.remarkable.mammothnetworks.com )
    ( SID_NAME = orcl10g )
    ( ORACLE_HOME = /oracle/oracle/product/10.2.0/db_1 )
    (SID_DESC = ( GLOBAL_DBNAME = 10gsb.remarkable.mammothnetworks.com )
    ( SERVICE_NAME = 10gsb.remarkable.mammothnetworks.com )
    ( SID_NAME = 10gsb )
    ( ORACLE_HOME = /oracle/oracle/product/10.2.0/db_1 )
    SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
    I again tried connecting externally to the standby database:
    -bash-3.2$ sqlplus system/dbas4ever@10gSB
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jun 17 13:09:00 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    ERROR:
    ORA-01033: ORACLE initialization or shutdown in progress
    Enter user-name:
    and see this in the listener.log file:
    17-JUN-2011 13:10:22 * (CONNECT_DATA=(SERVICE_NAME=10gSB_XPT)(SERVER=dedicated)(CID=(PROGRAM=oracle)(HOST=remarkable.mammothnetworks.com)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=199.187.124.130)(PORT=11357)) * establish * 10gSB_XPT * 0
    17-JUN-2011 13:10:22 * (CONNECT_DATA=(SERVICE_NAME=10gSB_XPT)(SERVER=dedicated)(CID=(PROGRAM=oracle)(HOST=remarkable.mammothnetworks.com)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=199.187.124.130)(PORT=11358)) * establish * 10gSB_XPT * 0
    17-JUN-2011 13:10:24 * service_update * 10gSB * 0
    17-JUN-2011 13:10:30 * (CONNECT_DATA=(SID=orcl10g)(CID=(PROGRAM=perl)(HOST=remarkable.mammothnetworks.com)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=25119)) * establish * orcl10g * 0
    17-JUN-2011 13:10:30 * (CONNECT_DATA=(SID=orcl10g)(CID=(PROGRAM=perl)(HOST=remarkable.mammothnetworks.com)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=25120)) * establish * orcl10g * 0
    17-JUN-2011 13:10:30 * (CONNECT_DATA=(SID=orcl10g)(CID=(PROGRAM=emagent)(HOST=localhost.localdomain)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=25121)) * establish * orcl10g * 0
    17-JUN-2011 13:11:22 * (CONNECT_DATA=(SERVICE_NAME=10gSB_XPT)(SERVER=dedicated)(CID=(PROGRAM=oracle)(HOST=remarkable.mammothnetworks.com)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=199.187.124.130)(PORT=11420)) * establish * 10gSB_XPT * 0
    17-JUN-2011 13:11:22 * (CONNECT_DATA=(SERVICE_NAME=10gSB_XPT)(SERVER=dedicated)(CID=(PROGRAM=oracle)(HOST=remarkable.mammothnetworks.com)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=199.187.124.130)(PORT=11422)) * establish * 10gSB_XPT * 0
    17-JUN-2011 13:11:24 * service_update * 10gSB * 0
    I tried again to see the database in Data Guard Broker:
    DGMGRL> show database 10gSB
    Object "10gsb" was not found
    however, I then was able to add the database in Data Guard Broker:
    DGMGRL> add database 10gSB
    as connect identifier is 10gSB
    maintained as physical;Database "10gsb" added <== this is progress!!!
    However the configuration shows the following:
    DGMGRL> show database 10gSB
    Database
    Name: 10gsb
    Role: PHYSICAL STANDBY
    Enabled: NO
    Intended State: OFFLINE
    Instance(s):
    10gSB
    Current status for "10gsb":
    DISABLED <=====
    So I tried to enable the database:
    DGMGRL> enable database 10gSB
    Error: ORA-16626: failed to enable specified object
    Failed.
    and I tried to reinstate the database:
    DGMGRL> reinstate database 10gSB
    Reinstating database "10gsb", please wait...
    Error: ORA-16653: failed to reinstate database
    Failed.
    Reinstatement of database "10gsb" failed
    So I checked the configuration and now see two entries for the standby database but with case differences:
    DGMGRL> show configuration
    Configuration
    Name: orcl10g
    Enabled: YES
    Protection Mode: MaxPerformance
    Fast-Start Failover: DISABLED
    Databases:
    orcl10g - Primary database
    10gSB - Physical standby database
    10gsb - Physical standby database (disabled)
    Current status for "orcl10g":
    SUCCESS
    Question: How do I get rid of 10gSB and enable 10gsb?

  • How will you find out no of standby databases configured for primary database from OS level

    How can find the number of standby databases configured for primary database from os level

    Check the alert log.
    The Alert log will always have Data Guard messages in it.
    Example
    cd /u01/app/oracle/diag/rdbms/primary/PRIMARY/trace
    tail -1700 alert_PRIMARY.log | more
    Wed Nov 13 13:35:26 2013
    ARC7: Standby redo logfile selected for thread 1 sequence 1164 for destination LOG_ARCHIVE_DEST_2
    LNS: Standby redo logfile selected for thread 1 sequence 1165 for destination LOG_ARCHIVE_DEST_2
    If you don't see messages like this it's probably not a Data Guard system.
    Or search it for :
    System parameters with non-default values:
    Which on Data Guard system will show things like:
    log_archive_dest_1 = "LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=PRIMARY"
    log_archive_dest_2 = "SERVICE=STANDBY LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=STANDBY"
    log_archive_dest_state_1 = "ENABLE"
    log_archive_dest_state_2 = "ENABLE"
    fal_server = "STANDBY"
    Best Regards
    mseberg

  • SharePoint 2010 Database maintenance for beginners / developers

    Hey,
    here is a thing which I concern myself with from time to time.
    As a fulltime developer for SharePoint, I'm not quite familiar with maintaining it's databases. So after I set up my dev environment I usually don't care about maintaining the system. The logical consequence is that the system begins to slow down after a
    while.
    I don't have the time (and - to be honest - not the muse) to deep dive into the recommended maintaing plans by microsoft but I want to keep the performance of my system on an acceptable level. So I read the best practices provided by microsoft about index
    defragmentation, reorganizing, shrinking and so on but for me it's quite difficult to fully dive into these things without spending to much of my business time.
    So I wander if there are any execution-ready T-SQL scripts or something like that, which I can run from time to time to prevent my databases from to high fragmentation. I found some scripts for a stored procedure which reorganizes a particular index. But
    what I am thinking about is a script which iterates through all databases, all tables and all indexes and reorganizes them.
    I'm not looking for the perfect mainenance plan to achieve the best possible performance - I just want to prevent my dev environment from slowing down to much.
    Are there any scripts like that out there? or do you have other tips for me?
    Thank you!

    Hi,
    The steps to configure the maintenance plan is very easy and wont take more than 10 minutes. It is one time activity. It is nothing but drag and drag drop the required tasks from the Tool bar. You can schedule the maintenance plan to run on specific
    time or can run directly on demand basis.
    http://social.technet.microsoft.com/wiki/contents/articles/13956.sharepoint-2010-how-to-create-a-sql-server-2008-r2-maintence-plan-for-sharepoint.aspx 
    If you are looking only for SQL scripts then you may need to post in SQL forum, because maintenance plans will be almost similar for SharePoint Databases/or any SQL DBs.
    Please remember to mark your question as answered &Vote helpful, if this solves/helps your problem. ******************************************************************************************
    Best Regards,
    Pavan Kumar Sapara
    s p kumar

  • Missing database instances in SQLServer:Databases perfmon counters

    After creating new databases on a default 2008 R2 instance of SQL Server, the new databases (instances) are missing from the perfmon counters under SQLServer:Databases.
    I have tried reloading the perfmon counters using unlodctr with no success. All SQL counters are present and only the new database instances are missing from this specific category.
    Querying dm_os_performance_counters also shows the instances are missing.
    select instance_name
    from sys.dm_os_performance_counters
    where object_name = 'SQLServer:Databases'
    I have verified that these counters are enabled and they are present and work for all 147 other databases in this SQL instance.
    There are no errors in the log.
    I am out of ideas and hope someone else has some.
    I'm not certain if this is the correct forum category so if I need to post elsewhere, please let me know.
    Thanks!

    Hi dmosley,
    From your description, only newly added database are missing from the perfmon counters. It seems that you encounter the same issue which is described in this
    blog. Please perform the following steps to work around this issue.
    1. Change the path to the BINN directory of the SQL Server instance you desire to correct.
    2. Unload the counters. For a default instance of SQL Server run this command: unlodctr MSSQLSERVER.
    3. Check the .ini files by running a command on command prompt: - dir *.ini.
    4. Execute lodctr /T:sqlctr.ini .
    5. Restart the remote registry and restart the machine.
    However, if the issue still persists, please help to collect log information for analysis. You can check the event log for WmiMgmt, PerfLib, PerfCtrs and LoadPerf warning and errors, or use Process Explorer, Process Monitor to gather detailed information.
    For more details, please review the following article.
    Troubleshooting: SQL Server (2005, 2008) Performance Counter Collection Problems
    http://blogs.msdn.com/b/psssql/archive/2009/03/03/troubleshooting-sql-server-2005-2008-performance-counter-collection-problems.aspx
    Thanks,
    Lydia Zhang
    If you have any feedback on our support, please click
    here.

  • Error occurred while processing SAP SQL Tools for SQLServer (Database Copy)

    Hello,
    We are currently running ERP 6 EP4 support stacks 6. Two weeks ago we
    refreshed our sandbox from QAS system and installed support stack 9 for
    testing. Kernel was also upgraded from sp69 to sp137 as a part of the
    support pack installation.
    This week, I was asked to do another refresh of sandbox from the QAS system. As the
    kernel was upgraded before to sp139, I copied back the previous kernel
    file sp69 to the kernel folder and started refresh process as usual.
    When I was running SAP for SQL, it ran successfully thorugh all the
    steps but failed in the final steps with the following error logs:
    =======================================================================
    An error occurred while processing option SAP Toools for MS SQL Server
    > Database Copy Completion( Last error reported by the step: System
    call failed. Error 2 (The system cannot find the file specified. ) in
    execution of system call 'CreateProcessAsUser' with parameter ( ,
    NULL, Program Files/sapinst_instdir/MSS/CPY, &StartupInfo,
    &ProcessInfo), line (631) in file (synxcchapp.cpp), stack trace:
    iaxxejsctl.cpp: 272: EJS_ControllerImpl::executeScript()
    d:\depot\bas\710_rel\bc_710-3_rel\gen\optu\ntamd64
    \ins\sapinst\impl\src\ejs\iaxxejsbas.hpp: 450:
    EJS_Base::dispatchFunctionCall() iaxxejsexp.cpp: 178:
    EJS_Installer::invokeModuleCall() synxcchapp.cpp: 228:
    CSyChildApplicationImpl::start(false) synxcchapp.cpp: 252:
    CSyChildApplicationImpl::doStart() .). You can now:
    Choose Retry to repeat the current step.
    Choose View Log to get more information about the error.
    Stop the option and continue with it later.
    Log files are written to C:\Program Files/sapinst_instdir/MSS/CPY.

    I looked at the logs, very similar error to the one that I already posted:
    ERROR      2011-07-08 09:29:49.861
               CJSlibModule::writeError_impl()
    MUT-03025  Caught ESyException in Modulecall: At line 631 file synxcchapp.cpp
    Call stack:
    iaxxejsctl.cpp: 272: EJS_ControllerImpl::executeScript()
    d:\depot\bas\710_rel\bc_710-3_rel\gen\optu\ntamd64\ins\sapinst\impl\src\ejs\iaxxejsbas.hpp: 450: EJS_Base::dispatchFunctionCall()
    iaxxejsexp.cpp: 178: EJS_Installer::invokeModuleCall()
    synxcchapp.cpp: 228: CSyChildApplicationImpl::start(false)
    synxcchapp.cpp: 252: CSyChildApplicationImpl::doStart()
    System call failed. Error 2 (The system cannot find the file specified.
    ) in execution of system call 'CreateProcessAsUser' with parameter (<token>, NULL, <command line for executable saplicense.exe, NULL, NULL, TRUE, 0x420, NULL, C:/Program Files/sapinst_instdir/MSS/CPY, &StartupInfo, &ProcessInfo), line (631) in file (synxcchapp.cpp), stack trace: iaxxejsctl.cpp: 272: EJS_ControllerImpl::executeScript()
    d:\depot\bas\710_rel\bc_710-3_rel\gen\optu\ntamd64\ins\sapinst\impl\src\ejs\iaxxejsbas.hpp: 450: EJS_Base::dispatchFunctionCall()
    iaxxejsexp.cpp: 178: EJS_Installer::invokeModuleCall()
    synxcchapp.cpp: 228: CSyChildApplicationImpl::start(false)
    synxcchapp.cpp: 252: CSyChildApplicationImpl::doStart()
    TRACE      2011-07-08 09:29:49.861 [iaxxejsbas.hpp:488]
               EJS_Base::dispatchFunctionCall()
    JS Callback has thrown unknown exception. Rethrowing.
    ERROR      2011-07-08 09:29:49.875 [sixxcstepexecute.cpp:971]
    FCO-00011  The step doLI with step key |SAPMSSTOOLS|ind|ind|ind|ind|0|0|MssSysLI|ind|ind|ind|ind|7|0|doLI was executed with status ERROR ( Last error reported by the step: System call failed. Error 2 (The system cannot find the file specified.
    ) in execution of system call 'CreateProcessAsUser' with parameter (<token>, NULL, <command line for executable saplicense.exe, NULL, NULL, TRUE, 0x420, NULL, C:/Program Files/sapinst_instdir/MSS/CPY, &StartupInfo, &ProcessInfo), line (631) in file (synxcchapp.cpp), stack trace: iaxxejsctl.cpp: 272: EJS_ControllerImpl::executeScript()
    d:\depot\bas\710_rel\bc_710-3_rel\gen\optu\ntamd64\ins\sapinst\impl\src\ejs\iaxxejsbas.hpp: 450: EJS_Base::dispatchFunctionCall()
    iaxxejsexp.cpp: 178: EJS_Installer::invokeModuleCall()
    synxcchapp.cpp: 228: CSyChildApplicationImpl::start(false)
    synxcchapp.cpp: 252: CSyChildApplicationImpl::doStart()
    TRACE      2011-07-08 09:29:49.886
      Call block:CallBackInCaseOfAnErrorDuringStepExecution
        function:CallTheLogInquirer
    is validator: true

  • Global Database Name for OCS Database with domainname that include a dash

    Hi guys,
    The domain name for the network that I'm installing OCS 10g have a dash in the domainname. When installing the OCS database, it stated that the global database name cannot have a dash. So I change the dash in domain name of the server with an underscore.
    After restart the installation, and putting the global database name with a underscore, the installation is sucessfull. My question is if I change back the server domain name back to include the dash, will this affect the running of the database ? and after the installation can I changed the global database name to include the dash ?
    Is there any to to ensure a database installation will be sucessfull with a dash in the domain name for the global database name ?
    Thanks for any info.
    Regards
    Lanang

    create a net service for oracle10g and provide the name of this service during HTML DB installation it is required for installation.

  • Global Database Name for OCS Database

    Hi guys,
    The domain name for the network that I'm installing OCS 10g have a dash in the domainname. When installing the OCS database, it stated that the global database name cannot have a dash. So I change the dash in domain name of the server with an underscore.
    After restart the installation, and putting the global database name with a underscore, the installation is sucessfull. My question is if I change back the server domain name back to include the dash, will this affect the running of the database ? and after the installation can I changed the global database name to include the dash ?
    Thanks for any info.
    Regards
    Lanang

    I was looking in the wrong place. I found the right documentation. Thanks all.
    Rename the global database name using an ALTER DATABASE statement. For example, enter:
    ALTER DATABASE RENAME GLOBAL_NAME TO sales.us.oracle.com;

  • Query for Existing Records( to improve performance)

    Hi Friends,
    I want to show only those records from A Table which is not in B Table.
    Table A--
    Ticket no Ticket date
    1 01-01-2009
    2 02-01-2009
    3 02-02-2009
    Table B---
    Ticket no Ticket date
    3 02-02-2009
    means only 1,2 should show.
    I am using EXISTS
    select ticket_no,ticket_date
    from A
    where not exists( select '1'
    from B
    where B.ticket_no=A.ticket_no
    and B.ticket_date=A.ticket_date
    is any other way to improve my query ?
    Help me out.
    KarTiK PareeK.

    SomeoneElse wrote:
    That should reduce cost up to 20%.That's doubtful.
    BTW: joins and operator sets will be much slower that EXISTS in that case.Maybe, maybe not.
    It's possible that the two queries wouldn't return the same results, so they wouldn't be comparable anyway.
    Minus also does a sort to eliminate duplicates. But maybe that's what the OP wanted.
    Of course, as usual we didn't get any sample tables, data, results...I wrote that based on my own research. I created two tables, populated them with sample data (1,000,000 rows each).
    What I wrote about 20% decrease in cost, was based on query time consumption and explain plan before and after analyzing tables.
    In my case, joins were slower. USE_* hints didn't help. MINUS was slower also.

  • How to open oracle listner for three database instances

    please help me with following questions
    I have 3 database instances
    orcl
    JIP02T
    JIP04T
    when i start the oracle database, does it start all 3 instances? when i start the oracle listner, does it start listner for all 3 instances?
    when i echo $ORACLE_SID
    [ora112@localhost admin]$ echo $ORACLE_SID
    orcl
    i can only see orcl and oracle listner is started only for one database instance.i can connect to only one database instance usign sql developer how can i start oracle database listner for other database instances as well

    ShishirTekadeR wrote:
    . oraenv
    Note that is "dot" SPACE oraenv
    You will be prompted for the value of ORACLE_SID (one of the databases). It looks like this:
    oracle:orcl$ . oraenv
    ORACLE_SID = [orcl] ? dwsbx
    The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 is /u01/app/oracle
    oracle:dwsbx$
    HIGHLY APPRECIATED U R IMP Tips!!!!!
    But it’s very difficult to remember & manually enter oracle SID & HOME details every time after run (. Oraenv)
    .profile creation is simple method and no need to remember SID & HOME details.(for multiple DB in one server)You don't have to "remember & manually enter oracle SID & HOME details every time after run " oraenv sets all those details for you. All you have to remember is the name of the instance you want to work with. The same thing you'd have to remember if you if you created (as you suggested) three different "profiles" - actually three different shell scripts, each to set the environment for a specific instance.
    Yes, I do place "default" settings in .bash_profile. But with multiple databases the "default" settings are often not going to be what you need so you'll still have to run some process to change them. Either a home-grown script or oraenv. And either way you will have to remember the names of the instances you have to chose from. So in general I see no advantage of reinventing the wheel.
    >
    >
    >
    As per user information
    He is using different port number for different instanceWhich accomplishes absolutely nothing except extra configuration headaches. It accomplishes nothing for security. It accomplishes nothing for availability.
    And also it is very simple method to manage three different DB in three different listener entry (for DB maintenance activity.)Not as easy as managing one default listener. By far the most frequent listener configuration issue I see on this forum is when people try to configure one listener per database.
    Single listener in multiple instance (if listener down all DB connection will affect)And why would the listener be down? I've been working full time with Oracle since version 7.3 - somewhere around 1995. I've NEVER seen a listener fall over and die. I have seen many people on this forum whose db connections failed because they were trying (unsucessfully) to configure multiple listeners.
    All of my servers are running multiple databases. I have one test server that is running close to a dozen separate databases. One listener. I've NEVER had a situation where I thought to myself, "Gee, it would really help if I had created a separate server for each database"
    >
    >
    Best Regards,
    Shishir Tekade.
    My Blog: http://shishirtekade.blogspot.com
    Edited by: ShishirTekadeR on Dec 27, 2012 10:29 PM
    Edited by: ShishirTekadeR on Dec 27, 2012 10:30 PM
    Edited by: ShishirTekadeR on Dec 27, 2012 10:31 PM

  • Fileproperty for each database

    Hi,
    i want to learn mydatabases file sizes(database file and log file)
    select * from sys.sysfiles gives that,but it is running for only one database.
    i want to learn that for each database,is it possible?
    Thanks

    it's giving that for only one database which is working on.
    To run this script for each database on the server, you'll need to set the database context for each database so that FILEPROPERTY can be used.  Your options are:
    Run a script to generate another with a USE statement for each database (Fabrizzio's suggestion)
    Run the script using the undocumented sp_MSforeachdb procedure with your script as a parameter (Prasad's suggestion)
    Write a script with a cursor over sys.databases and execute your script with a USE statement before each execution:
    DECLARE
    @SqlStatement nvarchar(MAX)
    ,@DatabaseName sysname;
    IF OBJECT_ID(N'tempdb..#DatabaseSpace') IS NOT NULL
    DROP TABLE #DatabaseSpace;
    CREATE TABLE #DatabaseSpace(
    DATABASE_NAME sysname
    ,LOGICAL_NAME sysname
    ,FILE_SIZE_MB decimal(12, 2)
    ,SPACE_USED_MB decimal(12, 2)
    ,FREE_SPACE_MB decimal(12, 2)
    ,FILE_NAME sysname
    DECLARE DatabaseList CURSOR LOCAL FAST_FORWARD FOR
    SELECT name FROM sys.databases;
    OPEN DatabaseList;
    WHILE 1 = 1
    BEGIN
    FETCH NEXT FROM DatabaseList INTO @DatabaseName;
    IF @@FETCH_STATUS = -1 BREAK;
    SET @SqlStatement = N'USE '
    + QUOTENAME(@DatabaseName)
    + CHAR(13)+ CHAR(10)
    + N'INSERT INTO #DatabaseSpace
    SELECT
    [DATABASE_NAME] = DB_NAME()
    ,[LOGICAL_NAME] = f.name
    ,[FILE_SIZE_MB] = CONVERT(decimal(12,2),round(f.size/128.000,2))
    ,[SPACE_USED_MB] = CONVERT(decimal(12,2),round(fileproperty(f.name,''SpaceUsed'')/128.000,2))
    ,[FREE_SPACE_MB] = CONVERT(decimal(12,2),round((f.size-fileproperty(f.name,''SpaceUsed''))/128.000,2))
    ,[FILENAME] = f.name
    FROM sys.database_files f;';
    EXECUTE(@SqlStatement);
    END
    CLOSE DatabaseList;
    DEALLOCATE DatabaseList;
    SELECT * FROM #DatabaseSpace;
    DROP TABLE #DatabaseSpace;;
    GO
    Dan Guzman, SQL Server MVP, http://weblogs.sqlteam.com/dang/

  • How to optimize Database Calls to improve performance of an application

    Hi,
    I have a performance issue with my applications. It takes a lot of time to load, as it is making several calls to the database. And, moreover, the resultset has more than 2000 records that are returned. I need to know what is the better way to improve the performance
    1. What is the solution to optimize the database calls so that I can improve the performance of my application and also improve on the trun around time to load the web pages.
    2. Stored procedures are a good way to get the data from the result set iteratively. How can I implement this solution in Java?
    This is very important, and any help is greatly appreciated.
    Thanks in Advance,
    Sailatha

    latha_kaps wrote:
    I have a performance issue with my applications. It takes a lot of time to load, as it is making several calls to the database. And, moreover, the resultset has more than 2000 records that are returned. I need to know what is the better way to improve the performance
    1. What is the solution to optimize the database calls so that I can improve the performance of my application and also improve on the trun around time to load the web pages.
    2. Stored procedures are a good way to get the data from the result set iteratively. How can I implement this solution in Java?
    This is very important, and any help is greatly appreciated.1. 2000 records inside a resultset are not a big number.
    2. Which RDBMS you use?
    Concerning the answer to 2. you have different possibilities. The best thing is always to handle as many transactions as possible inside the database. Therefore a stored procedure is the best approach imho.
    Below there is an example for an Oracle RDBMS.
    Assumption #1 you have created an object (demo_obj) in your Oracle database:
    create type demo_obj as object( val1 number, val2 number, val3 number);
    create type demo_array as table of demo_obj;
    /Assumption #2 you've created a stored function to get the values of the array in your database:
    create or replace function f_demo ( p_num number )
    return demo_array
    as
        l_array demo_array := demo_array();
    begin
        select demo_obj(round(dbms_random.value(1,2000)),round(dbms_random.value(2000,3000)),round(dbms_random.value(3000,4000)))
        bulk collect into l_array
          from all_objects
         where rownum <= p_num;
        return l_array;
    end;
    /For getting the data out of database use the following Java program (please watch the comments):
    import java.sql.*;
    import java.io.*;
    import oracle.sql.*;
    import oracle.jdbc.*;
    public class VarrayDemo {
         public static void main(String args[]) throws IOException, SQLException {
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              Connection conn = DriverManager.getConnection(
                        "jdbc:oracle:oci:@TNS_ENTRY_OF_YOUR_DB", "scott", "tiger"); // I am using OCI driver here, but one can use thin driver as well
              conn.setAutoCommit(false);
              Integer numRows = new Integer(args[0]); // variable to accept the number of rows to return (passed at runtime)
              Object attributes[] = new Object[3]; // "attributes" of the "demo_obj" in the database
              // the object demo_obj in the db has 3 fields, all numeric
              // create an array of objects which has 3 attributes
              // we are building a template of that db object
              // the values i pass below are just generic numbers, 1,2,3 mean nothing really
              attributes[0] = new Integer(1);
              attributes[1] = new Integer(2);
              attributes[2] = new Integer(3);
              // this will represent the data type DEMO_OBJ in the database
              Object demo_obj[] = new Object[1];
              // make the connection between oracle <-> jdbc type
              demo_obj[0] = new oracle.sql.STRUCT(new oracle.sql.StructDescriptor(
                        "DEMO_OBJ", conn), conn, attributes);
              // the function returns an array (collection) of the demo_obj
              // make the connection between that array(demo_array) and a jdbc array
              oracle.sql.ARRAY demo_array = new oracle.sql.ARRAY(
                        new oracle.sql.ArrayDescriptor("DEMO_ARRAY", conn), conn,
                        demo_obj);
              // call the plsql function
              OracleCallableStatement cs =
                   (OracleCallableStatement) conn.prepareCall("BEGIN ? := F_DEMO(?);END;");
              // bind variables
              cs.registerOutParameter(1, OracleTypes.ARRAY, "DEMO_ARRAY");
              cs.setInt(2, numRows.intValue());
              cs.execute();
              // get the results of the oracle array into a local jdbc array
              oracle.sql.ARRAY results = (oracle.sql.ARRAY) cs.getArray(1);
              // flip it into a result set
              ResultSet rs = results.getResultSet();
              // process the result set
              while (rs.next()) {
                   // since it's an array of objects, get and display the value of the underlying object
                   oracle.sql.STRUCT obj = (STRUCT) rs.getObject(2);
                   Object vals[] = obj.getAttributes();
                   System.out.println(vals[0] + " " + vals[1] + " " + vals[2]);
              // cleanup
              cs.close();
              conn.close();
    }For selecting 20.000 records it takes only a few seconds.
    Hth

  • Java.sql.SQLWarning: [Microsoft][SQLServer 2000 Driver for JDBC]Database

    HI!
    I am updating a table in sql server 2000 using PreparedStatement but as im trying to updateit. SQL is giving error or rather we can say warning.
    java.sql.SQLWarning: [Microsoft][SQLServer 2000 Driver for JDBC]Database changed to BRSHere BRS is my database name.
    no error is generated .all the PreparedStatement is executes normally.
    Can any one tell me anything about this

    All the PreparedStatement is executes normally.But data is not updated in the database.

  • Attached database failed for sever "blah". (Microsoft.SqlServer.Smo)

    ===================================
    Attach database failed for Server 'DENR-HP'.  (Microsoft.SqlServer.Smo)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1539+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
    Program Location:
       at Microsoft.SqlServer.Management.Smo.Server.AttachDatabase(String name, StringCollection files)
       at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabaseData.PrimaryFile.Attach()
       at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabase.SendDataToServer()
    ===================================
    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
    Program Location:
       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
       at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries)
       at Microsoft.SqlServer.Management.Smo.Server.AttachDatabaseWorker(String name, StringCollection files, String owner, AttachOptions attachOptions)
       at Microsoft.SqlServer.Management.Smo.Server.AttachDatabase(String name, StringCollection files)
    ===================================
    The database 'PlanningDB' cannot be opened because it is version 655. This server supports version 611 and earlier. A downgrade path is not supported.
    Could not open new database 'PlanningDB'. CREATE DATABASE is aborted. (.Net SqlClient Data Provider)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=948&LinkId=20476
    Server Name: (local)
    Error Number: 948
    Severity: 20
    State: 1
    Line Number: 1
    Program Location:
       at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
       at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)

    Hi,
    As Olaf’s post, you cannot restore or attach a database which is created from a higher version of SQL Server to a lower version of SQL Server.
    However, there are some ways which can help you to move a database to a lower version of SQL Server. I recommend you to use Generate Scripts Wizard of SQL Server Management Studio (SSMS), you can script all the database objects in SQL Server 2008, then run
    the SQL scripts in SQL Server 2005, for more details, you can follow the steps in this blog:
    How to migrate a SQL Server database to a lower version. Also you can try to use the Import and Export Wizard to move database from SQL Server 2008 to SQL Server 2005,for more details, please review this article:
    How to: Run the SQL Server Import and Export Wizard.
    Thanks
    Lydia Zhang

Maybe you are looking for