1 декабря 2019 г.

Installing Ubuntu 18.04 Server






Introduction

This guide is part of the Kubernetes the hard way on bare metal/VMs series. On its own this may be useful to you however since it’s tailored for the series, it may not be completely suited to your needs.







This guide is to help people set up and configure a basic Ubuntu server from start to finish. It will go into quite a bit of detail including software RAID and LVM and as such if you don’t have at least 2 disks available then you may not be able to follow along exactly; that doesn’t mean you can’t follow along though!
I’m going to presume you have a physical PC/server or virtual machine on which you wish to install Ubuntu.
If you’re using a physical machine then you’ll need to download the ISO and put it onto a USB stick or CD so that you can install Ubuntu. There are plenty of guides online on how you can achieve this; however two quick examples for USB sticks are:
  • Linux: Run in a terminal sudo dd if=/path/to/ubuntu.iso of=/dev/USB_Device
  • Windows: You can use PenDrive Linux
If you’re using Virtualbox or libvirt/KVM/QEMU then you can just attach the ISO directly to the VM. If you’re not sure about how this is done then take a look at my tutorials on how to use them.

Resources

See the main series under Setting up the resources for the VM specs









Восстановление базы MsSQL

После того как закончилось место на диске, сломалась одна база MsSQL.
Были несоответствия логов и записей в самой базе.
Не удалось повторить запись журнала (313:38568:2) для идентификатора транзакции (0:2036738), на странице (1:9), единица распределения 6488064, база данных "myDBName" (идентификатор базы данных 9). Страница: номер LSN = (313:38456:2), единица распределения = 6488064, тип = 13. Журнал: OpCode = 4, контекст 20, PrevPageLSN: (313:38528:1). Восстановите базу данных из резервной копии или исправьте ее.
При повторном выполнении запротоколированной операции в базе данных "
myDBName" произошла ошибка в записи журнала с идентификатором (313:38568:2). Как правило, конкретный сбой предварительно протоколируется как ошибка в журнале ошибок операционной системы. Восстановите базу данных из полной резервной копии или исправьте базу данных.
Невозможно открыть новую базу данных "
myDBName". Операция CREATE DATABASE прервана. (Microsoft SQL Server, ошибка: 3456)
Эти сообщения выдавались при попытке присоединить БД к ядру.

На просторах интернета нашел инструкцию, которая мне очень помогла.
Вот она.

Use master
go
sp_configure 'allow updates', 1
go

---Выполнить---

reconfigure with override

---Выполнить---

select status from sysdatabases where name = 'myDBName'

---Выполнить---

EXEC sp_resetstatus 'myDBName';
ALTER DATABASE myDBName SET EMERGENCY

---Выполнить---

alter database myDBName set EMERGENCY, SINGLE_USER

---Выполнить---

dbcc checkdb ('myDBName', REPAIR_ALLOW_DATA_LOSS)

---Выполнить---

alter database myDBName set ONLINE, MULTI_USER

---Выполнить---

Use master
go
sp_configure 'allow updates', 0
go

---Выполнить---
reconfigure with override