Friday, December 23, 2011

How to grant update permission to specific columns in a table in sql?

Do you know how to grant select permissions on TBL_XXXXXX table in XXX instance in XXXX server. And also grant update permissions on the same table at column level for the columns columnname1 and columnname2.?

By executing below query, select permission granted to the table ‘TBL_XXXXXX’ for the user ‘databaseusername’.

GRANT SELECT ON [TBL_XXXXXX] TO databaseusername

By executing below query, update permission granted to the specific columns in a table ‘TBL_XXXXXX’ for the user ‘databaseusername’

GRANT UPDATE(columnname1) ON [TBL_XXXXXX] TO databaseusername

GRANT UPDATE(columnname2) ON [TBL_XXXXXX] TO databaseusername

That’s it.

Wednesday, December 21, 2011

How to resync the existing log shipping setup:

1. Take full backup of Primary database in the primary server.

2. Copy to secondary server database backup location drive.

3. Disable all jobs (Backup job in primary server, Copy and Restore jobs in secondary server)

To change secondary datbase into online.

Restore database secondarydatabasename
With recovery

4. Restore the secondary server database using primary server database backup file with standby /readonly or with norecovery mode.

5. Enable
       ->Backup job first
       ->Copy job Next
       ->Restore job last.

6. View successive schedules for successful job history.

That’s it

Hope you will re configure the existing non-sync log shipping setup into sync mode.

DTS Packages Error log details Findings.

How to view dtspackage error log in a table?

Select * from msdb..sysdtssteplog order by endtime desc
Select * from msdb..sysdtstasklog order by endtime desc

Select * from msdb..sysdtspackagelog order by logdate desc

How to find dtspackage owner name ?

Select * from msdb..sysdtspackages where name ='dtspackagename'

MYSQL::Setting Validate_Password componet for MySQL Database to ensure password policy settings

Inadequate Password Settings for MySQL Database We observed that the `validate_password%` settings on hostname `<insert hostname>` a...