This site is hosted and sponsored by hyve.com specialists in Cloud Hosting UK and VMware Hosting. If you are interested in our services please call us for chat on 0800 612 2524
Change Table Owner Of All Tables#
DECLARE tabcurs CURSOR
FOR
SELECT 'OLDUSER.' + [name]
FROM sysobjects
WHERE xtype = 'u'
OPEN tabcurs
DECLARE @tname NVARCHAR(517)
FETCH NEXT FROM tabcurs INTO @tname
WHILE @@fetch_status = 0
BEGIN
EXEC sp_changeobjectowner @tname, 'NEWUSER'
FETCH NEXT FROM tabcurs INTO @tname
END
CLOSE tabcurs
DEALLOCATE tabcurs
Back to SQL Server
Add new attachment
Only authorized users are allowed to upload new attachments.
«
This page (revision-1) was last changed on 02-Dec-2011 10:35 by Hyve Support