Coder Social home page Coder Social logo

gitmelyk / dbhelper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from darko-martinovic/dbhelper

0.0 0.0 0.0 148 KB

The detailed explanation could be found on Red Gate SimpleTalk's link 'Programming SQL Server with SQL Server Management Objects Framework' https://www.red-gate.com/simple-talk/dotnet/c-programming/programming-sql-server-sql-server-management-objects-framework/

C# 97.04% TSQL 2.96%

dbhelper's Introduction

✅ DBHelper

SMO library which has, as a result, a DLL. In the library, you can find a lot of methods to work with SQL Server database.

Method description Method signature
To ensure a backup certificate exists EnsureBackupCertificateExists(ServerConnection,Ilog,ref string,string)
To create a backup certificate CreateBackupCertificate(ServerConnection,ILog,string,string,ref string, bool)
To take a copy only backup BackupDatabase(ServerConnection,ILog,ref string, bool)
To perform database check CheckDb(ServerConnection, ILog , ref string )
To put database in user access mode PutDbInUserMode(ServerConnection, DatabaseUserAccess ,bool, ILog, ref string)
To kill all user process for particular database KillAllProcessesForOneDatabase(ServerConnection, ref string)
To determine the log size DetermineLogSize(ServerConnection,ref string)
To set database in particular recovery mode SetRecoveryMode(ServerConnection,RecoveryModel,bool, ILog , ref string)
To restore the database RestoreDatabase(ServerConnection, ILog, ref string)
To shrink the database log ShrinkLog(ServerConnection,int,ILog,ref string)
To determine is the database online IsTheDataBaseOnLine(ServerConnection, ILog, ref string)

✅ IOHeLper

SQLCLR project which has, as a result, a DLL that should be published on the database server.

Method description Method signature
Can I perform backup? CanIPerformABackup(ServerConnection, ILog , ref string, DiskSizeUnit )
To delete old backup files DeleteBackupFiles(ServerConnection, ILog, ref string)
To determine number and size DetermineNumberOfBackupFiles(ServerConnection, ILog, ref int, ref Int64,ref string)

✅ Tester

A console application that could be useful to make some tests.

✅ SmoIntroduction

Class Name Class Description
CreateGraph Shows how to create NODE & EDGE tables
CreateMOTable Shows how to create the memory optimized tables
CreatePartitionScheme Shows how to create the partition scheme and the partition function
CreateStoredProc Shows how to create the stored procedure
CreateSysVerTempTables Shows how to create system-versioned ( temporal ) tables
CreateTable Shows how to create traditional - disk based tables
ExtProperties Shows how to manipulate with extended properties
ExtendedEvents Shows how to manipulate with extended events ( create session, add targets, add events )
ListAllUserDefinedDataTypes Shows how to get and recreate all user-defined data type in a database
RebuildIndexes Shows how to rebuild indexes and update statistics
ServerConfiguration Shows how to get the server configuration
ServerEvents Shows how to subsribe to server events
SetDefaultInitField Shows how to reduce the amount of T-SQL needed for object initialisation
TDE Shows how to encrypt the database

dbhelper's People

Contributors

darko-martinovic avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.