cancel
Showing results for 
Search instead for 
Did you mean: 

TSM ::: sp_deletesmobj example

ganimede_dignan
Contributor
0 Kudos

Hi,

I'm not able to delete oldest backup with sp_deletesmobj stored procedure... I'm sure that I'm wrong...

If I run with...

sp_deletesmobj "syb_tsm", "PRD"

OK, all object are deleted... but I would like to delete only older then 50 days

declare @PIPPO DATETIME

set @PIPPO = DATEADD(day, -50, GETDATE())

exec sp_deletesmobj "syb_tsm", "PRD", "*", "c:\obj.txt", "*", "*", @PIPPO

The system display e message like:

Could not execute statement.

The name 'Dec  7 2014 10:14PM' is not a valid identifier.

Sybase error code=203

Severity Level=16, State=3, Transaction State=0

Line 128

Have you got any idea?

ganimede_dignan
Contributor
0 Kudos

Hi,

Thank you you are right... but I've got other problem now: with a command:

sp_querysmobjj "syb_tsm", "c:\pippo.txt", "NV6"

I see the file c:\pippo.txt and I can read:

========================

Sybase-TSM interface API

========================

Object Name (filespace)   : /NV6

Object Name (high level)  : /NV6.DB

Object Name (low level)   : /NV6.DB.20150114.040011.000.0

Object Owner              : sybnv6

object Id (hi, lo)        : 0, 254653

object Size Estimates     : 273, 4294967295

Object State              : ACTIVE

Backup Creation Date      : 1/14/2015 4:0:12

Backup Expiration Date    : 0/0/0 0:0:0

Copy Group                : 1

Object Machine Name       : DEFAULT

Object Compression Type   : TSM Compression Type

Object Encryption Type    : NO TSM Encryption

Object Name (filespace)   : /NV6

Object Name (high level)  : /NV6.DB

Object Name (low level)   : /NV6.DB.20150116.040012.000.0

Object Owner              : sybnv6

object Id (hi, lo)        : 0, 290216

object Size Estimates     : 273, 4294967295

Object State              : ACTIVE

Backup Creation Date      : 1/16/2015 4:0:13

Backup Expiration Date    : 0/0/0 0:0:0

Copy Group                : 1

Object Machine Name       : DEFAULT

Object Compression Type   : TSM Compression Type

Object Encryption Type    : NO TSM Encryption

Object Name (filespace)   : /NV6

Object Name (high level)  : /NV6.DB

Object Name (low level)   : /NV6.DB.20150119.040001.000.0

Object Owner              : sybnv6

object Id (hi, lo)        : 0, 294043

object Size Estimates     : 273, 4294967295

Object State              : ACTIVE

Backup Creation Date      : 1/19/2015 4:0:2

Backup Expiration Date    : 0/0/0 0:0:0

Copy Group                : 1

Object Machine Name       : DEFAULT

Object Compression Type   : TSM Compression Type

Object Encryption Type    : NO TSM Encryption

Object Name (filespace)   : /NV6

Object Name (high level)  : /NV6.XACT

Object Name (low level)   : /NV6.TRAN.20150113.175516.000.0

Object Owner              : sybnv6

object Id (hi, lo)        : 0, 252510

object Size Estimates     : 13, 4294967295

Object State              : ACTIVE

Backup Creation Date      : 1/13/2015 17:55:18

Backup Expiration Date    : 0/0/0 0:0:0

Copy Group                : 1

Object Machine Name       : DEFAULT

Object Compression Type   : TSM Compression Type

Object Encryption Type    : NO TSM Encryption


So, now I would like to delete all objs older then 10 days:


declare @PIPPO DATETIME

set @PIPPO = DATEADD(day, -10, GETDATE())

exec sp_deletesmobj "syb_tsm", "NV6", "*", "*", "*", @PIPPO

but the error is:

  • Backup Server: 3.70.2.3: Cannot delete backup objects from storage manager. Message = 'No backup object matching specified criteria found.'.

Have you got any suggest?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member188958
Active Contributor
0 Kudos

Per the manual, syntax is:

sp_deletesmob “syb_tsm“, “server_name"{, “database_name”, “object_type”, “dump_type", “until_time", “bs_name"}

You are passing @PIPPO as the 7th parameter, it should be the 6th.

-bret