14 Nisan 2021 Çarşamba

MS-SQL / Rename a computer that hosts a stand-alone instance of SQL Server

For a renamed computer that hosts a default instance of SQL Server, run the following procedures:

EXEC sp_dropserver '<old_name>';  
GO  
EXEC sp_addserver '<new_name>', local;  
GO

Restart the instance of SQL Server.

For a renamed computer that hosts a named instance of SQL Server, run the following procedures:

EXEC sp_dropserver '<old_name\instancename>';  
GO  
EXEC sp_addserver '<new_name\instancename>', local;  
GO

Restart the instance of SQL Server.

After the Renaming - Verify renaming operation

Select information from either @@SERVERNAME or sys.servers. The @@SERVERNAME function will return the new name, and the sys.servers table will show the new name. The following example shows the use of @@SERVERNAME.

SELECT @@SERVERNAME AS 'Server Name';  

6 Nisan 2021 Salı

SafeNet / Replicate Token

SafeNet üzerinde slot bilgisini başka bir slota kopyalamak için aşağıdaki komutu kullanabiliriz. 

C:\Program Files (x86)\SafeNet\Protect Toolkit 5\Protect Toolkit C SDK\bin>ctkmu rt -s 17 -d 117

ProtectToolkit C Key Management Utility 5.0.0

Copyright (c) Safenet, Inc. 2009-2014

Enter user PIN for slot 17:

Replicate slot 17 to slot 117: SUCCESS

2 Nisan 2021 Cuma

Linux / Ubuntu 20.10 netplan apply

Ubuntu Server 20.10 versiyonunda /etc/netplan altindaki diger dosyalardan da ip aliyor, tek bir dosya olmasi daha uygun gözüküyor.

sudo vi  /etc/netplan/00-installer-config.yaml

# This is the network config written by 'subiquity'

network:

  ethernets:

    ens160:

      addresses:

      - 192.168.x.28/24

      gateway4: 192.168.x.1

      nameservers:

        addresses:

        - 192.168.x.109

        - 192.168.x.152

        - 192.168.x.134

        search:

        - domain.com.tr

  version: 2

sudo netplan apply

root@ubuntu20:~$ lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description:    Ubuntu 20.10

Release:        20.10

Codename:       groovy

17 Mart 2021 Çarşamba

Linux / Read-only file system

Linux sistem üzerinde input/output hataları sonrasında boot problemi oluşabilir.

Bu durumda kurulum medyası ile Rescue Mode erişim yapılarak / bağlı olduğu disk bolümünde fsck yapılabilir.

Örnek:  fsck /dev/vg0/lv0

servername:/boot # ls
ls: cannot open directory '.': Input/output error

servername:/boot # cat /et-bash: cannot create temp file for here-document: Input/output error
-bash: cannot create temp file for here-document: Input/output error                                                      
servername:/ # cat /etc/os-bash: cannot create temp file for here-document: Read-only file system
-bash: cannot create temp file for here-document: Read-only file system
-bash: cannot create temp file for here-document: Read-only file system
-bash: cannot create temp file for here-document: Read-only file system

12 Mart 2021 Cuma

Linux / sudo yetkili kullanıcılar

Aşağıdaki komut ile sudo yetkili gruplar kontrol edilebilir.

[root@servername ~]# grep -v "#" /etc/sudoers |grep "ALL="
root    ALL=(ALL)       ALL
%wheel  ALL=(ALL)       ALL

Aşağıdaki komutlar ile de grup üyeleri kontrol edilebilir.

[root@servername ~]# grep "root:" /etc/group
root:x:0:root
[root@servername ~]# grep "wheel:" /etc/group
wheel:x:10:

Raporları oluşturmak için Flex üzerindeki master server'a PuTTY üzerinden appadmin ile giriş yapın ve "sudo -i" ile root kulla...