blog.icewolf.ch

Let's talk about IT!
posts - 2290, comments - 295, trackbacks - 0

My Links

Archives

Post Categories

icewolf

SQL

SQL Server 2000, SQL Server 2005, SQL Server 2008, TSQL - alles rund um Datenbanken
Switch Open Data .ch and .li Domains

Hi All, Switch the Swiss Registrar for .ch and .li Domains has published the Domains on a Open Data Policy. You can download the top 1'000 Domains or use a Zone Transfer Switch Open Data https://www.switch.ch/open-data/#tab-c5442a19-67cf-11e8-9cf6-5254009dc73c-3 You need to create the TSIG Key # filename ch_zonedata.keykey tsig-zonedata-ch-public-21-01 { algorithm hmac-sha512; secret "stZwEGApYumtXkh73qMLPqfbIDozWKZLkqRvcjKSpRnsor6A6MxixRL6C2HeSVBQNfMW4wer+qjS0ZSfiWiJ3Q=="; }; then use dig to initiate the Zone Transfer dig -k ch_zonedata.key @zonedata.switch.ch +noall +answer +noidnout +onesoa AXFR ch. > ch.txt Looks like this I have used psftp.exe to transfer the ch.txt File to my Computer open 172.21.175.80 cd /var/tmp lcd E:\ get ch.txt The Zone File looks like "TAB" separated. But is not consistent...

posted @ Tuesday, August 30, 2022 9:01 PM | Filed Under [ Web PowerShell SQL ]

Protect your Azure SQL Database with Firewall Rules

Hi All, In this Blog Article, i want to talk about how to protect your Azure SQL Databases with Firewall Rules at Server or Database level. Azure SQL Database and Azure Synapse IP firewall rules https://docs.microsoft.com/en-us/azure/azure-sql/database/firewall-configure The Server Level you can find on your Server Object You can also find this when query the master Database --Database: master SELECT * FROM sys.firewall_rules At the Database level use this sp_set_firewall_rule (Azure SQL Database) https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-set-firewall-rule-azure-sql-database?view=azuresqldb-current --Database: db_home_icewolf Select * FROM sys.database_firewall_rules To allow Azure Services add the following -- Enable Azure connections.   EXECUTE sp_set_database_firewall_rule N'Allow Azure', '0.0.0.0', '0.0.0.0'; to add a custom IP or IP Range use these -- Create database-level firewall setting for only IP 0.0.0.4   EXECUTE...

posted @ Saturday, March 19, 2022 9:45 AM | Filed Under [ Security SQL Azure ]

Export Azure SQL database and import on local SQL Server

Hi All, In this Blog Article i show how you can Export an Azure SQL Database and import it back on your local SQL Server In the Azure Portal go to your SQL database and hit "Export" You need to set the Storage Target for your Export I create a new container at my Storage Account Once the export starts it takes a while until the Data is exportet Wait until its completed Then check your Azure Storage Now you are able to download the *.bacpac File If you add *.zip do the *.bacpac File you can see that it is actually a ZIP File that contains the...

posted @ Saturday, February 26, 2022 9:24 AM | Filed Under [ SQL Azure ]

Install SQL Server Management Studio (SSMS)

Hi All, In my previous Article i have explained how to install SQL Server 2019 Express Edition. That comes without a Management Interface - therefore we need Install SQL Server Management Studio (SSMS) Download SQL Server Management Studio (SSMS) https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?redirectedfrom=MSDN&view=sql-server-ver15 Now it can be found in the Start Menü You will be welcomed with the Splash Screen Then you have to Select your SQL DB Instance Or you can Browse for DB's on your Server or Network Now you can do SQL Querys against the Database Regards Andres Bohren

posted @ Saturday, February 26, 2022 8:49 AM | Filed Under [ SQL ]

SQL Server 2019 Express Installation

Hi All, For a Project, i have installed SQL Server 2019 Express. Here are the Screenshot from the Installation. Editions and supported features of SQL Server 2019 (15.x) https://docs.microsoft.com/en-us/sql/sql-server/editions-and-components-of-sql-server-version-15?view=sql-server-ver15 https://www.microsoft.com/de-ch/sql-server/sql-server-downloads I choose "custom" to see all the Settings Here is where you would normally choose to place the Data on a diffrent Drive. As this is only a Test System i won't do that. Let's see if we can connect sqlcmd /? sqlcmd -S ICESRV04\SQLEXPRESS -E -Q "Select @@Version" Regards Andres Bohren

posted @ Saturday, February 26, 2022 8:28 AM | Filed Under [ SQL ]

SQL Server 2012 SP4 and Security Update

Hallo zusammen, Auf einem Server habe ich heute noch den SQL Server 2012 mit einem aktuellen Service Pack und dem Security Update ausgerüstet. Microsoft SQL Server 2012 Service Pack 4 (SP4) https://www.microsoft.com/en-US/download/details.aspx?id=56040 Falls ein paar Prozesse noch Dateien in Benutzung haben, kann man die Prozesse mit PowerShell stoppen Get-Process -ProcessName sqlcmd Get-Process -ProcessName sqlcmd | Stop-Process -Force Get-Process -ProcessName monAgentCore| Stop-Process -Force Get-Process -ProcessName wmiPrvSE | Stop-Process -Force Nach einem Neustart habe ich dann noch das Security Update installiert Security Update for SQL Server 2012 SP4 GDR (KB4583465) https://www.microsoft.com/en-us/download/details.aspx?id=102625 Am besten nach dem Update den Server neu starten. Grüsse Andes Bohren

posted @ Wednesday, June 9, 2021 11:13 PM | Filed Under [ SQL ]

Power BI Desktop

Hallo zusammen, Ich habe kürzlich bei einem Projekt PowerBI verwendet um die Daten zu visualisieren. Power BI Desktop ist kostenfrei und kann über den Microsoft Store heruntergeladen werden. Power BI Desktop https://powerbi.microsoft.com/de-de/desktop/ Der Klick auf den Download öffnet den Microsoft Store. Ich mache eine Verbindung zu meiner Azure SQL Database auf Es werden mir die Tabellen der Datenbank angezeigt Ich wähle die Tabelle mit den Filmen aus Im Designer habe ich mir ein paar Visualisierungen hinzugefügt. Alles basierend auf dem Feld fKategorie Sieht so aus, als ob ich Actionfilme und Komödien am meisten mag. Die Elemente sind anklickbar und dann werden gewisse Daten ausgeblendet oder weniger stark dargestellt. Unter den Optionen...

posted @ Wednesday, February 10, 2021 12:25 AM | Filed Under [ SQL Microsoft365 ]

Migrate SQL Database to Azure and change the connectionstring in web.conf

Hallo zusammen, In den letzten Blog Artikeln habe ich eine SQL Datenbank in Azure angelegt und dann das SQL Server Management Studio installiert. In diesem Artikel geht es darum, die Datenbank nach Azure zu migrieren. Ich habe den gestrigen Abend damit verbracht die Tabellen als CSV Dateien zu speichern und ein Import PowerShell Script zu schreiben. Dabei geht das ganz einfach mit dem SQL Server Management Studio... Mit der Azure SQL Datenbank verbinden Nun sieht man auch, was für eine Machine dahinter steckt (CPU und Storage) Im Azure Portal sieht man in der Resource Group, dass eine neue Datenbank angelegt wurde Kurz mal prüfen ob da...

posted @ Wednesday, December 9, 2020 11:44 PM | Filed Under [ SQL Azure ]

Install SQL Server Management Studio (SSMS) and connect to Azure SQL Database

Hallo zusammen, Ich habe mir das SQL Server Management Studio installiert, um auf die Azure Datenbank zuzugreifen, welche ich im vorherigen Blog Artikel angelegt habe. Download SQL Server Management Studio (SSMS) https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver15   Create SQL Database in Azure http://blog.icewolf.ch/archive/2020/12/06/create-sql-database-in-azure.aspx Grüsse Andres Bohren

posted @ Sunday, December 6, 2020 4:23 PM | Filed Under [ SQL Azure ]

Create SQL Database in Azure

Hallo zusammen, Ich habe mir in Azure eine SQL DB zum testen angelegt. Für den Compute und RAM braucht es dazu einen Server Ich habe mir dabei eine Basic Instanz ausgewählt Allerdings ist mir das mit den DTU noch nicht so ganz klar. Diensttarife beim DTU-basierten Kaufmodell https://docs.microsoft.com/de-de/azure/azure-sql/database/service-tiers-dtu   What the heck is a DTU? https://sqlperformance.com/2017/03/azure/what-the-heck-is-a-dtu?WT.mc_id=dataexposed-c9-niner Mit dem Query Editor kann man sich durch das erstellte Login auf die Datenbank verbinden. Mit folgendem Befehl lege ich eine Tabelle an. CREATE TABLE tUsers     (     fID INT PRIMARY KEY NOT NULL IDENTITY(1,1),     fVorname varchar(50) NOT NULL,     fNachname varchar(50) NOT NULL,     ) Grüsse Andres Bohren

posted @ Sunday, December 6, 2020 4:15 PM | Filed Under [ SQL Azure ]

Full SQL Archive

Powered by:
Powered By Subtext Powered By ASP.NET