Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x

Microsoft SQL Server

160K

Solutions

49K

Contributors

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

Share tech news, updates, or what's on your mind.

Sign up to Post

MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as well as instant password recovery. 
0
 

Expert Comment

by:Pantea tourang
Comment Utility
I have used it and i can say Good software to deal with i will surely recommend this to my colleagues
1
Get your Disaster Recovery as a Service basics
LVL 1
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
0
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple. The final solution for this task involved creating a custom text parser and then reading the data via the SQL Server Bulk Insert command.
0
 
LVL 49

Author Comment

by:Dale Fye
Comment Utility
I recently ran into a more complicated CSV file which had instances where there were more than one comma embedded within the same set of quotes ("abc, def, ghi") and even found a couple where the comma was the last character inside the quotes, and the code shown above did not resolve the issue, so I modified my ParseCSV function to the following:

Public Function ParseCSV(SourceFile As Variant, DestFileName As Variant)

    Dim ReplaceWhat As String
    Dim ReplaceWith As String
    Dim strLine As String
    Dim strLineOut As String
    Dim aryLine() As String
    Dim SourcefileNum As Integer
    Dim DestfileNum As Integer
    Dim lngLoop As Integer
    Dim lngLineCount As Long
    Dim bEmbedded As Boolean
    
    Debug.Print "Start: "; Now()
    
    ReplaceWhat = ","
    ReplaceWith = " "
       
    SourcefileNum = FreeFile()
    Open SourceFile For Input As #SourcefileNum
       
    DestfileNum = FreeFile()
    Open DestFileName For Output As #DestfileNum
    
    'Loop through the source file, parse it, and reconstruct it, one line at a time
    While Not EOF(SourcefileNum)
        Line Input #SourcefileNum, strLine
        aryLine = Split(strLine, ",")
           
        strLineOut = ""
        bEmbedded = False
        For lngLoop = LBound(aryLine) To UBound(aryLine)
           
           If (bEmbedded = True) And (aryLine(lngLoop) = Chr$(34)) Then
               strLineOut = strLineOut & ReplaceWhat
               bEmbedded = False
           ElseIf Left(aryLine(lngLoop), 1) = Chr$(34) And _
               Right(aryLine(lngLoop), 1) = Chr$(34) Then
                aryLine(lngLoop) = Mid(aryLine(lngLoop), 2)
                If Len(aryLine(lngLoop)) > 0 Then
                    aryLine(lngLoop) = Left(aryLine(lngLoop), Len(aryLine(lngLoop)) - 1)
                End If
                aryLine(lngLoop) = Replace(aryLine(lngLoop), ReplaceWhat, ReplaceWith)
                strLineOut = strLineOut & aryLine(lngLoop) & ReplaceWhat
            ElseIf Left(aryLine(lngLoop), 1) = Chr$(34) And _
                   Right(aryLine(lngLoop), 1) <> Chr$(34) Then
                aryLine(lngLoop) = Mid(aryLine(lngLoop), 2)
                strLineOut = strLineOut & Replace(aryLine(lngLoop), ReplaceWhat, ReplaceWith)
                bEmbedded = True
            ElseIf Right(aryLine(lngLoop), 1) = Chr$(34) And _
                   Left(aryLine(lngLoop), 1) <> Chr$(34) Then
                aryLine(lngLoop) = Left(aryLine(lngLoop), Len(aryLine(lngLoop)) - 1)
                strLineOut = strLineOut _
                           & Replace(aryLine(lngLoop), ReplaceWhat, ReplaceWith) _
                           & ReplaceWhat
                bEmbedded = False
            ElseIf (bEmbedded = True) Or (lngLoop = UBound(aryLine)) Then
                strLineOut = strLineOut & Replace(aryLine(lngLoop), ReplaceWhat, ReplaceWith)
            Else
                strLineOut = strLineOut _
                           & Replace(aryLine(lngLoop), ReplaceWhat, ReplaceWith) _
                           & ReplaceWhat
            End If
        Next
           
        Print #DestfileNum, strLineOut
    
        lngLineCount = lngLineCount + 1
    Wend
    
    Debug.Print "Done: "; Now()
    Debug.Print "Lines: "; lngLineCount

    Close #DestfileNum
    Close #SourcefileNum
    
End Function

Open in new window

Hope this helps anyone that needs to use a similar process.
0
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
7
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
2
 

Expert Comment

by:Hari Shankar
Comment Utility
Great Article. Thank u Vitor
1
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service does not exist as an installed service'”.
0
Windocks web UI
Windocks is an independent port of Docker's open source to Windows. This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
0
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this solution, while refreshing my recursive CTE skills.
0
Ready to get certified? Check out some courses that help you prepare for third-party exams.
6
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
0
 

Expert Comment

by:Gregorio Méndez
Comment Utility
Mr. Strauss, what a good tip, thanks a lot for your contribution
1
Become an Android App Developer
LVL 11
Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

The ultimate Citrix XenDesktop 7.x internals cheat sheet!
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down and start your ENTIRE Citrix environment.
0
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
2
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes. We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that with a PowerShell script.
0
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return different results based on different supplied parameters.
0
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
2
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
2
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
2
Balanced Data Distribution
I have a large data set and a SSIS package. How can I load this file in multi threading?
0
Load multiple files in SSIS
A couple of weeks ago, my client requested me to implement a SSIS package that allows them to download their files from a FTP server and archives them. Microsoft SSIS is the powerful tool which allows us to proceed multiple files at same time even we can use SSIS to download files from FTP server.
0
Veeam Disaster Recovery in Microsoft Azure
LVL 1
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts including details about the processes involved.
2
 
LVL 40

Author Comment

by:lcohan
Comment Utility
@Robb Hill -  sorry for late reply, just very busy lately..anyway, I would not modify the script I have for general usage as I believe it serves the purpose of notifying DBA's or sysadmins about locking/blocking occurring in their database servers however please see attached  script that you could adapt and use to serve your purpose. This script will kill the root blocker and the threshold is set at "@blocked_time > 120000" in the code where that value is in milliseconds so if root blocker is still blocking other processes after ~2 minutes it gets killed. I have it set on some older legacy 3rd party systems running SQL 2008 and 2008 R2 as a SQL job executed every 1 minute.

HTH and...please,please...use it cautiously and test it first in an environment where no damages/harm is done IF some SQL SPID gets killed.
Obviously with note above you or anyone else using it AS IS in a production environment and causing issues is sole responsible for the damages done.
TheSPIDkiller.sql
1
 
LVL 11

Expert Comment

by:Robb Hill
Comment Utility
One other thing that would make the initial email notification much more useful.

It currently only shows the blocked SQL versus the SQL that is blocking.

Any ideas on how to reformat the output to show both?
0
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied?
You can use SQL Server Initialize from Backup Transactional replication as described below.
1
 
LVL 40

Author Comment

by:lcohan
Comment Utility
Yes, there are some SQL code samples under each "dot"/item number and in my opinion they should stay in that place for the step by step instructions to be helpful.
0
 
LVL 40

Author Comment

by:lcohan
Comment Utility
Updated now and thanks for all the details/guidance.
0
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
1
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
0
load balancing
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
0
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
1
 
LVL 66

Expert Comment

by:Jim Horn
Comment Utility
A very well written article on essential SSIS functionality dealing with record changes.  Voting Yes.
0

Microsoft SQL Server

160K

Solutions

49K

Contributors

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.