Skip to main content

Posts

Decrease SQL Server Database and Table Size with simple steps

In this clip shows you Practical Tips to Reduce SQL Server Database annd Table Size . The  Steps are provided but process is taking time so final result not shown . You can check from your end by applying steps and it will be for your practice exercise also. How to Shrink MDF,LDF Database Data  and log File in SQL Server and How to check size of all tables in database. Script is  provided to get all table records count,used space,unused space etc.   You can check single as well as multiple table details by checking query in script. If you clean log files before database shrinking then you will able to decrease more size for database. Database size increased due to daily transaction by users and log file size getting huge so you can see this clip to reduce the size of database to improve disk space. You can also set batch job to do in automatically based on time frame you given for batch job in SQL. You can visit below online clip to get more details. If you like

Table data Backup steps from database in SQL Management Studio

How You  can take table backup in sql database There is simple way and step shown in below youtube clip. 1.Open SQL database engine and connect it. 2.let us You want to copy data of table custtable to  table custtable_bkp where custtable_bkp does not exist in your database. 3. This clip will show the step and will create new table with data of custtable . 4. In this clip select into statement used same way you can do the same using insert into command also but insert into used if table custtable_bkp already exist with structure only not data. 5. If you want to drop or delete table you can use this command. drop table <table name> Mow after execution  drop command table will be deleted.. Thanks for watching. If you like it please subscribe

VAT vs GST

How to assign permission for database to user in SQL Server 2012

How to assign permission for database to user . First you need to Connect with database engine in SQL server Then go to security option after databases Then expand  users and select user. then You need to go to user mapping tab. Tick  to yes for your selected database to assign permission . Then select permission. Thanks for watching this clip.

How to Create a Differential Database Backup and Restore in SQL Server 2012 online training clip

This is an Example of differential backup in SQL server 2012 . Following is the Step-by-Step Approach to Differential Backup for database. 1.let us create one database 2.Now create  one single table 3.You need to Insert  two line records in table 4.Take full backup of data base as mentioned on clips Right click on the database name Select Tasks -> Backup  Select "full" as the backup type for taking full backup Select "Disk" as the destination folder and select path of folder  Click on "Add." to add a backup file and type  and click "OK" to start backup Click "OK" again to create the backup .  5.Now insert one more line in table. 6.Then take differential backup   as mentioned on clip Right click on the database name Select Tasks -> Backup  Select "Differential" as the backup type for taking full backup Select "Disk" as the destination folder and select path of folder  Click on "Add.&q

SQL Database shrinking full step details with Screenshots to reduce database size

Step 1: (‎05-‎Mar-‎17 4:00:46 PM) User right click on "MicrosoftDynamicsAX (tree item)" in "Microsoft SQL Server Management Studio" Step 2: (‎05-‎Mar-‎17 4:00:49 PM) User left click on "Properties (menu item)" Step 3: (‎05-‎Mar-‎17 4:00:56 PM) User left click on "Options (tree item)" in "Database Properties - MicrosoftDynamicsAX" Step 4: (‎05-‎Mar-‎17 4:00:59 PM) User left click on "Auto Shrink ()" in "Database Properties - MicrosoftDynamicsAX" Step 5: (‎05-‎Mar-‎17 4:01:00 PM) User left click on "Open (button)" in "Database Properties - MicrosoftDynamicsAX" Step 6: (‎05-‎Mar-‎17 4:01:02 PM) User left click on "containmentTypeComboBox (combo box)" in "Database Properties - MicrosoftDynamicsAX" Step 7: (‎05-‎Mar-‎17 4:01:03 PM) User left click on "Recovery model: (co

Create Index From SQL of Expensive queries

Index creation from expensive query from SQL You can use Activity monitor of SQL . Then you can find missing index detail from show execution plan by right click on query. Add caption If its ax then you can create it from AOT step provided at the end of video.

Sending mail by Telnet and manually checking connection

Open Command prompt using CMD as administrator Then Put in this command : telnet server Name 25 Wait to be invited to next step (ehlo), then put in this command: EHLO   Domai nanme After output put in this command: MAIL FROM : From email address After output  ("Sender OK"), then put in this command: RCPT TO : to email address After output  ("Recipient OK"), then put in this command: DATA After output , then put in this command: Subject : type message After output , then put in a dot (".") and hit enter. After output  and confirmation message, then put in this command: Then  QUIT

Advantages of pragma exception init in ORACLE

1.You can define error message for predefined oracle error number.. But once you declare pragma statement, exception are handled implicitly... No need to raise exception explicitly... 2.User could define error message for predefined ora- error number. I guess this would be advantage of using it.. 3.The pragma actually makes it possible to check for errors which are not predefined. the only other way would be to check with 'WHEN OTHERS' clause and then accessing the oracle error code. 4.To enhance application interface and display accurate reason for an error.

Power BI Dashboard and Architecture

SQL insert query validation constraints to limit number of records

This is sample of query for  SQL insert query validation constraints to limit number of records lets you want to insert only 1000 records in table . We can restrict number of rows, but need to add a column on which we can add some constraint ... check below example.! CREATE TABLE TAB_1000_ROWS AS SELECT ROWNUM COL1 FROM DUAL CONNECT BY ROWNUM <1001; ALTER TABLE TAB_1000_ROWS ADD CONSTRAINT CHECK_CONST CHECK (COL1 BETWEEN 1 AND 1000); ALTER TABLE TAB_1000_ROWS MODIFY COL1 NUMBER NOT NULL; ALTER TABLE TAB_1000_ROWS ADD CONSTRAINT UNIQUE_COL1 UNIQUE (COL1); -- or we can also use sequence with max as 100 and no-cycle! after insertion of 100 values it wont allow any new values to get inserted! will throw check or unique constraint!