Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

All Blogs

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

    Search

    XML Feeds

    Google Ads

    Tags: sql server 2000

    comments

    SQL Puzzle: RIGHT without using the RIGHT function

    by SQLDenis on May 22, 2013 in categories Database Programming, Microsoft SQL Server. Article views: 2185 views

    I haven't done a puzzle for a long time so I figured let's do a simple one. Return the right 6 characters of the column but without using the RIGHT function. Here is what the table looks like CREATE TABLE #Puzzle(SomeCol CHAR(7)) INSERT #Puzzl…

    Read More...
    comments

    Today I was checking an older server and decided to run sp_helpdb. On a bunch of databases I noticed that the owner was ~~UNKNOWN~~. The only reason I noticed this was when I tried to look at a specific database which is mirrored. I was greeted with thi…

    Read More...
    comments

    If you look at the sys.sysobjects view, you will see an xtype column listed Object type. Can be one of the following object types: AF = Aggregate function (CLR) C = CHECK constraint D = Default or DEFAULT constraint F = FOREIGN KEY constraint L…

    Read More...
    comments

    Messing with your friendly DBA on April Fools' Day

    by SQLDenis on Mar 29, 2013 in categories Microsoft SQL Server Admin. Article views: 9838 views

    April Fools' Day is a day when people play practical jokes and hoaxes on each other. Why not trying to play some practical jokes on your friendly DBA :-) The first thing we are going to do is to spoof the host and program name. This is easy to do. Click on Connect, choose Database Engine, you will see the following box

    Read More...
    comments

    There was a requirement to create a new user who would have only insert permissions to one table, this user would also have insert and select permissions to another table. This is pretty simple to accomplish. First create this simple database with tw…

    Read More...
    comments

    The other day I was doing some testing and then from the same connection I executed a stored procedure only to be greeted with the following message Msg 213, Level 16, State 1, Procedure prTestTemp, Line 5 Column name or number of supplied values do…

    Read More...
    comments

    Sometimes you want to quickly see if there are any databases or logs being backed up or restored at this moment. I blogged at one point how you can check how much longer the restore will take here: How much longer will the SQL Server database restore ta…

    Read More...
    comments

    Sometimes you want to quickly see how many files a database has, how much space a file is using and how much space is free. You can use the sysfiles/sys.files views or compatible views for that. From SQL Server 2005 onward you can also use the sys.datab…

    Read More...
    comments

    A SQL Server Support Windows Phone App has been released to the store. This app will work on Windows Phone 7 as well as Windows Phone 8 Description from the site Get quick access to SQL Server and SQL Azure troubleshooting content from Microsof…

    Read More...
    comments

    Sometimes you want to quickly see what tables have the most rows in your database. This is especially rue if you inherited a new database and you want to know some stats about this database. Instead of doing a count(*) against every table, I usually just use the sp_spaceused stored procedure. this will run many times faster, usually it is instantaneous.

    Read More...

    :: Next >>