Thursday, January 30, 2025

Very important where you save your SQL Server Installation media files

  This is a very important question. when I began using SQL Server for writing as well as for teaching, I used to take this for granted and used to store at the default location. Sometimes, I used to get into difficulty accessing the installation media as it was needed after a long interval and I would have made changes to my directory structure, or moved them to other places. However, it is very important where you save your SQL Server Installation media for a couple of reasons.

What's the need to save?

1. It provides a means for you to reinstall or repair your installation. You cannot do this task, if you do not have your installation media. 

2. For Off-line installations, it is essential to have this media.

3. If you are having multiple installations, it ensures consistency. I used to have this media on a memory stick and have all my students install on their work stations.

What are suitable locations to save the media?

There are couple of options. Choose one that best suits your needs.

1. Local Drive: When you start installing you will find out how much space is needed on your computer's local drive. At a minimum, you need 6 GB of disc space for the custom installation with most options. If you include all extras it is about 8GB. In order to work comfortably, it can be about 10GB depending on the databases you are considering. Herein, some sample databases are assumed. The installation process brings up the space requirements during installation. 

2. On a Network share. I could have set it up on the network share for my students, but I decided to give them a copy, if they wanted to play with it when not connected to the network.

3. If installation is on a virtual machine, an ISO would be suitable.

4. Mapped drive is another option.

5. On the Cloud: Cloud storage is yet another option. However, there may be cost in storage and data transfer involved. Latency is yet another factor to consider. Internet availability is most essential during the installation process.

The installation media folder can have any name of your choice. I usually accept the default name.

The SQL Server 2022 installation center's Option node is where you specify location of the media during installation.

I originally saved this media (SQL2022-SSEI-Dev.exe, 4191 KB) on my Download folder of the local drive.

On this blog (http://hodentekMSSS.blogspot.com), dedicated to SQL Servers you will find installation of SQL Server from SQL Server 2012 onwards. Even earlier ones are on my other blog, http://hodentek.blogspot.com


Tuesday, January 28, 2025

DeepSeek, How much tech is packed in?

  The emergence of DeepSeek AI, a powerful Chinese language model, has sent shockwaves through the US AI industry. Developed with a focus on cost-effectiveness, DeepSeek reportedly functions effectively on lower-end hardware, a stark contrast to US models heavily reliant on high-end chips like Nvidia's. This revelation triggered a significant sell-off in Nvidia stock, highlighting the potential disruption to the current AI landscape.   

https://site.financialmodelingprep.com/market-news/nasdaq-futures-plunge-amidst-concerns-over-deepseeks-impact-on-ai-chip-demand

Last night, I downloaded DeepSeek to take a peek and lo and behold, at first sight, looked as good as the Copilot, Gemini AI, and others I have come across.

Well, what does it lack?

 However, a notable limitation became apparent: DeepSeek lacks robust image generation capabilities. While it can provide code snippets (like Python with Kivy) to generate images, this approach is less user-friendly and may be hindered by the limitations of lower-end hardware in processing and rendering graphics. In contrast, US models excel in not only creating images but also seamlessly modifying them based on simple text prompts.   This is clearly beyond low-end chips.

This development necessitates a renewed focus on innovation and optimization within the US AI sector. US developers must prioritize improving model efficiency and exploring alternative hardware solutions to maintain a competitive edge. While DeepSeek presents a significant challenge, it also serves as a valuable catalyst for further advancements in AI technology.

Any other disquieting news?

DeepSeek did not do so well in "misguided attention evaluation" and performed answering only 22% prompts in 13 test questions. Here is a comparative test using others at the Github site ( https://github.com/cpldcpu/MisguidedAttention/tree/main/eval#readme):



Read more here: 

Thursday, January 23, 2025

Slowing down a GIF has merits

 

GIFs are very engaging and dynamic images and they can run at a speed set at the time of creation. Well, some GIFs may look way better when run at a slow speed. 

You can use Python code to slow down a GIF that is too fast for your liking. In the previous post, you learnt how to make a GIF from scratch using Python. In this post, you will use Python code to slow down a GIF. The post shows an example.

Here is a GIF that is somewhat fast. It is copied from a website. 

Now here is the Python code that you can use to slow it down. The code shown is copied from my PyCharm user interface. If you copy and paste make sure the indentation requirements are satisfied.

from PIL import Image, ImageSequence
# Open the original GIF gif_path = 'lawn-time-lapse.gif'
gif = Image.open(r'C:\Users\hoden\PycharmProjects\exploreImage\Images\lawn-time-lapse.gif')
# Create a list to hold the frames
frames = []
# Loop through each frame in the original GIF
for frame in ImageSequence.Iterator(gif):
# Append each frame to the list
frames.append(frame.copy())
# Save the frames as a new GIF with a slower speed
frames[0].save('slowed_down_1_gif.gif', save_all=True, append_images=frames[1:],
duration=200, loop=0)
print('Slowed down GIF saved as slowed_down_1_gif.gif')

The fast GIF is in the project folder in the path shown. The ImageSequence is the key. You get a sequence of images in the frame that you append to a list. Save the frames as a new GIF with a slower speed. Duration in PIL is absolute in milliseconds.

The code before the print saves the first frame(frames[0]) and it saves all the frames slowing down to a duration of 200 seconds and appends the rest of the frames starting from frame[1], the second frame in the sequence.

Here is the result of slowing down the original GIF.


Since we have a handle to the sequence, we can find the original frames and the original duration as well.


Do you know how to create a GIF?

   You have seen a GIF image and enjoyed it. But have you created one.? There are software programs to create GIFs and perhaps many online sites help creating GIFs.  Here is one for example, https://www.canva.com/create/gif-maker/. Animation akin to GIFS can also be created using javascript although there may not be resulting image with a .gif extension.

GIFs are like very small duration video clips but they are really a composite of many small images flipped rapidly, in-situ to create the illusion of motion. They are made to impress you by their motion.

Why GIFS?

Imagine bringing life to a still photo of a sunset by animating the clouds. An image may be worth a thousand words, but a GIF is worth a thousand images. It adds dynamic movement to static images, unleashing your creativity. If you're active on social media, GIFs are an invaluable tool for self-expression, offering endless possibilities. They bring humor, emotion, and laughter to any page, transforming a collection of static images into a vibrant and engaging experience. With GIFs, you can elevate your storytelling to new heights!"

Here is a simple GIF image copied from a web site  (display gif on web browser - Search):


Ins and outs of using Python to create GIFs:

GIF images have the .gif extension which stands for Graphics Interchange Format. 

In this post, I show you how to create from scratch a GIF using Python. Python uses a image library such as PIL to get the images into the program such as PyCharm. Once they are in the program, you need to use another library to do the flipping action. This library is called imageio, image input/output program. For GIFs this program takes in the images (a number of them) and then it customizes the duration each image is shown; whether the gif repeats itself and how many times it does, etc. Note: if you are new to PyCharm, read up my other Python/Image related posts in this blog, http://hodentekhelp.blogpost.com.

The program presented here also goes through the indexing of the images (as there are many images) which necessitate calling yet another useful library called NumPy. The imageio program cannot accept a image list, but a Numpy list and hence the use of the NumPy library.

In order to create a gif file in a python program, you need the following:

1. A set of images. 

2. Importing libraries PIL, ImageIO and Numpy.

Here is are some five image files I am using in the program:






These are not the best, but enough for the purpose.

Here is the python program that creates a GIF image taking in the images shown here:

----------------------------

BirdsGIF.py

-----------------

# Import libraries used to create a GIF image

import imageio

import numpy as np

from PIL import Image

from PIL.ImageFile import ImageFile

# Load images

image1: ImageFile = Image.open(r'C:\Users\hoden\PycharmProjects\exploreImage\Images_3\Bird1.jpg')

image2 = Image.open(r'C:\Users\hoden\PycharmProjects\exploreImage\Images_3\Bird2.jpg')

image3 = Image.open(r'C:\Users\hoden\PycharmProjects\exploreImage\Images_3\Bird3.jpg')

image4 = Image.open(r'C:\Users\hoden\PycharmProjects\exploreImage\Images_3\Bird4.jpg')

image5 = Image.open(r'C:\Users\hoden\PycharmProjects\exploreImage\Images_3\Bird5.jpg')

# Resize images (optional)

image1 = image1.resize((200, 200))

image2 = image2.resize((200, 200))

image3 = image3.resize((200,200))

image4 = image4.resize((200,200))

image5 = image5.resize((200,200))

# Create list of images

images = [image1, image2, image3, image4, image5]

# Convert PIL image  list to NumPy arrays

images = [np.array(img) for img in images]

# Create the GIF using the image list

imageio.mimsave('my_animation.gif', images, duration=2000.0, loop=5)

----------------------

The above program creates a image file with .gif extension and images show for 2000 milliseconds and the GIF image runs five times in succession. If you have time elapsed stills of any event you can easily turn it into an amazingly dynamic image.

That is all there is to creating a GIF. If your images are made with care and are of good quality you can indeed create a good GIF.

The GIf file created, my_animation.gif can be seen in Photo app on your windows computer device, however you can just drag and drop the image on a browser should also work.


Mahalo for staying with me. 

p.s: For these holidays, you can create your greeting card with a GIF. Try it!





Installing the latest version of SQL Server

 Download the latest version of SQL Server from here.


There are a couple of download options as you can see on this page from the above link.


If you are a developer, the best option is the Developer version which provides:

  • Full featured free edition
  • Licensed for use as a development and test database
  • It is for non-production use

However, most purposes the SQL Server 2022 Express is adequate. It provides:

  • Free edition of SQL Server
  • Good fit for desktop development
  • Best fit for small server applications.

The SQL Server editions may be installed on Windows, Linux and Docker Containers.

In this blog for purposes of demonstration and use, the Developer edition will be installed on a Surface Laptop 5 with the following features.

Windows 11 Pro, Version 23H2, OS build 22631.3593. It has 16GB installed RAM

Downloading the developer edition begins by clicking the Download button in the above screen. In response you download the executable, SQL2022-SSEI-Dev.exe (4191 KB)file. This file gets displayed as shown.


If you want a quick installation use the BASIC option. 

In blog the Custom option will be used. If you want to differ to another time, you may just download the installation files by choosing Download Media.

Read the details of the SQL Server 2022 Installation Center



Monday, January 20, 2025

Do you need SQLOISIM for SQL Server?

 SQLIOSIM is a tool for simulating SQL Server IO. SQLIOSIM performs reliability and integrity tests on the disk systems that SQL Server utilizes for data and log files. 

It simulates,

Read

Write

Checkpoint

Backup

Sort and 

Read-ahead activities of MS SQL Server.

Main objective of SQLIOSIM is to test the reliability of the underlying I/O subsystem even before installing SQL Server. This proactive tool helps preparing well for the installation. SQL Server installation is not needed for using it as it does not interact with the SQL Server. If an installation exists, using it may overwrite the files. It is not a tool for data security. It is an upgrade over the previous SQ7IOStress utility.

It is located in the Program Files/Microsoft SQL Server/MSSql16.<Named Instance>MSSQL/BINN folder of your installation.

In the installation described here, there are two SQLIOSIM related files in the BINN folder.

SQLIOSIM Application (SqLIOSIM.exe)----GUI

SQLIOSIM DOS file (SQLIOSIM.com)--DOS 

For using SQLIOSIM.com you need to configure the SQLIOSIM configuration file.


What if you cannot locate the file?

If the file is not found as in this installation, it can be found in GitHub. However, if it is not found on the GitHub and one may need to go to Microsoft or raise the issue. As we see later, there may be a way out using the GUI.


https://github.com/microsoft/mssql-support/blame/master/sqliosim/Readme.md


The SQLIOSIM gui can be launched using the SQLIOSIM.exe application in the BINN folder.

Double click the SQLIOSIM application in the BINN folder to launch the GUI.


Click SIMULATOR to open the Simulator. Simulator->Configure will open the Files and Configuration GUI as shown.

From here on it can be used to configure the .mdx and .ldx file locations, size  and max size and Increment parameters on the computer and test patterns for integrity testing can be carried out. Do not choose the existing .mdx and .ldx file locations as they will be overwritten during testing.


Thursday, January 16, 2025

Do you want to custom Install SQL Server 2022?

 SQL Server is a comprehensive software that works with a variety of Microsoft Software such as Reporting Services, EXCEL, 


It is assumed that you are coming here from the following link:

On executing SQL2022-SSEI-Dev.exe (4191 KB)file. This file gets displayed as shown.

Choose Custom edition.

Accept the target location, you may also choose. Clicking Install downloads the installation package.


  Installation begins.


SQL Server Installation Center opens as shown.

 Invest some time in going through this screen before proceeding further.

These are the detailed screens you encounter:

Planning



Installation


Maintenance


Tools

Resources 

Advanced   


Options

The installation center guides you through the process, step by step till you arrive at finishing the installation.

Here is a detailed description of installing SQL Server 2016 Developer Edition

used this installation in writing my books on SQL Server products.



DMCA.com Protection Status