GithubHelp home page GithubHelp logo

invaderzim85 / mssqltoolbelt Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 1.0 30.38 MB

Helper tool which provides a search, a class generator, a list of all custom tables, a definition export and some replication information of a MsSql database.

License: MIT License

C# 98.77% PowerShell 1.23%
helper sql mssql replication table classgenerator csharp efcore mahapps net8

mssqltoolbelt's Introduction

MsSqlToolBelt

Logo

Releases

General

The program MsSqlToolBelt is a little helper tool which provides a search, a list of all custom table types of a MSSQL database and a C# class generator

Usage

For a complete manuel of the tool please take a look here: wiki

Changelog

  • 24.21.0.806:
    • Added possibility to add custom scheme colors
    • Added search options

mssqltoolbelt's People

Contributors

dependabot[bot] avatar invaderzim85 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

fasteddys

mssqltoolbelt's Issues

Data annotation (DataType)

The data annotation for the data type has to be it's own attribute:

[Key]
[Column("Datum")]
[DataType(DataType.Date)]
public DateTime CreationDateTime { get; set; }

Max. Length shows wrong value

The max. length shows the wrong value.

SELECT DISTINCT
    c.[name],
    c.max_length AS [MaxLength]
FROM
    sys.columns AS c

    INNER JOIN sys.tables AS t
    ON t.object_id = c.object_id
WHERE
    t.name = 'CommentTable';

SELECT
    COLUMN_NAME,
    CHARACTER_MAXIMUM_LENGTH,
    CHARACTER_OCTET_LENGTH
FROM
    INFORMATION_SCHEMA.COLUMNS
WHERE
    TABLE_NAME = 'CommentTable'

image

Copy & Paste Issue

There is an issue with the copy function within the table grid (search)

FK not shown

The foreign keys are missing in the index list.

SQL query to load the FKs:

SELECT
    *
FROM
    sys.foreign_keys AS fk

    INNER JOIN sys.tables AS t
    ON t.object_id = fk.parent_object_id
WHERE
    t.[name] = 'TABLENAME';

Index-Defragmentation

General

It's possible to load the defragmentation of table indexes with the Microsoft.SqlServer.Management.Smo class.

Functions

The following functions should be added:

  1. Possibility to load the defragmentation of a single table
  2. Possibility to rebuild an index of a single table
  3. Possibility to load the defragmentation of a list of tables. It should be possible to add wildcards, so that the user can specify which table he/she likes to see.
  4. Possibility to rebuilt the indexes which were loaded in step 3.
  5. Export function (CSV, Markdown, JSON)

NOTE:

Since the process is very computationally intensive or takes a long time, the function should be designed in such a way that the user can cancel it and that the normal function of the program is not impaired.

ClassGenTemplate - usings

Add the following usings to the class generator template which is used when a namespace is specified:

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

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.