Showing posts with label sql. Show all posts
Showing posts with label sql. Show all posts
Aug 25, 2013
Aug 21, 2013
Log/Audit Table in Oracle and SQL SERVER
Views:
Today i will explain you Why we create Log/Audit table, How it help us in various situations and How to create Log table and audit table.
In this tutorial we will Learn How to create Trigger in Oracle and Sql server.
In this article i uses both data base Oracle and SQL Server.
By creating log tables, data base automatically logging of changes to several of our database tables.
In this tutorial we will Learn How to create Trigger in Oracle and Sql server.
In this article i uses both data base Oracle and SQL Server.
By creating log tables, data base automatically logging of changes to several of our database tables.
Aug 20, 2013
Get Client IP Address , Host name and Current User in Oracle and SQL Server
Views:
Today I show how to get Client IP Address, Host name and Current Data base user in Sql Server and Oracle.
It very Use full security purposes and in case of any illegal or unauthorized activity is perform on your Database so you can Track and Trace how, when and who is performed that illegal or unauthorized activity.
It very Use full security purposes and in case of any illegal or unauthorized activity is perform on your Database so you can Track and Trace how, when and who is performed that illegal or unauthorized activity.
Sep 1, 2012
SQL Server 2008:How To Create User Defined Functions in SQL
Views:
To day i will Show you how to Create User defined Function SQL Server and how to Use it.
I've already shared how create Store Procedures and How to Get a Return Value From Store Procedures in SQL Server.
Store Procedure ,User Define Function and User Define or User Created Views are Always Saved in the Data Base (MDF file). They are all Fast and Pre-Compiled which means we call these Functions or Store Procedures From Our business logic layer or (Simply from Coding ) where they are Directly Executed and thus which Saves time.
Difference of time saving is noticible in enviorments where you have 25-30 tables and Each table has 1,000-50,000 rows, in these Situations we Feel the Difference between In-Line Queries and Pre-Compiled SQL Statements(Store Procedure ,User Define Function and User Define or Created Views etc).
I've already shared how create Store Procedures and How to Get a Return Value From Store Procedures in SQL Server.
Store Procedure ,User Define Function and User Define or User Created Views are Always Saved in the Data Base (MDF file). They are all Fast and Pre-Compiled which means we call these Functions or Store Procedures From Our business logic layer or (Simply from Coding ) where they are Directly Executed and thus which Saves time.
Difference of time saving is noticible in enviorments where you have 25-30 tables and Each table has 1,000-50,000 rows, in these Situations we Feel the Difference between In-Line Queries and Pre-Compiled SQL Statements(Store Procedure ,User Define Function and User Define or Created Views etc).
Aug 16, 2012
Generate Data Base Script in Sql Server
Views:
Today I will show you how to Generate Full Data Base Script in SQL Server 2008 or 2005.
By Generating SQL Data Base script basically we copy complete database schema and all of its objects such as Stored Procedures, Functions, Triggers, Tables, Views, Constraints etc. You can review your schema, backup for reference or use it to compare with previous backup.
SQL Server Management Studio provides an efficient wizard to generate scripts to transfer objects along with their dependencies as well as the data.
In this tutorial, let's firstly generate a migration script for the following objects from the AdventureWorks database:
By Generating SQL Data Base script basically we copy complete database schema and all of its objects such as Stored Procedures, Functions, Triggers, Tables, Views, Constraints etc. You can review your schema, backup for reference or use it to compare with previous backup.
SQL Server Management Studio provides an efficient wizard to generate scripts to transfer objects along with their dependencies as well as the data.
In this tutorial, let's firstly generate a migration script for the following objects from the AdventureWorks database:
Aug 11, 2012
Free Download SQL assistant Full Version
Views:
Now you can Download Free SQL ASSISTANT Full Version or Crack Version.
Let Me Introduce What is SQL ASSISTANCE?
It is an intellisense tool for Data Base Developer ,Data Designer and DBAs to increase Coding,query and Sql Programming
accuracy ,Productivity and improve code quality.
It support and Provide Facility for code snippets, automatic word completion, and attribute browsing into the SQL query or coding window.
It help a lot you to in writing long or complex store procedures through its automatic word completion facility.
Let Me Introduce What is SQL ASSISTANCE?
It is an intellisense tool for Data Base Developer ,Data Designer and DBAs to increase Coding,query and Sql Programming
accuracy ,Productivity and improve code quality.
It support and Provide Facility for code snippets, automatic word completion, and attribute browsing into the SQL query or coding window.
It help a lot you to in writing long or complex store procedures through its automatic word completion facility.
May 23, 2012
How to Make Back and Restore Data base
Views:
To day I show You how To
In previous post I show you how to connect Manage studio with Visual studio .
HOW TO MAKE DATA BASE BACKUP AND HOW TO RESTORE IT IN SQL SERVER Management Studio.
Normally Data back can be Done very easily but there is some Confusion in restoring the data base.In previous post I show you how to connect Manage studio with Visual studio .
Following Step is Involve to take Back up of data base









VIDEO
First, you need to configure the Microsoft SQL Server Management Studio on your local machine. If you don’t have it, you can download it from the following location.
Step 1: Open your Microsoft SQL Server Management Studio, whichever you prefer, standard or express edition.
Step 2: Using your Database Username and Password, simply login to your MS SQL server database.
Step 3: Select the database >> Right-click >> Tasks >> Back Up [as shown in the image below]:

Once you click on the “Backup” the following Backup Database window will appear [as shown in the image below]:

Step 4: Select the following options:
- Backup type: Full
- Under Destination, Backup to: Disk
Step 5: Now, by clicking on the “Add” button the following window will appear to select the path and file name for the database backup file [as shown in the image below]:

Step 6: Select the destination folder for the backup file and enter the “File name” with .bak extension [as shown in the image below]:

Make sure you place your MS SQL database .bak file under the MSSQL backup folder.
Step 7: Hit the OK button to finish the backup of your MS SQL Server 2008 Database. Upon the successful completion of database backup, the following confirmation window will appear with a message “The backup of database “yourdatabasename” completed successfully. [as shown in the image below]:

Following the above shown steps, you will be able to create a successful backup of your MS SQL Server 2008 Database into the desired folder.
How to Restore MS SQL Server 2008 Database Backup File ?
In order to restore a database from a backup file, follow the steps shown below:
Step 1: Open your Microsoft SQL Server Management Studio Express and connect to your database.
Step 2: Select the database >> Right-click >> Tasks >> Restore >> Database [as shown in the image below]:

Step 3: The following “Restore Database“ windows will appear. Select “From device” mentioned under the “Source for restore” and click the button infront of that to specify the file location [as shown in the image below]:

Step 4: Select the option “Backup media as File” and click on the Add button to add the backup file location [as shown in the image below]:

Step 5: Select the backup file you wish to restore and Hit the OK button [as shown in the image below]:

That’s it! You will get the confirmation windows with a message “The restoration of database “yourdatabasename” completed successfully.” Now you know the procedure of backing up and restoring MS SQL Server 2008 Database.
VIDEO
May 20, 2012
Connect Management Studio Data Base from Server Explorer of Visual Studio
Views:

To day I show You how To
connect SQL Management Studio from Server Explorer of Visual studio.
I am always very Much Confuse to Connect Local DB in Visual Studio 2010 from Sql Management studio.
But Now I search Alot and clear My Concepts and I also Want to Show these Concepts to you So can Also understand .
Now Open Visual Studio And Create New Project (Asp.net Site or Windows Form Application)
Open Server Explorer Window
- Server Explorer is known as Database Explorer in Visual Studio Express
- MSDN How to: Connect to a Database from Server Explorer
- Visual Studio 2010 comes with Server Explorer - which allows you to connect to a remote SQL Server database.
- View → Server Explorer → click the Connect to Database button on the top of the Server Explorer panel
- From the View menu, choose Server Explorer.
- In Server Explorer right-click the Data Connections node and choose Add Connection.
-
- Use the following godaddy connect parameters
- click the Test Connection button
-
So Here We Successfully Connect to Management Studio data base .
Please Watch the video
Oct 7, 2011
How TO Get return value from stored procedure
Views:
- Recently we changed our DAC layer from using inline SQL to stored procedures in the database. On some of these SQL, we did record deletion (usually only 1 record), and we just execute it via IDBCommand.ExecuteNonQuery() and then check the return value to see how many records were affected (which should be 1) for verification that the query actually does something.
With the change to stored procedure, we just return 1 in the stored procedure if the delete is successful. However, the calling code then started to show these deletions as errors. Apparently ExecuteNonQuery only returns the number of affected rows on SELECT, INSERT and DELETE statements; for everything else it returns -1. So I tried to figure out how to get a return value from a stored procedure.
Let's assume a simplistic stored procedure as follows:
You can't use ExecuteScalar to get the returned value, and ExecuteNonQuery will always return -1. To get the value back, you need to add a return value parameter to the command. The name of the parameter is not important. The code to get the value returned by that procedure will be as follows:ALTER PROC ReturnOnlyASBEGINRETURN 5ENDprivate int ExecuteStoredProcedure(string storedProcedureName){SqlConnection connection = new SqlConnection(connectionString);// Command - specify as StoredProcedureSqlCommand command = new SqlCommand(storedProcedureName, connection);command.CommandType = CommandType.StoredProcedure;// Return value as parameterSqlParameter returnValue = new SqlParameter("returnVal", SqlDbType.Int);returnValue.Direction = ParameterDirection.ReturnValue;command.Parameters.Add(returnValue);// Execute the stored procedureconnection.Open();command.ExecuteNonQuery();connection.Close();return Convert.ToInt32(returnValue.Value);}
Jun 6, 2011
BrowseUpload Sign Out Part 2 of 2 - How to: Connect to SQL Server using ADO.NET and VB.Net
Views:
Part 2 - I'll take you through setting up a SQL server database and table, then moving into Visual Studio and creating an application in code that retrieves and saves data to SQL Server.
Part 1 of 2 - How to: Connect to SQL Server using ADO.NET and VB.Net
Views:
Part 1 - I'll take you through setting up a SQL server database and table, then moving into Visual Studio and creating an application in code that retrieves and saves data to SQL Server.
Apr 1, 2011
SQL Server Tutorials
Views:
Video Sub Category
NOTE:- To view a video, click on the title. To update time watched, please login. (The Microsoft videos are totally free, but they do require that you register with them to view the videos and you also have to use Internet Explorer browser, instead of Firefox, Safari, etc.)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subscribe to:
Posts (Atom)














