Check a Table is locked or not in Teradata