-- ------------------------------ Table structure for DbInfo-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[DbInfo]') AND type IN ('U'))
    DROP TABLE [dbo].[DbInfo]
GO
CREATE TABLE [dbo].[DbInfo] ([version] int NULL)
GO
ALTER TABLE [dbo].[DbInfo] SET (LOCK_ESCALATION = TABLE)
GO
-- ------------------------------ Records of DbInfo-- ----------------------------
INSERT INTO [dbo].[DbInfo] ([version]) VALUES (N'375960')
GO
-- ------------------------------ procedure structure for spGetPlanetDatabaseVersion-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[spGetPlanetDatabaseVersion]') AND type IN ('FN', 'FS', 'FT', 'IF', 'TF'))
    DROP PROCEDURE[dbo].[spGetPlanetDatabaseVersion]
GO
CREATE PROCEDURE [dbo].[spGetPlanetDatabaseVersion]
AS
BEGIN
BEGIN TRY
BEGIN TRAN
SELECT version FROM DbInfo
END TRY
BEGIN CATCH
IF @@TRANCOUNT > 0
ROLLBACK TRANSACTION  
print ERROR_MESSAGE()
END CATCH
IF @@TRANCOUNT > 0
COMMIT TRANSACTION
END