Showing posts with label properties. Show all posts
Showing posts with label properties. Show all posts

Monday, March 19, 2012

How to use query to get sql database properties

Hi,

I'm creating a User Interface to display Sql database Properties, but I cannot find the right query to retrieved the info on database properties.

The status that I get is "ONLINE", but it should be "NORMAL".

Cannot find the right query to get the date of last database backup, last transaction log backup, and maintenance plan, etc..

Please help me [:'(]

All the backup info is stored in msdb db. Check out BOL under "Viewing Backup Information".|||

Thanks 4 d reply, but I cannot find an example code, what I found was this,

Syntax

RESTORE FILELISTONLY
FROM < backup_device >
[ WITH
[ FILE=file_number]
[ [, ] PASSWORD= {password |@.password_variable } ]
[ [, ] MEDIAPASSWORD= {mediapassword |@.mediapassword_variable } ]
[ [,] { NOUNLOAD | UNLOAD } ]
]

< backup_device > ::=
{
{'logical_backup_device_name' |@.logical_backup_device_name_var}
| { DISK | TAPE }=
{'physical_backup_device_name' |@.physical_backup_device_name_var}
}

I need an example codeSad

Monday, March 12, 2012

How to use multiple configuration files?

Hi everyone,

How to change dynamically the connection properties for a DTSX?

Imagine that you launch a SSIS and under a several rules the same connection is reused with four or five different databases.

I know that I can attach a configuration file or more than one but how to tell to SSIS which use in every moment?

Thanks in advance and regards,

enric vives wrote:

Hi everyone,

How to change dynamically the connection properties for a DTSX?

Imagine that you launch a SSIS and under a several rules the same connection is reused with four or five different databases.

I know that I can attach a configuration file or more than one but how to tell to SSIS which use in every moment?

Thanks in advance and regards,

Do you mean you need to execute the same package multiple times but assigning different connection strings to connection managers on every execution?

|||Assign the InitialCatalog property of your connection object to a variable using expressions, and then make a Script task that sets the variable property depending on your condition.

I think it'd be better if you could just set one username/password for all databases so that you'll only need one config file for them all. This is only a problem if the passwords are all different (which I suspect them to be).|||Thanks for that.