By product  
  Other  

Knowledgebase

Tips and How-to Articles for ApexSQL Tools


ApexSQL Refactor 2010 reports new major version (2011.01) available

Applies to
ApexSQL Refactor

Summary

This article explains what to do if ApexSQL Refactor 2010 reports that new major version of the ApexSQL Refactor (2011.01) is available when checking for updates.

Description
This is known ApexSQL Refactor issue that will be fixed soon.
The latest public release of the ApexSQL Refactor is 20100.05.0032 - there is no version 2011 yet.
Click cancel on the Check for updates window.

Last updated
December 05, 2011

Labels:

...


Download links to individual installers


To get individual product installer please send an email to support@apexsql.com with Product name and version required



Last updated
November 11,2011

Labels:

...


Basic steps for successful data recovery

Applies to
ApexSQL Recover

Description

This article explains what to do immediately after data is lost in order to minimize damage and maximize the chance for successful data recovery

Solution
When you experience data loss, immediately set the database to read only mode.

Next, copy the database *.mdf and *.ldf files and restore it under a different name.

Perform all recovery actions against the database copy - not the original.

This way, you will minimize the chance of your data being overwritten or lost beyond chance of recovery.

The generated recovery script should also be executed against the database copy.

Last updated
December 26, 2011

Labels:

...


Full-text indexes are created outside the COMMIT statement in the script

Applies to
ApexSQL Script

Summary

Full-text indexes are created outside the COMMIT statement in the generated script

Description
This is a known limitation of SQL Server.
Full-text indexes can't be created inside a transaction, so they are created before or after the COMMIT statement in the generated script.

The script will be executed without errors.

Last update
December 26, 2011

Labels:

...


How to use the application settings created in ApexSQL Edit 2008 with ApexSQL Edit ?

Applies to
ApexSQL Edit

Summary

This article explains how to move the custom application settings created in ApexSQL Edit 2008 and use them in latest ApexSQL Edit

Description
Before you start ApexSQL Edit for the first time, copy the Options.xml file from the ApexSQL Edit 2008 installation folder to ApexSQL Edit %LocalAppData% folder.

(e.g. from C:\Program Files\ApexSQL\ApexSQLEdit2008\ to C:\Program Files\ApexSQL\ApexSQLEdit20xx\

All other setting files can be preserved by copying the files in %LocalAppData% folder manually from “ApexSQLEdit” to “ApexSQLEdit20xx”.

Please note that you will not be able to preserve the settings that reside in the Layouts.xml file which stores toolbars, panels setup, window/dialog sizes and the custom shortcuts set for menu and toolbar commands.

Last updated
December 14, 2011

Labels:

...


How do I register and view HxS documentation

Applies to
ApexSQL Doc

Summary

This article explains how to register and view HxS documentation

Description
To register HxS documentation:
1) Go to the Doc installation folder \ Examples

2) Open the reg.bat file in Notepad

3) Match the parameters in the following lines to your environment:
"C:\Program Files\Microsoft Help 2.0 SDK\hxreg.exe" -n testDoc1 -c testDoc.HxS
"C:\Program Files\Microsoft Help 2.0 SDK\hxreg.exe" -n testDoc1 -i testDoc2 -s testDoc.HxS

- C:\Program Files\Microsoft Help 2.0 SDK” is the VSHIK installation path
- testDoc1 is the documentation's Namespace
- testDoc2 is the documentation's TitleID
- testDoc.HxS is the documentation's file name

4) Save and execute the file


To view HxS documentation:
1) Go to the Doc installation folder \ Examples

2) Open the view.bat file in Notepad
3) Match the parameters in the following line to your environment:
"C:\Program Files\Common Files\Microsoft Shared\Help\dexplore.exe" /helpcol ms-help://testDoc1/testDoc2

- C:\Program Files\Common Files\Microsoft Shared\Help\dexplore.exe is the path to the dexplore utility
- testDoc1 is the documentation's Namespace
- testDoc2 is the documentation's TitleID

4) Save and execute the file

Last updated
November 30, 2011

Labels:

...


How do I install the MS HTML Help 2 SDK

Applies to
ApexSQL Doc

Summary

The article explains how to install the MS HTML Help 2 SDK

Description
Help 2 SDK called VSHIK (Visual Studio Help Integration Kit) is required for creating and viewing MS HTML Help 2 documentation on your machine.

When you have VS .NET installed:

- Download VSHIK 2002 (Version 2.1) for Visual Studio 2002 (version 7.0).

- Download VSHIK 2003 (Version 2.2) for Visual Studio 2003 (version 7.1).

- Download Visual Studio 2005 SDK for Visual Studio 2005 (version 8.0).

- Download Visual Studio 2008 SDK for Visual Studio 2008 (version 9.0).

(Note: For Windows 7, Visual Studio 2005 SDK (version 2.5) or higher is required.
Path to Help 2.0 executable should be updated accordingly to:
C:\Program Files (x86)\Visual Studio 2005 SDK\2007.02\VisualStudioIntegration\Archive\HelpIntegration)


When you don’t have VS .NET installed:

1) Install the MS Help 2 Runtime (e.g. install MSDN, TechNet or .NET SDK)

2) Download VSHIK Installer

3) Expand the install file VSHIK.exe to a local folder (using e.g. Winzip)

4) Copy patch_vshik_setup.msi.vbs file from ApexSQL Doc installation folder to the folder with the unzipped VSHIK.

5) Run patch_vshik_setup.msi.vbs file to unblock the installer

6) Run Setup.exe to install VSHIK.

(Note: Full functionality of patched installation isn't guaranteed)

Last updated
Novmeber 30, 2011

Labels:

...


Installing Server-Side Components on the passive cluster node (IA64 system architecture)

Applies to
ApexSQL Log

Summary

This article explains how to install ApexSQL Log Server-Side Components on a passive node in a clustered environment for IA64 system architecture

Description
If ApexSQL Log is installed in a clustered environment, the Server-Side Components can be installed only on the active nodes, not on the passive ones. However, you can work around this issue.

Workaround
Please do the following:

1. Copy ApexSqlLog2010Xprocsia64.dll to SQL Server's Binn folder and rename it to ApexSqlLog2010Xprocs.dll

2. Run the following script on SQL Server:

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010', 'ApexSqlLog2010Xprocs.DLL'

IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010') EXEC master.dbo.xp_ApexSqlLog2010 20060604, 3, 'Installed xp_ApexSqlLog2010'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLogApi2010') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLogApi2010', 'ApexSqlLog2010Xprocs.DLL'

IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLogApi2010') EXEC master.dbo.xp_ApexSqlLogApi2010 20060604, 3, 'Installed xp_ApexSqlLogApi2010'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_Stop') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_Stop', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_Info') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_Info', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_Enable') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_Enable', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_Disable') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_Disable', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_State') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_State', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'sp_ApexSqlLog2010ConnectionMonitor_Start') EXEC master.dbo.sp_executesql N'CREATE PROCEDURE sp_ApexSqlLog2010ConnectionMonitor_Start AS EXEC master.dbo.xp_ApexSqlLog2010ConnectionMonitor @@SERVERNAME'

-- Stop and disable ApexSQL Server 2005 Connection Monitor if it exists.

IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlConnectionMonitor_Stop') EXEC master.dbo.xp_ApexSqlConnectionMonitor_Stop

IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlConnectionMonitor_Disable') EXEC master.dbo.xp_ApexSqlConnectionMonitor_Disable

3. Depending on your Operating System, create a folder:
  • For Windows Vista/7/Server 2008/Server 2008 R2: C:\ProgramData\ApexSQL\ApexSQLLog2010\<instance name>

  • For Windows XP/server 2003: C:\Documents and Settings\All Users\Application Data\ApexSQL\ApexSQLLog2010\<instance name>
4. Create the following subfolders in the newly created folder:
  • Binn

  • Config
5. Copy the following files to Binn folder from previous step:

ApexSql.Common.ArrayOfflineMetadata.dll
ApexSql.Common.CommonLib.dll
ApexSql.Common.DdlAuditing.dll
ApexSql.Common.Decry.dll
ApexSql.Common.Dependency.dll
ApexSQL.Common.GrammarParser.dll
ApexSql.Common.OfflineMetadata.dll
ApexSql.Common.Scripting.dll
ApexSql.Diff.dll
ApexSql.Engine.dll
ApexSql.Log.CommunicationProtocol.dll
ApexSqlLog2010Activation.exe
ApexSqlLog2010ConnectionMonitoria64.exe (rename it to) ApexSqlLog2010ConnectionMonitor.exe
ApexSqlLog2010Coreia64.dll (rename it to) ApexSqlLog2010Core.dll
ApexSqlLog2010ServerAuditoria64.exe (rename it to) ApexSqlLog2010ServerAuditor.exe
ApexSqlLog2010ServerHelperia64.exe (rename it to) ApexSqlLog2010ServerHelper.exe
ApexSqlLog2010ServerHelperia64.sys (rename it to) ApexSqlLog2010ServerHelper.sys
ApexSqlLogApi2010Activationia64.exe (rename it to) ApexSqlLogApi2010Activation.exe

6. Run the Command Prompt as administrator

7. Navigate to the Binn folder previously created in step 4

8. Run the following command:
ApexSqlLog2010ServerHelper.exe /load

Last updated
December 26, 2011

Labels:

...


Installing Server-Side Components on the passive cluster node (x64 system architecture)

Applies to
ApexSQL Log

Summary

This article explains how to install ApexSQL Log Server-Side Components on a passive node in a clustered environment for x64 system architecture

Description
If ApexSQL Log is installed in a clustered environment, the Server Side Components can be installed only on the active nodes, not on the passive ones. However, you can work around this issue.

Workaround
Please do the following:

1. Copy ApexSqlLog2010Xprocsx64.dll to SQL Server's Binn folder and rename it to ApexSqlLog2010Xprocs.dll

2. Run the following script on SQL Server:

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010', 'ApexSqlLog2010Xprocs.DLL'

IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010') EXEC master.dbo.xp_ApexSqlLog2010 20060604, 3, 'Installed xp_ApexSqlLog2010'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLogApi2010') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLogApi2010', 'ApexSqlLog2010Xprocs.DLL'

IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLogApi2010') EXEC master.dbo.xp_ApexSqlLogApi2010 20060604, 3, 'Installed xp_ApexSqlLogApi2010'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_Stop') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_Stop', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_Info') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_Info', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_Enable') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_Enable', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_Disable') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_Disable', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_State') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_State', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'sp_ApexSqlLog2010ConnectionMonitor_Start') EXEC master.dbo.sp_executesql N'CREATE PROCEDURE sp_ApexSqlLog2010ConnectionMonitor_Start AS EXEC master.dbo.xp_ApexSqlLog2010ConnectionMonitor @@SERVERNAME'

-- Stop and disable ApexSQL Server 2005 Connection Monitor if it exists.

IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlConnectionMonitor_Stop') EXEC master.dbo.xp_ApexSqlConnectionMonitor_Stop

IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlConnectionMonitor_Disable') EXEC master.dbo.xp_ApexSqlConnectionMonitor_Disable

3. Depending on your Operating System, create a folder:
  • For Windows Vista/7/Server 2008/Server 2008 R2: C:\ProgramData\ApexSQL\ApexSQLLog2010\<instance name>

  • For Windows XP/server 2003: C:\Documents and Settings\All Users\Application Data\ApexSQL\ApexSQLLog2010\<instance name>
4. Create the following subfolders in the newly created folder:
  • Binn

  • Config
5. Copy the following files to Binn folder from previous step:

ApexSql.Common.ArrayOfflineMetadata.dll
ApexSql.Common.CommonLib.dll
ApexSql.Common.DdlAuditing.dll
ApexSql.Common.Decry.dll
ApexSql.Common.Dependency.dll
ApexSQL.Common.GrammarParser.dll
ApexSql.Common.OfflineMetadata.dll
ApexSql.Common.Scripting.dll
ApexSql.Diff.dll
ApexSql.Engine.dll
ApexSql.Log.CommunicationProtocol.dll
ApexSqlLog2010Activation.exe
ApexSqlLog2010ConnectionMonitorx64.exe (rename it to) ApexSqlLog2010ConnectionMonitor.exe
ApexSqlLog2010Corex64.dll (rename it to) ApexSqlLog2010Core.dll
ApexSqlLog2010ServerAuditorx64.exe (rename it to) ApexSqlLog2010ServerAuditor.exe
ApexSqlLog2010ServerHelperx64.exe (rename it to) ApexSqlLog2010ServerHelper.exe
ApexSqlLog2010ServerHelperx64.sys (rename it to) ApexSqlLog2010ServerHelper.sys
ApexSqlLogApi2010Activationx64.exe (rename it to) ApexSqlLogApi2010Activation.exe

6. Run the Command Prompt as administrator

7. Navigate to the Binn folder previously created in step 4

8. Run the following command:
ApexSqlLog2010ServerHelper.exe /load

Last Updated
December 26, 2011

Labels:

...


Installing Server-Side Components on the passive cluster node (x86 system architecture)

Applies to
ApexSQL Log

Summary

This article explains how to install ApexSQL Log Server-Side Components on a passive node in a clustered environment for x86 system architecture

Description
If ApexSQL Log is installed in a clustered environment, the Server-Side Components can be installed only on the active nodes, not on the passive ones. However, you can work around this issue

Workaround
Please do the following:

1. Copy ApexSqlLog2010Xprocsx86.dll to SQL Server's Binn folder and rename it to ApexSqlLog2010Xprocs.dll

2. Run the following script on SQL Server:

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010', 'ApexSqlLog2010Xprocs.DLL'

IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010') EXEC master.dbo.xp_ApexSqlLog2010 20060604, 3, 'Installed xp_ApexSqlLog2010'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLogApi2010') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLogApi2010', 'ApexSqlLog2010Xprocs.DLL'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLogApi2010') EXEC master.dbo.xp_ApexSqlLogApi2010 20060604, 3, 'Installed xp_ApexSqlLogApi2010'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_Stop') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_Stop', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_Info') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_Info', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_Enable') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_Enable', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_Disable') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_Disable', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog2010ConnectionMonitor_State') EXEC master.dbo.sp_addextendedproc 'xp_ApexSqlLog2010ConnectionMonitor_State', 'ApexSqlLog2010Xprocs.DLL'

IF NOT EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'sp_ApexSqlLog2010ConnectionMonitor_Start') EXEC master.dbo.sp_executesql N'CREATE PROCEDURE sp_ApexSqlLog2010ConnectionMonitor_Start AS EXEC master.dbo.xp_ApexSqlLog2010ConnectionMonitor @@SERVERNAME'

-- Stop and disable ApexSQL Server 2005 Connection Monitor if it exists.

IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlConnectionMonitor_Stop') EXEC master.dbo.xp_ApexSqlConnectionMonitor_Stop

IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlConnectionMonitor_Disable') EXEC master.dbo.xp_ApexSqlConnectionMonitor_Disable

3. Depending on your Operating System, create a folder:
  • For Windows Vista/7/Server 2008/Server 2008 R2: C:\ProgramData\ApexSQL\ApexSQLLog2010\<instance name>

  • For Windows XP/server 2003: C:\Documents and Settings\All Users\Application Data\ApexSQL\ApexSQLLog2010\<instance name>
4. Create the following subfolders in the newly created folder:
  • Binn

  • Config
5. Copy the following files to Binn folder from previous step:

ApexSql.Common.ArrayOfflineMetadata.dll
ApexSql.Common.CommonLib.dll
ApexSql.Common.DdlAuditing.dll
ApexSql.Common.Decry.dll
ApexSql.Common.Dependency.dll
ApexSQL.Common.GrammarParser.dll
ApexSql.Common.OfflineMetadata.dll
ApexSql.Common.Scripting.dll
ApexSql.Diff.dll
ApexSql.Engine.dll
ApexSql.Log.CommunicationProtocol.dll
ApexSqlLog2010Activation.exe
ApexSqlLog2010ConnectionMonitorx86.exe (rename it to) ApexSqlLog2010ConnectionMonitor.exe
ApexSqlLog2010Corex86.dll (rename it to) ApexSqlLog2010Core.dll
ApexSqlLog2010ServerAuditorx86.exe (rename it to) ApexSqlLog2010ServerAuditor.exe
ApexSqlLog2010ServerHelperx86.exe (rename it to) ApexSqlLog2010ServerHelper.exe
ApexSqlLog2010ServerHelperx86.sys (rename it to) ApexSqlLog2010ServerHelper.sys
ApexSqlLogApi2010Activationx86.exe (rename it to) ApexSqlLogApi2010Activation.exe

6. Run the Command Prompt as administrator

7. Navigate to the Binn folder previously created in step 4

8. Run the following command:
ApexSqlLog2010ServerHelper.exe /load

Last updated
December 26, 2011

Labels:

...


How to audit operations for dropped or re-created tables

Applies to
ApexSQL Log

Summary

This article describes how to retrieve schemas and objects for the records that are shown as UNKNOWN in the Main grid. This happens when the table with the specific id doesn't exist in the database anymore, and the transactions for that object id exist in the transaction logs used. This happens when:
  • the table was dropped
  • the table was re-created (new id was assigned to it)



Description

Old table id needs to be mapped to the existing table. In case you need to see the tables created in the database, do the following:
Run ApexSQL Log, in the Filter setup tab, Operations sub-tab, uncheck all DML and DDL operations and check only CREATE table



The list of all created tables for the time range selected, or the whole transaction log, will be shown:



Now you can select the table you will map:

1. Copy the id from the Undo or Redo script tab in the Row details pane:



2. Click Old table ID mapping on the Home tab, in the Tools group, to map the table to the old id. Paste old id into the Old table ID field. In case the same table was dropped and recreated several times, you can map one table to several old ids:



3. After clicking refresh schema and table names will appear instead of UNKNOWN:



Last updated
December 26, 2011

Labels:

...


What kind of additional information I can send about a technical problem to help resolve it?

Description
If a bug is found, additional information to duplicate it may be helpful to resolve the problem

Solution

Helpful information:

• What is the Product name (i.e. ApexSQL Diff) and version?
• What is the operating system?
• What are your processor and RAM? To get this information on Windows 7:
    1. Click the Start button
    2. Click Control Panel
    3. Click System and Security
    4. Click System
    The steps are similar for other Windows versions
    In case your computer uses multiple processors, the processor type and speed as well as the number of processors installed are shown under System
• Do you work in a domain or in a workgroup?
• What is the SQL Server version? Use: SELECT @@version


Issue specific:
• Duplication steps if the error can be consistently duplicated
• Any script/code/database structure that provides context for the issue
• If possible a database snapshot or DDL scripts of particular objects required for reproducing the issue

Please send any relevant information to support@apexsql.com

Last update
November 24,2011

Labels:

...


What files should be backed up before copying ApexSQL Edit settings to another location or updating to a new version

Applies to
ApexSQL Edit

Summary

This article lists the files that should be backed up if you want to copy ApexSQL Edit settings to another computer or update ApexSQL Edit to a new version

Description

Note: The following variable names are used:

- %InstallFolder%
C:\Program Files\ApexSQL\ApexSQL Edit

- %MyDocuments%
C:\Documents and Settings\Administrator\My Documents\ for Windows XP
C:\Users\%UserName%\Documents\ApexSQL\ApexSQLEdit for Windows Vista/7

- %LocalAppData%
C:\Documents and Settings\Administrator\Local Settings\Application Data\ApexSQL\ApexSQLEdit for Windows XP
C:\Users\%UserName%\AppData\Local\ApexSQL\ApexSQLEdit for Windows Vista/7

- %VirtualStore%
C:\Users\$UserName$\AppData\Local\VirtualStore\Program Files (x86)\ApexSQL\ApexSQLEdit2008 for Windows Vista/7


You need to back up the files and the directories listed below:

- %InstallFolder%\Report Templates
- %InstallFolder%\SQL Templates
- %MyDocuments%\ApexSQL\ApexSQLEdit - default location for user files (projects, workspaces, etc)
- %MyDocuments%\ApexSQL\ApexSQLEdit\Snippets\My Snippets - default location of application and user defined Snippets
- %MyDocuments%\ApexSQL\ApexSQLEdit\Templates\My Templates - default location of application and user defined Templates,
- %LocalAppData%\ApexSQL\ApexSQLEdit\Backup - the application auto-backup history folder
- %LocalAppData%\ApexSQL\ApexSQLEdit\Settings - stores customization files for quick info, aliases, tab colors, macros, and more.
- %LocalAppData%\ApexSQL\Common\DisplayedServers.xml - The list of servers available in the Connect to Server dialog
- %LocalAppData%\ApexSQL\Common\LocatedServers.xml - The list of servers located in the Connect to Server dialog

If the user has administrative rights, or UAC is turned OFF:

- %InstallFolder%\edit.project
- %InstallFolder%\BlankQuery.xml
- %LocalAppData%\Favorites.xml
- %LocalAppData%\Options.xml
- %LocalAppData%\Queries.xml
- %LocalAppData%\Replacements.xml
- %LocalAppData%\Layouts.xml
(this file shouldn’t be transferred to the new installation if the destination operating system has lower desktop resolution as it may cause some windows to become inaccessible or hidden)


If the user has non-administrative rights, or UAC is turned ON:

- %VirtualStore%\edit.project
- %VirtualStore%\BlankQuery.xml
- %VirtualStore%\Favorites.xml
- %VirtualStore%\Options.xml
- %VirtualStore%\Queries.xml
- %VirtualStore%\Replacements.xml
- %VirtualStore%\Layouts.xml
(this file shouldn’t be transferred to the new installation if the destination operating system has lower desktop resolution as it may cause some windows to become inaccessible or hidden)

Last updated
November 30, 2011

Labels:

...


How To Choose between ApexSQL Audit and ApexSQL Log

Applies to
ApexSQL Log, ApexSQL Audit

Summary

ApexSQL has two auditing tools - ApexSQL Log and ApexSQL Audit. How do you know which one is for you? There is certainly a tradeoff when using one over the other. This article is an overview on how to choose between the two


Description

ApexSQL Audit is trigger-based auditing tool. It helps users create audit triggers that are fired by DML operations (INSERT, UPDATE and DELETE) and then store details of the operation into AUDIT_LOG_DATA and AUDIT_LOG_TRANSACTIONS auditing tables

Pros
- Total control over what tables and operations to audit
- Audit data is stored in SQL Server tables and can therefore be manipulated like any other SQL Server table. Audit history is immediately available
- Create your own reporting system based on the audit data stored in SQL Server tables
- Auditing of system databases is prevented to avoid database crashes if something goes wrong (system tables locking, etc.)
- As database administrators have full access to the data, they can change the data in the Audit tables or even truncate them
- ApexSQL Audit has a separate standalone reporting tool called ApexSQL Audit Viewer which can be purchased separately. It can be distributed to team members and end-users who only need to view auditing reports and don't need access to the administrative features of ApexSQL Audit

Cons
- It can cause performance degradation, as is the nature of all TRIGGERS
- It can't audit DDL (schema) changes


ApexSQL Log is a transaction log-based tool - it reads transaction logs to get audit data

Pros
- If the database is already in full recovery model, then there is no downside on the space/performance
- Move transaction logs to another server and audit there
- Better UNDO-ing of rogue actions/recovery
- Schedule ApexSQL Log reading the transaction logs, so the auditing is done during offline hours
- Audit DDL (schema) changes

Cons
- The database has to be in full recovery model. If the maintenance is not planned right, the hard drives can get filled with transaction logs and this can have an impact on the performance. The best way to manage the online transaction log size is to perform transaction log backups on regular basis, preferably daily

Both tools allow generating reports in various formats

Last updated
November 30, 2011

Labels: ,

...


How to automate daily reporting with ApexSQL Log

Applies to
ApexSQL Log

Summary

This article explains how to create and maintain a daily audit trail for your databases using ApexSQL Log

Description
We will address two scenarios in this article:
1. Everyday documenting of all transactions that occurred (incremental approach)
2. Everyday documenting only transactions that occurred on the given day (differential approach)

Incremental approach

To employ the incremental approach for a single database please:
1. copy and paste following lines into an textual editor of your choice:

@ECHO OFF
CD <Full_path_to_ApexSQL_Log_installation_folder>
ECHO apexsqllog.com
/S:<SQL_Server_name\SQL_Server_instance_name>
/D:<Database_name> /HTM:<Full_path_to_report_folder>\<Database_name>_%date:~10,4%-%date:~4,2%-%date:~7,2%.html > runreport.bat
START runreport.bat

2. Replace <Full_path_to_ApexSQL_Log_installation_folder> with the full path to the ApexSQL Log installation folder
3. Replace <SQL_Server_name\SQL_Server_instance_name> with the name of the SQL Server and SQL instance where the database you want to audit resides ( (local) if no named SQL Server instance exists)
4. Replace <Database_name> with the name of the database you want to audit
5. Replace <Full_path_to_report_folder> with the full path to the folder of your choice that will be used to store the reports
Please note:
In this example the report will be created in HTML format. To change the format of the report to CSV or XML use the /CSV: or /XML: switches respectively.
6. Save the file with the .bat extension
7. Schedule it to run daily via Windows Task Scheduler or Windows Scheduler
This way, each day at the time scheduled to run the task, an HTML report will be created containing detailed information on all of the transactions that have occurred on the database specified. The file name will be in a <Database_name>_<YY-MM-DD> format

Incremental approach can be employed for multiple databases even on different SQL Servers or instances. To do so, add the following block of code as many as times as there are different databases you want the report to be generated for.

ECHO apexsqllog.com
/S:<SQL_Server_name_1\SQL_Server_instance_name_1>
/D:<Database_name_1> /HTM:<Full_path_to_report_folder>\<Database_name_1>_%date:~10,4%-%date:~4,2%-%date:~7,2%.html > runreport1.bat
START runreport1.bat

Let’s say we want to audit three databases named A, B, and C. A is located on a local SQL Server which has no named instances installed, and B is located on the instance INST1 and C is located on the instance named INST2 of a remote SQL Server called SRVR. Furthermore, let’s say that ApexSQL Log is installed in its default location and that reports should be stored in D:\DatabaseAudit folder.
The batch file should look like this:

@ECHO OFF
CD C:\Program Files\ApexSQL\ApexSQLLog2010
ECHO apexsqllog.com
/S:(local) /D:A /HTM:D:\DatabaseAudit\A_%date:~10,4%-%date:~4,2%-%date:~7,2%.html > runreport1.bat
START runreport1.bat
ECHO apexsqllog.com
/S:SRVR\INST1 /D:B /HTM:D:\DatabaseAudit\B_%date:~10,4%-%date:~4,2%-%date:~7,2%.html > runreport2.bat
START runreport2.bat
ECHO apexsqllog.com
/S:SRVR\INST2 /D:C /HTM:D:\DatabaseAudit\C_%date:~10,4%-%date:~4,2%-%date:~7,2%.html
> runreport
3.bat
START runreport3.bat

Please note:
To exit all the command prompt windows that’ll spawn as a result of this process add

TASKILL /IM cmd.exe /F

command at the end of the batch file. Please note, that adding this command will kill all instances of the cmd.exe process, even those unrelated to this particular batch file and therefore caution is advised if you decide to use this command.

Differential approach

To employ the differential approach for a single database you only need to add the /FROM: switch to the apexsqllog.com command discussed earlier. This means that instead of

ECHO apexsqllog.com
/S:<SQL_Server_name\SQL_Server_instance_name>
/D:<Database_name> /HTM:<Full_path_to_report_folder>\<Database_name>_%date:~10,4%-%date:~4,2%-%date:~7,2%.html > runreport.bat

the batch files should contain the following line

ECHO apexsqllog.com
/S:<SQL_Server_name\SQL_Server_instance_name>
/D:<Database_name> /FROM:%date:~10,4%-%date:~4,2%-%date:~7,2% /HTM:<Full_path_to_report_folder>\<Database_name>_%date:~10,4%-%date:~4,2%-%date:~7,2%.html > runreport.bat

while the rest of the batch file content should remain unaffected.
This way, each day at the time scheduled to run the task, an HTML report will be created containing detailed information on all of the transactions that have occurred on the database on that day only.
For differential reports to be generated for multiple databases just add

/FROM:%date:~10,4%-%date:~4,2%-%date:~7,2%

to each instance of the ECHO apexsqllog.com... line in the batch file.

Labels:

...


How to install the server side components on remote Windows 7 / Windows Vista machine

Applies to
ApexSQL Log

Summary

This article explains how to install ApexSQL Log Server-side components to a remote SQL Server running on Windows 7 or Windows Vista

Symptoms
ApexSQL Log client application is running on Windows XP and you want to install ApexSQL Log Server-side components to a Windows 7 or Windows Vista remote machine. The remote machine has SQL Server 2008 installed, mixed authentication mode is allowed and SQL Service is running as LocalSystem

1. Start ApexSQL Log client application on the local machine and connect to the remote server using sa credentials

2. Accept installing Server-side components on the remote server

3. The SQL Server credentials dialog appears. Enter credentials for Windows administrator/SQL Server sysadmin account. After clicking OK, the same dialog reappears and keeps reappearing:



Cause
When User Account Control (UAC) is on, there’s no way to perform administrative tasks on the remote machine

Workaround
Install Server-side components locally on the remote machine

Last updated
December 26, 2011

Labels:

...


What’s the difference in the results for enabled and disabled Connection Monitor?

Applies to
ApexSQL Log

Summary

This article shows the difference in the results shown when Connection monitor is disabled and enabled

Description

SQL Server doesn’t store all relevant connection specific information (such as the name of the host or of the application used to initiate a transaction) in the transaction log. For instance, SQL Server 2000 may store only the SQL Server username, while SQL Server 2005, 2008 and 2008 R2 only store the sid of the user that initiated each transaction. Therefore, to obtain the Windows user name and other connection specific information, ApexSQL Log uses active connection monitoring.

NOTE:
Since SQL Server 2005, 2008 and 2008 R2 store the user’s sid, ApexSQL can obtain the Windows username without using the Connection monitor.
Here is an example of ApexSQL Log behavior when the Connection monitor is disabled on SQL Server 2008.

The following example applies both to SQL Server 2005 and 2008 R2 (if the Connection monitor is disabled on SQL Server 2000, the user column might show n/a values as well):




All other information are available:



When the Connection manager is enabled and running, the client host name and application name are available. In this example database changes were made using ApexSQL Edit from a host named DELL, as it can be viewed in ApexSQL Log:





Last updated
December 26, 2011

Labels:

...


ApexSQL Debug and ApexSQL Refactor uninstallation instructions

Applies to
ApexSQL Debug
ApexSQL Refactor

Summary

This article explains how to unistall ApexSQL Debug and/or ApexSQL Refactor.

Description
1) Download ApexSQL Debug installation file and ApexSQL Refactor installation file

2) Install ApexSQL Debug and ApexSQL Refactor using these installers

3) Go to Control Panel | Programs and Features, ApexSQL Debug and ApexSQL Recover are in the list and can be uninstalled

Last updated
November 29, 2011

Labels: ,

...


How to uninstall ApexSQL Log server-side components

Applies to
ApexSQL Log

Summary

This article discusses how to uninstall ApexSQL Log Server-side components

Solution
Just uninstalling ApexSQL Log client will not remove any of the Server-side components. There are two ways for removing the Server-side components, depending on whether you have the client application installed or not

If you haven't removed the ApexSQL Log client application, run this command from CLI:

ApexSQLLog.com /s: /uni

It will remove the extended stored procedures and all the files installed by ApexSQL Log

If you have removed the client application, please do the following:

1. Execute the following script:

IF EXISTS (SELECT *
FROM MASTER.DBO.SYSOBJECTS
WHERE NAME = 'xp_ApexSqlLog2010ConnectionMonitor_Stop')
EXEC MASTER.DBO.xp_ApexSqlLog2010ConnectionMonitor_Stop

IF EXISTS (SELECT *
FROM MASTER.DBO.SYSOBJECTS
WHERE NAME = 'xp_ApexSqlLog2010')
EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
'xp_ApexSqlLog2010'

IF EXISTS (SELECT *
FROM MASTER.DBO.SYSOBJECTS
WHERE NAME = 'xp_ApexSqlLogApi2010')
EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
'xp_ApexSqlLogApi2010'

IF EXISTS (SELECT *
FROM MASTER.DBO.SYSOBJECTS
WHERE NAME = 'xp_ApexSqlLog2010ConnectionMonitor')
EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
'xp_ApexSqlLog2010ConnectionMonitor'

IF EXISTS (SELECT *
FROM MASTER.DBO.SYSOBJECTS
WHERE NAME = 'xp_ApexSqlLog2010ConnectionMonitor_Stop')
EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
'xp_ApexSqlLog2010ConnectionMonitor_Stop'

IF EXISTS (SELECT *
FROM MASTER.DBO.SYSOBJECTS
WHERE NAME = 'xp_ApexSqlLog2010ConnectionMonitor_Info')
EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
'xp_ApexSqlLog2010ConnectionMonitor_Info'

IF EXISTS (SELECT *
FROM MASTER.DBO.SYSOBJECTS
WHERE NAME = 'xp_ApexSqlLog2010ConnectionMonitor_Enable')
EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
'xp_ApexSqlLog2010ConnectionMonitor_Enable'

IF EXISTS (SELECT *
FROM MASTER.DBO.SYSOBJECTS
WHERE NAME = 'xp_ApexSqlLog2010ConnectionMonitor_Disable')
EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
'xp_ApexSqlLog2010ConnectionMonitor_Disable'

IF EXISTS (SELECT *
FROM MASTER.DBO.SYSOBJECTS
WHERE NAME = 'xp_ApexSqlLog2010ConnectionMonitor_State')
EXEC MASTER.DBO.SP_EXECUTESQL
N'DROP PROCEDURE xp_ApexSqlLog2010ConnectionMonitor_State'

DBCC ApexSqlLog2010Xprocs (FREE)

This will remove the following procedures form your SQL Server instance:

xp_ApexSqlLog2010
xp_ApexSqlLog2010ConnectionMonitor
xp_ApexSqlLog2010ConnectionMonitor_Disable
xp_ApexSqlLog2010ConnectionMonitor_Enable
xp_ApexSqlLog2010ConnectionMonitor_Info
sp_ApexSqlLog2010ConnectionMonitor_State
xp_ApexSqlLog2010ConnectionMonitor_Stop
xp_ApexSqlLogApi2010


2. Delete the ApexSqlLog2010Xprocs.dll file saved in the SQL Server instance's 'Binn' folder
E.g. C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Binn

3. If running on Windows 7, Windows Vista or Windows Server 2008, delete the following files from the next folder:

C:\ProgramData\ApexSql\ApexSqlLog2010\<instance>\Binn
(Please note that this is a hidden folder)

For Windows XP and Windows Server 2003, the location for these components is in:

C:\Documents and Settings\All Users\Application Data\ApexSQL\ApexSQLLog2010\<instance>\Binn

1) ApexSql.Common.ArrayOfflineMetadata.dll
2) ApexSql.Common.CommonLib.dll
3) ApexSql.Common.DdlAuditing.dll
4) ApexSql.Common.Decry.dll
5) ApexSql.Common.Dependency.dll
6) ApexSQL.Common.GrammarParser.dll
7) ApexSql.Common.OfflineMetadata.dll
8) ApexSql.Common.Scripting.dll
9) ApexSql.Diff.dll
10) ApexSql.Engine.dll
11) ApexSql.Log.CommunicationProtocol.dll
12) ApexSqlLog2010Activation.exe
13) ApexSqlLog2010ConnectionMonitor.exe
14) ApexSqlLog2010Core.dll
15) ApexSqlLog2010ServerAuditor.exe
16) ApexSqlLog2010ServerHelper.exe
17) ApexSqlLog2010ServerHelper.sys
18) ApexSqlLogApi2010Activation.exe

To remove Server-side components using the Command Line Interface (CLI) run this command from CLI:

ApexSQLLog.com /s: /uni

NOTE:
Please note that uninstalling Server-side components doesn't remove
msdb.dbo.APEXSQL_LOG_LOGIN
and
APEXSQL_LOG_CONNECTION_MONITOR_SESSION
tables (which reside in the ApexSQLLog database by default).
The data contained in these tables (captured login information) is user's data and it is not being removed automatically

Last updated
December 26, 2011

Labels:

...


Installing local help files

Applies to
All ApexSQL client and server products starting from version 2010

Summary

This article describes how to install local help files for ApexSQL products


Description
For easier access and improved search capabilities of help topics we recommend using local help files

To install the local help file and secure faster access to the application’s help topics, do the following:

1. Go to our online documentation page

2. Select to download the chm help file


3. When presented with the File Download dialog click Save


4. Browse to the application install directory and click Save


5. When the download is finished, browse to the application install directory and locate the Compiled HTML Help file


6. Right-click the file and select Properties. In the file Properties dialog click Unblock and then OK. If you don’t have the Unblock button, just skip this step


7. To test the local help file, open the application and in the Resources tab, Support group click Help


8. The downloaded help file will open and will provide quick and easy access to help topics
The help file you have downloaded will open and you will have a quick and easy access to help topics

9. To discontinue refercing the local file just delete or rename the chm file in the application installation folder


Last updated
November 24, 2011

Labels:

...

© 2012 ApexSQL LLC All rights reserved | (919) 968-8444 | Contact us | Terms of use | Privacy policy