• it also makes no attempt to validate the string you pass in, so
    SELECT PARSENAME('x.y.z', 3)
    will always return 'x'
    ie it's a simple string-parsing method.

    Surely if you want to know the database name you just run
    SELECT DB_NAME()