This is really exciting to see SQL Server roadmap towards improving the performance of the database and making it more robust for Business Intelligence processing. OLTP was really a problem in older version of the database, Microsoft SQL Server 2014 with the improvement of in-memory will make a lot of difference. Here are some brief outline from the datasheet about SQL Server 2014:-
Question: I have executed the script given on below link to rebuilt all table indexes on SQL Server, but how do I know whether it is updated or not.
SQL Script for rebuilding all the tables’ indexes
Now the problem is that SQL Server does not store the information when all the indexes were rebuilt, however it stores the information on when was the last time statistics were updated.
Below are some good practices for creating stored procedures in SQL Server database.
1) Include SET NOCOUNT ON Statement in your stored procedure
2) Use Schema name with tables objects in the stored procedure
3) Do not use SP_ prefix to name stored procedure
SELECT CONVERT(NVARCHAR(12),GETDATE(),131) AS 'Hijri Date'
SELECT CONVERT(NVARCHAR(12),GETDATE(),130) AS 'Hijri Date'
OutPut : 28 شعبان 143
A Function Dependency tells you the relation ship of two columns in the a table.Functional Dependencies are fundamental to the process of Normalization that describes the relationship between attributes(columns) in a table.
For example, if A and B are ..............
Many times such requirement comes wherein you need to copy data from one database to another database. Below is the sample sql script demonstrating the same.
You can use a three part qualifier like DatabaseName.Schema.TableName to address a table in a different database.
INSERT INTO Databas2.dbo.TableName
SELECT * FROM Database1.dbo.TableName
You just need to make sure the selected data matches the datatypes in the destination table.
Here is simple sql update script with inner join in the statement
set FileName = 'abcd’, FileNo = b.FileNo + 1
from DocAttributes a
inner join Docs b on a.DocID = b.DocId
where a.doctypeId = 2
There several ways you can check when was SQL server restarted last time. Below are some sql queries to quickly find out the server restart date time. You can run any one of below, all will give same result.
SQL Script to check number of CPU installed on the server.
Physical CPU (Core) = CPU Count / Hyper threaded Ratio
Here is the script which will rebuild all the indexes for all the tables in your database.