Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid

MS SQL

# shrink database (test)

USE Database_Name
select name,recovery_model_desc from sys.databases
ALTER DATABASE Database_Name SET RECOVERY simple
DBCC SHRINKFILE (Database_Name_log , 1)

ALTER DATABASE [mydatabase] SET RECOVERY SIMPLE
DBCC SHRINKFILE()
ALTER DATABASE [mydatabase] SET RECOVERY FULL

DBCC SHRINKFILE()
BACKUP LOG WITH TRUNCATE_ONLY
DBCC SHRINKFILE()

ALTER DATABASE mydb1 MODIFY FILE (NAME = mydb1_log, SIZE = 8192);

DBCC SHRINKFILE(mydb1_log, 124400);

ALTER DATABASE mydb1 SET RECOVERY SIMPLE

WHILE 1 = 1
BEGIN
delete TOP (100000) from mydb1.mytable1 where time < DATEADD(mm, -12, GETDATE());
END

# show log

EXECUTE sp_readerrorlog

# Links

https://community.embarcadero.com/article/articles-database/1026-5-different-ways-to-start-sql-server-services

install phpMyAdmin

Check for current version
www.phpmyadmin.net

<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.phpMyAdmin.sh";

echo "wget -q --no-check-certificate $URL -O - | bash -";
echo "<div><pre>";
</pre></div>

$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);

echo htmlspecialchars(curl_exec($c));

curl_close($c);

echo "";

?>

# todo, import tables
mysql --host=localhost --user=${DB_USER} --password=${DB_PASS} ${DB_NAME} < /var/www/phpMyAdmin/sql/create_tables.sql

Configure

cp config.sample.inc.php config.inc.php
vi config.inc.php
$cfg['blowfish_secret'] = 'terceS';
# configure user and db
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'YOUR_DB_USER';
$cfg['Servers'][$i]['password'] = 'YOUR_DB_PASS';
$cfg['Servers'][$i]['host'] = 'YOUR_DB_HOST';
# optionaly you can restrict whitch databases should by showed in phpMyAdmin
$cfg['Servers'][$i]['only_db'] = 'YOUR_DB_NAME';

OPTIONAL
<?php
$URL="http://dl.panticz.de/scripts/install.phpMyAdmin.optional.txt";

echo "wget $URL -O - | bash -";
echo "<div><pre>";
</pre></div>

$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);

echo htmlspecialchars(curl_exec($c));

curl_close($c);

echo "";

?>

db
Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung