Click here to Skip to main content
15,893,594 members
Articles / Desktop Programming / WTL

Shrinking SQL Server Transaction Logs with SQL-DMO

Rate me:
Please Sign up or sign in to vote.
4.99/5 (49 votes)
21 Apr 2004CPOL9 min read 205.8K   4.7K   70  
Using SQL-DMO to shrink SQL Server transaction logs.
// wprtl.h : main header file for the PROJECT_NAME application

#ifndef __MAIN_H__
#define __MAIN_H__

#if defined( _MSC_VER ) && ( _MSC_VER >= 1020 )
	#pragma once
#endif

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

/////////////////////////////////////////////////////////////////////////////

#include "Wizard.h"
#include "WizPages.h"
#include "resource.h"

/////////////////////////////////////////////////////////////////////////////
// Shared data

#pragma comment( linker, "/SECTION:.Shared,RWS" )
#pragma data_seg( ".Shared" )
	__declspec( selectany ) HWND g_hwndMain = NULL;	// One instance for all processes
#pragma data_seg()

/////////////////////////////////////////////////////////////////////////////
// CApp:

class CApp : public CWinApp
{
public:
	CApp( void );
	virtual ~CApp( void );

public: // Overrides	
	virtual BOOL InitInstance();

public:
	BOOL	DoEvents( void );
	BOOL	IsFirstInstance( void );
	BOOL	IsOsVersionOk( void );
	BOOL	IsSqlServerVersionOk( void );
	void	GetLogFileName( void );

public: // Implementation

	DECLARE_MESSAGE_MAP()

public:
	LPCTSTR	m_pszLogName;
};

/////////////////////////////////////////////////////////////////////////////

extern CApp theApp;

/////////////////////////////////////////////////////////////////////////////
#endif // __MAIN_H__
/////////////////////////////////////////////////////////////////////////////

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) SafeNet Inc
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions