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;
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
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 -TEnter the file storage type of field file_stream [varbinary(max)]:Enter prefix-length of field file_stream [8]: 0Enter length of field file_stream [0]:Enter field terminator [none]:Do you want to save this format information in a file? [Y/n] yHost filename [bcp.fmt]:Starting copy...1 rows copied.Network packet size (bytes): 4096Clock Time (ms.) Total : 1 Average : (1000.00 rows per sec.)1) mit Visual Studio Installer die Data Tools installlieren
2) unter Erweiterungen Reporting Service Editor installieren
Import java files to project:
File / Project Stucture (Crt Alt_Shft S):
Project: Project SDK auswählen, Project Language Level auf SDK default (ganz oben im Drop Down) stellen
compiler Output Dir eintragen
| aktion | intellij | visual studio |
| collapse to definitions | Crt Shift - | Crt M O |
| find usages / references | Alt F7 | CRT K R |
macht die lokalen Änderungen rückgängig und setzt auf den HEad zurück
https://tutorials-raspberrypi.de/raspberry-pi-ueberwachungskamera-livestream-einrichten/
sudo apt-get install motion -y lsusbls /dev/video*