In Oracle:
SELECT * FROM all_tables where table_name like '%test%'
SELECT * FROM all_tables where owner like 'test'
select * from all_tab_columns where Column_name like '%test%'
Allgemein Sql:
meine Sys/Db admin & Developper Notitzen - wer Rechtschreibfehler findet darf sie behalten ... my Sys/Db Admin and developper notes - I don't care about typos
In Oracle:
SELECT * FROM all_tables where table_name like '%test%'
SELECT * FROM all_tables where owner like 'test'
select * from all_tab_columns where Column_name like '%test%'
Allgemein Sql:
SELECT * FROM information_schema.tables;
default (keine transaktionen bzw. sofortiger autocommit)
SET IMPLICIT_TRANSACTIONS off
automatischer start einer Transktion (muß dann comitted werden)
SET IMPLICIT_TRANSACTIONS on
Textbox Properties
Font
Color
Expression Example:
=iif(Sum(Fields!Profit.Value)>0, "Green","Red")
scheinbar gibt es ssrs 2022 nur mehr extra, nicht so wie früher gemeinsam mit sql express.
ssrs 2022 kann nicht mehr auf einem domain controller installiert werden
Express version von ssrs2022 braucht eine lokale express sql server db als report db
SSRS Reporting Services Configuration Tool standard InstallationsPfad:
C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn
RSConfigTool.exe
asus vivobook 17 r702uv-GC279T
Öffnen: alle schrauben abschrauben hnten, eine ist unter einem schwarzen Gummischeibchen versteckt, dann mit schaubenzieher rand anheben um plastick einrastungen zu öffnen.
1) Slot for second HDD - Platz für 2. HDD
2) Akku
3,4) Speaker - Lautsprecher
5) WLAN Modul
6) Motherboard, on other side (behind 6) is internal SSD - auf der anderen Seite unterhalb der Ziffer 6 ist die eingebaute SSD
Um von Windows ins Bios bzw. Boot Menü zu kommen, Shift Taste halten und dann neu starten auswählen
ssh clonen:
1) ssh public key des client zu github hinzufügen:
in ~/.ssh ist der public key id_rsa.pub, kopieren: cat ~/.ssh/id_rsa.pub
in github rechts oben auf das user logo clicken, unten settings
rechts 2.Abschnitt Access, SSH and GPG keys
new SSH key, dort einfügen
2) git clone ....
dann clonen, - repro in github auswählen, dann CODE menü, SSH kopieren und nach git clone einfügen z.b:
git clone git@github.com:mike...../raspi.git
power shell starten
wsl installieren:
wsl --install
wsl version abrufen
wsl --version
verfügbare linux distributionen auflisten
wsl --list
starten der default installation
wsl --d
starten iener bestimmten distribution
wsl --d Ubuntu
.net framework auf rasperry installieren
https://learn.microsoft.com/de-de/dotnet/iot/deployment
neues console projekt:
dotnet new console
starten: dotnet run
Visual Studio Code installieren:
sudo apt install code
rasperry:
sudo apt install mariadb-server
sudo mysql_secure_installation
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
Port unkommentieren, d.h. # entfernen
GRANT ALL PRIVILEGES ON neueDatenbank . * TO 'neuerUser'@'localhost';
GRANT ALL PRIVILEGES ON *. * TO 'neuerUser'@'localhost';
funktioniert nur mit eigener Datenquelle, nach veröffentlich umstellen auf shared datasource
Erhalte diesen Fehler durch die Where Klausel: where C>GetDate()-@Tage
umgestellt auf where C>@Von funktioniert
FEHLER SQL GESAMT:
declare @tage as int=100; declare @Anz as int =0
select errlevel,namespace as nspace,title,msg,count(*) as anz from tLog
where C>GetDate()-@Tage
group by errlevel, namespace, title,msg
having count(*)>@Anz
order by errlevel,count(*) desc
UPDATE P
SET P.UnitPrice = P.UnitPrice * 1.1
FROM Product P
JOIN OrderItem I ON P.Id = I.ProductId
delete a From tAdressen a join cte as c on
das Löschen von Datensätzen in einer tabelle kann mittels dieses triggers verhindert werden:
to prevent sql server to delete records of a table use this trigger:
create TRIGGER dbo.Test1Delete
ON dbo.Test1
INSTEAD OF DELETE
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
print 'no delete !'
END
create user ztest identified by 123;
GRANT CREATE SESSION TO ztest2; -- so can log in
GRANT CREATE Table, create VIEW, CREATE PROCEDURE, CREATE SEQUENCE, CREATE TRIGGER to ztest2;
ALTER USER ztest2 QUOTA 100M ON DMCS;
CREATE TABLE [dbo].[tGeoTest](
[Id] [int] IDENTITY(1,1) NOT NULL,
[name] [nchar](200) NULL,
[geo] [geography] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
insert into tGeoTest (name,geo) values ('Eiffelturm',geography::Point(48.858260200000004, 2.2944990543196795 , 4326))
insert into tGeoTest (name,geo) values ('Stefansturm',geography::Point(48.209133, 16.3724786 , 4326))
DECLARE @geo1 geography=(select geo from tGeoTest where id=1)
DECLARE @geo2 geography=(select geo from tGeoTest where id=2)
select @geo1.STDistance(@geo2)/1000 as Distanz
Error:
Cannot execute as the database principal because the principal “dbo” does not exist, this type of principal cannot be impersonated, or you do not have permission.
Solution: Unter Db Eigenschaften, Files einen Owner eintragen siehe:
rasperry pi: https://tailscale.com/download/linux/rpi
curl -fsSL https://tailscale.com/install.sh | sh
Unterschied esp32 und esp8266: esp32 ist leistungsstärker
GitHub - esp8266/Arduino: ESP8266 core for Arduino
wichtig:
1) Arduino IDE für Kommunikation mit ESP vorbereiten:
Datei/Voreinstellungen/Zusätzliche Bordevrwalter Urls: https://arduino.esp8266.com/stable/package_esp8266com_index.json
https://wolles-elektronikkiste.de/esp32-mit-arduino-code-programmieren
1 | 2 | 3 | 4 | 5 | 6 | 7 | |
ATMega <->ESP | An | An | Aus | Aus | Aus | Aus | Aus |
USB <-> ATMega | Aus | Aus | An | An | Aus | Aus | Aus |
USB <-> ESP Firmware | Aus | Aus | Aus | Aus | An | An | An |
USB <-> ESP Kom. | Aus | Aus | Aus | Aus | An | An | Aus |
Keine Verbindungen | Aus | Aus | Aus | Aus | Aus | Aus | Aus |
https://www.howtogeek.com/686575/how-to-lock-your-windows-10-pc-using-command-prompt/
Rundll32.exe user32.dll,LockWorkStation
using (var con = new SqlConnection(Data.ConStr))
{
con.Open();
var com = new SqlCommand("spStueckelisteLagerstand", con);
com.CommandType = CommandType.StoredProcedure;
var sqlFremdquelle = com.Parameters.Add("@myParam", SqlDbType.Int);
int anz = 0;
anz=com.ExecuteNonQuery();
(.*?)(\[.*?\]) findet in
meine [version] und mein [key] bla [key2] was
3 matches mit jeweils 2 gruppen
testen: https://regex101.com/r/4el4Oq/1
$cred=Get-Credential
Enter-PSSession -ComputerName myhost -Credential $cred
$WebRequest = [System.Net.WebRequest]::Create("https://www.google.at/")
$WebRequest.Method = "GET"
#$WebRequest.ContentType = "application/json"
$Response = $WebRequest.GetResponse()
$ResponseStream = $Response.GetResponseStream()
$ReadStream = New-Object System.IO.StreamReader $ResponseStream
$Data=$ReadStream.ReadToEnd()
Write-Host "Data=$Data"
openrowset dient zum öffnen von externen datenquellen, die dann wie eine tabelle in der from Klausel verwendet werden können. Es gibt 2 Syntaxe:
ALTER PROCEDURE [dbo].[InsertFile]
(
@filename nvarchar(max),
@filepath nvarchar(max)
)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
declare @sqlStr nvarchar(max)
set @sqlStr='INSERT INTO [dbo].StpFile ([name],[file_stream]) SELECT '''+@filename+''',* FROM OPENROWSET(BULK '''+@filepath+''', SINGLE_BLOB) AS FileData'
Print @sqlStr
execute (@sqlStr)
END
select * from openrowset('SQLNCLI', 'Server=.\sqlexpress;Trusted_Connection=yes;','exec sp_databases') order by Database_size desc
sp_configure 'show advanced options', 1;
RECONFIGURE;
GO
sp_configure 'Ad Hoc Distributed Queries', 1;
RECONFIGURE;
GO
bcp "select name from mydb.dbo.testtable" queryout test.txt -S localhost\SqlExpress -T -c
-S Server
-T trusted connection, oder -U username -P password
-c character Format oder -n native -N unicode native -w Unicode character Format
wenn kein Format (c,n,N,w) angegeben frägt bcp wie es jedes Feld abspeichern soll
die Präfix Länge muß 0 sein, sonst wird etwas zum File hinzugeschrieben !!!
C:\temp>bcp
"select file_stream from mydb.dbo.MyFile where name like 'Configuration_598784a8-346a-4b7b-9817-2c7def67d1aa_Draft.zip'"
queryout test.zip
-S
localhost\SqlExpress
-T
Enter the file storage
type
of field file_stream [varbinary(max)]:
Enter prefix
-length
of field file_stream [8]: 0
Enter length of field file_stream [0]:
Enter field terminator [none]:
Do you want to save this format information in a file? [Y/n] y
Host filename [bcp.fmt]:
Starting
copy
...
1 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total : 1 Average : (1000.00 rows per sec.)