Python Basics: Variables and Data Types

Introduction Now that you’ve written your first Python program, it’s time to dive into some fundamental concepts: variables and data types. These are the building blocks of any Python program. What Are Variables? A variable is a container used to store data in a program. Think of it as a labeled box where you can put a value and access it later. Declaring a Variable In Python, you don’t need to declare the type of a variable explicitly. You simply assign a value using the = operator. Example: name stores a string (“Satya”).age stores an integer (25).is_student stores a boolean… Read more



Difference between PySpark and Python

PySpark is the Python API that is used for Spark. Basically, it is a collection of Apache Spark, written in Scala programming language and Python programming to deal with data. Spark is a big data computational engine, whereas Python is a programming language. To work with PySpark, one needs to have basic knowledge of Python and Spark. The market trends of PySpark and Python are expected to increase in the next few years. Both terms have their own features, limitations, and differences. So, let’s check what aspects they differ. PySpark PySpark is a python-based API used for the Spark implementation and… Read more



Log Shipping Complete Tutorial Part 2 Step by Step Log shipping

Permissions To setup a log-shipping you must have sysadmin rights on the server. Minimum Requirements SQL Server 2005 or later Standard, Workgroup or Enterprise editions must be installed on all server instances involved in log shipping. The servers involved in log shipping should have the same case sensitivity settings. The database must use the full recovery or bulk-logged recovery model A shared folder for copying T-Log backup files SQL Server Agent Service must be configured properly In addition, you should use the same version of SQL Server on both ends. It is possible to Log Ship from SQL 2005 to… Read more



Log Shipping Complete Tutorial Part 1

What is SQL Server log shipping? SQL Server log shipping is a technique which involves two or more SQL Server instances and copying of a transaction log file from one SQL Server instance to another. The process of transferring the transaction log files and restoring is automated across the SQL Servers. As the process result there are two copies of the data on two separate locations A log shipping session involves the following steps: Backing up the transaction log file on the primary SQL Server instance Copying the transaction log backup file across the network to one or more secondary… Read more



SQL Server 2008 Editions

The editions of SQL Server 2008 are as follows: Enterprise: this is the high-end edition with the full feature set. It supports systems up to 8 CPU and 2 TB RAM. The maximum size of the database is 524 PB. Standard it has a bit less features than Enterprise, but it is a good choice when advanced functions (such as data compression, compressed backups, indexed views, etc.) are not required for the business. It supports systems up to 4 CPU and 64 GB RAM. Workgroup: it is suitable for remote offices of a larger company. It supports systems up to 2 CPU and… Read more





Setting Up Alerts for All SQL Server Agent Jobs

Some times clients ask to enable alerts for the sql agent jobs, it will be difficult when we have more jobs, because we need to goto each and every job and enable the notifications. Here is the script for enabling for the jobs, Steps : 1. Create Mail Profile 2. Enable the mail profile for agent (SQL Server Agent Properties –> Alert System –>select Enable Mail profile & Select profile) 3. Create Operator with Mail ID. (Ex : DBA) 4. Run below script for enabling the alerts for all the jobs. We need to decide when we want email to… Read more



Windows Disk Space Alert From SQL SERVER JOB

In SQL server when the auto growth option is set to true and when we have defined the autogorwth in MB, some times we may face the issue like windows disk space is full, during that time SQL Server cannot increase the auto growth size of the mdf or ldf files. As Best practice to have the alert for the drives free space. We can create a job for the below script. schedule it for every 15 or 30 minutes based on your application usage / load.



Types of SQL Server Backup -1 : FULL Backup

The most common types of SQL Server backups are complete or full backups, also known as database backups.  These backups create a complete backup of your database as well as part of the transaction log, so the database can be recovered. This allows for the simplest form of database restoration, since all of the contents are contained in one backup. A full backup can be completed either using T-SQL or by using SSMS Create a full backup of the AdventureWorks database to one disk file T-SQL BACKUP DATABASE AdventureWorks TO DISK = ‘C:\AdventureWorks.BAK’ GO SQL Server Management Studio Right click… Read more



SQL Server Backup Types

The different types of backups that you can create are as follows: Full backups Differential backups File backups File group backups Partial backups Copy-Only backups Mirror backups Transaction log backups   we will discuss one by one in detail in next posts.