SQL. Search for any text or integer in the database
SQL. Search for any text or integer in the database
Small queries to search for any number or text in the desired MS SQL database.
Find an integer.
- set nocount on
- declare @name varchar(128), @substr bigint, @column varchar(128)
- set @substr = 462083 -- ИСКОМОЕ ЦЕЛОЕ ЧИСЛОВОЕ ЗНАЧЕНИЕ
- /* Create a table for output */
- create table #rslt2
- (table_name varchar(128), field_name varchar(128), value bigint)
- /* Populate the created table with the found data */
- declare s cursor for select table_name as table_name from information_schema.tables where table_type = 'BASE TABLE' order by table_name
- open s
- fetch next from s into @name
- while @@fetch_status = 0
- begin
- declare c cursor for
- select quotename(column_name) as column_name from information_schema.columns
- where data_type in ('int', 'bigint') and table_name = @name
- set @name = quotename(@name)
- open c
- fetch next from c into @column
- while @@fetch_status = 0
- begin
- print 'Processing table - ' + @name + ', column - ' + @column
- exec('insert into #rslt2 select ''' + @name + ''' as Table_name, ''' + @column + ''', ' + @column +
- ' from' + @name + ' where ' + @column + ' = ' + @substr )
- fetch next from c into @column
- end
- close c
- deallocate c
- fetch next from s into @name
- end
- select table_name as [Table Name], field_name as [Field Name], count(*) as [Found Mathes] from #rslt2
- group by table_name, field_name
- order by table_name, field_name
- /* Display found values if needed (uncomment next line) */
- -- select * from #rslt2 order by table_name, field_name
- drop table #rslt2
- close s
- deallocate s
Wyszukaj ciąg znaków.
- set nocount on
- declare @name varchar(128), @substr nvarchar(4000), @column varchar(128)
- set @substr = '%Пружинкин%' -- ФРАГМЕНТ ИСКОМОЙ СТРОКИ
- /* Create a table for output */
- create table #rslt
- (table_name varchar(128), field_name varchar(128), value ntext)
- /* Populate the created table with the found data */
- declare s cursor for select table_name as table_name from information_schema.tables where table_type = 'BASE TABLE' order by table_name
- open s
- fetch next from s into @name
- while @@fetch_status = 0
- begin
- declare c cursor for
- select quotename(column_name) as column_name from information_schema.columns
- where data_type in ('text', 'ntext', 'varchar', 'char', 'nvarchar', 'char', 'sysname') and table_name = @name
- set @name = quotename(@name)
- open c
- fetch next from c into @column
- while @@fetch_status = 0
- begin
- print 'Processing table - ' + @name + ', column - ' + @column
- exec('insert into #rslt select ''' + @name + ''' as Table_name, ''' + @column + ''', ' + @column +
- ' from' + @name + ' where ' + @column + ' like ''' + @substr + '''')
- fetch next from c into @column
- end
- close c
- deallocate c
- fetch next from s into @name
- end
- select table_name as [Table Name], field_name as [Field Name], count(*) as [Found Mathes] from #rslt
- group by table_name, field_name
- order by table_name, field_name
- /* Display found values if needed (uncomment next line) */
- --select * from #rslt order by table_name, field_name
- drop table #rslt
- close s
- deallocate s
How to Check CentOS Version
How to Check CentOS Version From Command Line
lsb Command to Display Details of CentOS Linux Release
LSB (Linux Standard Base) is a joint project of several Linux distributions to standardize software system structure. One of the commands available from the command line lsb_release. The output will indicate which OS version you are running.
1. Before you can use lsb commands, you have to install the package first. Use the following command:
# sudo yum install redhat-lsb-core
2. Type in your sudo password to authorize the installation and then press Y and Enter to confirm.
3. Once you have installed it, you can check your CentOS/REHL version as shown with the command:
# lsb_release -dor
# lsb_release -a
Find CentOS Version with the hostnamectl Command CentOS version 7 and next distributions,
hostnamectl command is used to query and set Linux system hostname, and show other system related information, such as operating system release version
It displays information from the
/etc/centos-release file,
uname –a file and others.
In addition to version number, it indicates which Linux kernel your system is using.
To see these specifics, use the command:
# hostnamectl
Find CentOS Version with RPM - RPM (Red Hat Package Manager) is a popular open-source and core package management utility for Red Hat based systems like (RHEL, CentOS, Fedora).
With the rpm command, you can find out the full package name and the release version of CentOS you are running.
Use the command:
# rpm –qa centos-release
or
# rpm -ql centos-release | grep release$
or
# rpm -qf /etc/redhat-release
Check CentOS Version in Release File To check which Linux distro and major release version you have installed,
open the release file using the command:
# cat /etc/os-release
The output reveals the name of the operating system, its major release version,
and other specifics, as displayed in the image below.
Check Linux Kernel Version in CentOS Knowing the kernel version you are running is often as useful as finding the release version.
Find out which Linux kernel version you running, with the command:
# uname –r
or
# uname -s -r
The output you receive is the version number of the kernel of your operating system.
The 4 files shown below provides the update version of the CentOS/Redhat OS.
/etc/centos-release
/etc/os-release
/etc/redhat-release
/etc/system-release
Error HRESULT: 0x80070520 when adding SSL binding in IIS
Error HRESULT: 0x80070520 when adding SSL binding in IIS
Error There was an error while performing this operation
Details:
A specified logon session does not exist. It may alredy have been terminated. (EXception from HRelult: 0x80070520)
you can use the option to generate a certificate:
openssl pkcs12 -export -out domain.name.pfx -inkey domain.name.key -in domain.name.crt
The key file is just a text file with your private key in it.
If you have a root CA and intermediate certs, then include them as well using multiple -in params
openssl pkcs12 -export -out domain.name.pfx -inkey domain.name.key -in domain.name.crt -in intermediate.crt -in rootca.crt
If you're looking for a Windows graphical user interface, check out DigiCert. It is a fairly simple program with an easy interface. On the SSL tab, import the generated certificate. Then, after selecting the Certificate, you can export the file as PFX with or without a key.
https://www.digicert.com/util
This program can also repair a certificate that was uploaded with an error
How to create .pfx file from certificate and private key?
How to create .pfx file from certificate and private key?
1. Open web page -
2. Select Type of Current Certificate
Your certificate should be issued in Standard PEM format. Common PEM extensions include .cer, .crt, and .pem. Make sure Type of Current Certificate is set to “Standard PEM”.
3. Select Type to Convert To
Select “PFX/PKCS#12” as the Type to Convert To.
4. Upload Certificate
Locate Certificate File to Convert and click the Choose File button to upload your certificate. This file should be the certificate that is issued to your web server domain.
5. Upload Private Key
Locate Private Key File and click the Choose File button to upload the file.
6. Upload Chain Certificate Files
Locate Chain Certificate File and click Choose File to upload the CA intermediate certificate. The appropriate certificate depends on what brand of SSL you have, so please make sure you have the correct intermediate certificate before you upload your file.
8. PFX Password
Create a new password for your PFX file. You will need to remember this password when you install the PFX file on your system.
9. Convert Certificate
Once you have uploaded the certificate and key files, click the Convert Certificate button to complete the process and download your new PFX file.





