post

-- First, declare the variable @databasename

declare @databasename varchar(128)

-- Next declare the cursor to contain all databases with the
-- recovery model 1 (which is FULL) but not the systemdatabases

declare dbcursor CURSOR for
select name from master.sys.databases
where name not in ('master','tempdb','model','msdb')
and recovery_model=1

-- Open the cursor and put the databasename in to the @databasename
-- variable.

open dbcursor
fetch next from dbcursor into @databasename
while @@FETCH_STATUS = 0

-- Now run the code to change the database

Begin
alter database @databasename set recovery simple

-- When that is done, get the next name from the cursor until all
-- have been modified

fetch next from dbcursor into @databasename
end

-- Close and deallocate the cursor

close dbcursor
deallocate dbcursor

 

http://www.sqlservercentral.com/Forums/Topic1327362-1550-1.aspx#bm1327380

post

Work with multiple databases

— First, declare the variable @databasename

declare @sql varchar(200),@name varchar(20)

— Next declare the cursor to contain all databases with the
— recovery model 1 (which is FULL) but not the systemdatabases

declare cur cursor for
select name from sys.databases –where name not in (‘master’,’tempdb’,’model’,’msdb’)

— Open the cursor and put the databasename in to the @databasename
— variable.

open cur
fetch next from cur into @name
while @@FETCH_STATUS = 0

— Now run the code to change the database

begin
set @sql = ‘alter database ‘+ @name + ‘ set recovery simple;’

print @sql
–exec(@sql)

— When that is done, get the next name from the cursor until all
— have been modified

fetch next from cur into @name
end

— Close and deallocate the cursor

close cur
deallocate cur

Work with multiple databases

Move database files

USE master;
GO
ALTER DATABASE DBName SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO
EXEC sp_detach_db @dbname = N’DBName’;
GO
— Next step – copy files .mdf and .ldf of this database files to new location
EXEC sp_attach_db @dbname = N’dbName’,
@filename1 = N”, –path do .mdf
@filename2 = N”; –path to .ldf
GO

Move database files

Закладки в MS Word

Добавление закладки в документ MS Word

в фигурных скобках ввести требуемое значение
{TEST}

выделить введенное значение вместе с фигурными скобками

Вкладка “Вставка” – Закладки

Нажать “ДОбавить” и ввести имя для закладки

Проверка – открыть список закладок, выделить нужную и нажать “перейти”

Закладки в MS Word