Do others have the problems that we have in our company, where we have
a field from a table, and need to know all the SQL Server processes
that may change that value? I'm still hoping somebody can tell me of a
tool, or set of queries or something that will document the fields in
the tables and the processes that affect them, along with the values
that it sets. For example:
TableA.FieldA:
sp_InsertNewRec: sets field to Null when new record created
sp_ChangeStatus: sets field to the value of the parameter passed in
tr_LogChanges: sets field to be the current datetime
Maybe we're just too sloppy at my company, but it seems to be fairly
obvious need to have some sort of automated process that can provide
that documentation. With thousands of fields, hundreds of stored
procedures, triggers, DTS's etc..., documenting this information is a
VERY daunting task. Any help at all would be appreciated.
I understand that SQL Express is a free tool and its placed between Access and SQL 2000 / 2005. I also understand that it supports Database upto 4 GB, which is quiet sufficient for any small or medium sized company.
My question is a bit confusing... let me explain. We get Access database free by the hosting comany. We just have to pay extra if we need SQL 2000 or SQL 2005 support, depending on size.
Will we get SQL Express Free support as its a lready free for all. In Access case, we just have to upload .mdb file along with rest of our code, what is the procedure for uploading SQL EXPRESS data. I believe since its a light weight tool,all the procedures must be same like Access.
Dear GroupI'd be grateful if you can provide me with a hint for the following:Fields Table ContactContactIDFirstnameLastnameFields Table ContactMethodContactMethodIDContactMethodTxtContactMethodTypeIDLinked by Tables:Fields Table LkTbl_Contact_ContactMethodLkTblIDContactIDContactMethodTypeIDFields Table ContactMethodTypeContactMethodTypeIDContactMethodThe purpose of this construct is that I keep all contactmethods suchas Email, Mobile, Home Work, Web in table ContactMethods. Whether it'se.g. an Email or Mobile is identified through the ContactMethodType.That enables me that a Contact can have 3 Mobile Numbers, 2 Emailaddresses.For the sake of simplicity, lets say I want to return the Contact Nameand Home, Work and Mobile numbers. Not all of them but the firstmatching record of each from the ContactMethod table.I must note that the contents of table ContactMethodType for columnContactmethod looks like this:EmailMobileHomeWorkWebI do:Select Firstname, Lastname, Home, Work, Mobile FROM ContactJOIN LkTbl_Contact_ContactMethod ON(LkTbl_Contact_ContactMethod.ContactID = Contact.ContactID)JOIN ContactMethod ON (ContactMethod.ContactMethodID =LkTbl_Contact_ContactMethodID)JOIN ContactMethodType ON (ContactMethodType.ContactMethodTypeID =ContactMethod.ContactMethodTypeID)The question is, how do I map the result from table ContactmethodTypeto my fields Home, Work and Mobile in the resultset? The Type isidentified in ContactMethodType but I can't figure out how to do thisbest.Your help and suggestions or any other better solution is veryappreciated.Thanks in advance for your help and efforts,Martin
If you have followed a link to this page (i.e. the URL contains "SearchTerms=xxx") please scroll down to see items of interested highlighted
This list of SQL Server Frequently Asked Questions (FAQ) was originally compiled in August 2005 based on the most frequently "read" posts on SQL Team. Since then new links have been added as topics become popular - so it might be better referred to as FGA - Frequently Given Answers!
NC=Indicates that the Article has NOT been checked for relevance. As time goes on these are getting fewer and fewer The latest change is in Red Recent changes are in Teal
URL to link to this post: 17Nov2005 http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms= Followed by either "Keyword1,Keyword2" or "PhraseWord1+PhraseWord2"
The icon allows you to RightClick-CopyShortcut to provide a link to this topic with appropriate keywords - I got bored of having to make them manually! 07Mar2006 Stats
Homework I put this one at the top, in case you don't read any further. To find out if your homework will be answered on this forum you should see if it qualifies: Requirements for homework questions 07Mar2006 Example of Failure to meet the minimum requirements 07Mar2006 Learning SQL www.sql-tutorial.net 07May2007 www.firstsql.com/tutor.htm 07May2007 www.w3schools.com/sql/default.asp 07May2007
Why? Why is my LDF Log File so big / getting bigger / bigger than my MDF 14Oct2005
How to
How to ask a question on SQL Team and get a quick answer - i.e. the information you need to provide 06Nov2006 How to format your question or a reply (in particular see the [code] option 18Sep2007 how to encrypt and decrypt my password 07May2007 Rounding up/down to nearest multiple (e.g. order in dozens, buy at least 30) 28Sep2006 Replace multiple spaces, or other character, with single space 28Sep2006 Generate a Random String 13Sep2006 String comparison 24Jul2006 Article: Images and SQL Server How to get Images or blobs into SQL table (NC) Inserting Images as BLOB in SQL server table (NC) How to use DeBUG window in QUERY Analyzer (NC) Use a Parameter in the Top clause Dynamic SQL or How do I SELECT TOP @var records? Can't insert NULL into table with unique key (NC) Efficient paging of recordsets with T-SQL Article: Paging in SQL 2005 07May2007 Execute dynamic SQL that is longer than varchar(8000) 05Oct2005 Convert multiple spaces to single spaces 14Oct2005 Making Upper/Lower Case Sensitive comparison 27Oct2005 Convert to Proper Case (each word starts with capital) 19Feb2006 Deleting a massive number of rows 04Mar2006 Combine values from rows into a column 05Oct2005 i.e. FOO 1 FOO 2 becomes: FOO 1,2
CSV / Splitting delimited lists WHERE IN @MyCSV Article: Passing a CSV or Array to a Stored Procedure (NC) Best split functions and Concatenating data from rows with same GroupBy column Triggers Triggers to audit changes trigger to keep tables matching Set Update/Modified date column using a trigger 02Nov2005 Deactivating a trigger 07Feb2006
SQL Team Articles Article: Identity and Primary Keys - and Surogate Keys See also Article: Sending SMTP Mail using a Stored Procedure (NC) Article: Dynamic ORDER BY (NC) Article: More Trees & Hierarchies in SQL (NC) Article: Using SELECT to INSERT records (NC) Article: Deleting Duplicate Records Article: Returning a Row Number in a Query (NC) Article: Calculating Running Totals (NC)
Datatypes / Collation
GUIDs (NC) IsGUID check GUID is valid 01Aug2007 DATALENGTH() and LEN() 21Sep2005 Compare BIT columns and a BitMask column 05Jan2006 Collation conflict in Assignment or WHERE clause 05Feb2006 (See "Developer / Techie stuff" below for some other Collation links)
Datatypes - Dates
Time Only Function: F_TIME_FROM_DATETIME 29Apr2006 Date/Time Info and Script Links (including UNIX time) 16Apr2006 Date formatting ( Format Date/Time (NC) last date of the month (NC) Getting the date portion of a datetime value or Round a date to Year, Quarter, Month, Day, Hour or Minute How to get date in t-sql (NC) compare date with current date (NC) convert varchar to datetime (NC) Compare dates regardless of time? (NC) Convert varchar to date (NC) Time in Analog (NC) Start of Week Function (NC) Earlier date than 1/1/1753
Techniques
Prevent Administrators accessing a database 14Sep2006 SELECT vs SET 26Sep2005 What is a cursor, Why is it bad? 23Sep2006 Cursor or Not (NC) TSQL/ SP Best Practices (NC) case-sensitive (NC) User-Defined string Functions Transact-SQL (NC) Passing an array into a stored procedure (NC) Comparing two tables or views easily (NC) All Tables in All Databases (NC) Better Phonetic Matching Algorithm (A better Soundex) Levenshtein Edit Distance Algorithm (A better Soundex) Fuzzy matching 01Aug2007 Find tables with no PK (NC) Function: HTMLDecode (NC) How to protect errorlogs to tables from rollbacks (NC) Distance of Zip/Postcodes Great Circle Formula 07May2007 Haversine Formula 07May2007 Accuracy v. Speed 07May2007 See also here, here, here, here and here and here Upsert - combined Update/Insert Procedure 01Aug2007 and here Display all columns but only for rows with the most recent date 01Aug2007
Developer / Techie stuff
Changing column names on referencing objects 07May2007 When was DB object last updated 07May2007 How to clear the whole database 07May2007 Move / Script Development Database Changes to Production Database / Ship Application updates 04Nov2006 Script to analyze table space usage 11Oct2006 What version, and Service Pack, of SQL Server am I using? 23May2006 SQL Beautifier 13Apr2006 Performance / System Monitor / PerfMon - preferred values for counters 04Apr2006 SQL Server 2000 Knowledge Base Articles - updated every 3 days 21Jan2006 Concerns about SQL 2000 SP4 08Jan2006 Support stops for SP3a AND installing sp4 on cluster 26May2006
How to read Mssql transaction log file Compare data in two tables / two databases 31Oct2005 Recommended books 07Oct2005 Good tools for DBAs 06Oct2005 Best SQL Security Method (NC) Some query optimalisation (NC) Requirements for Horizontal Partitions Multiple SQL Server 2000 Instances (NC) Primary Key v. Unique Index (NC) HOWTO Run SQL Profiler without sysadmin rights (NC) upgrade from SQL7 to SQL2000 (NC) xp_cmdshell execute right (NC) Monitor object usage over time (NC) size of user tables in a database (NC) Changing Column Length (NC) Add, Sub, Mul, Div With Really! Big Numbers (NC) So you're a DBA eh?! Why I'm not a DBA (NC) Do you S-Q-L or Sequel (NC) Interview questions (NC) More Interview questions 11Sep2006 Best steps to becoming a DBA (NC)
Developer / Techie stuff - Collation
Bulk Delete of Records 07May2007 and locking issues 01Aug2007 Deleting lots of Records from a large table 01Aug2007 Synchronising data using staging tables 07May2007 Version Control 07May2007 how to change Collate on the server 20Sep2005 How to change default collate in SQL 20Sep2005 Cannot resolve collation conflict for equal to OP 20Sep2005 different Collation Settings between Databases 20Sep2005
Database Design and Structures
Codes - Common Lookup Tables CLT 04Jun2006 Good table naming convention 09May2006 Naming Store Procedures 09May2006 Recursion / Hierarchy 29Apr2006 Hierarchies (NC) Normalisation (NC) NULL opinion? (NC) Finding evidence of sql injection attack Security Testing: SQL Injection 09May2006
Locking
Using the NOLOCK hint 07Jun2006 how does row locking work (NC)
EMail
sp sending mail (NC) CDOSYS Send Email (NC)
XML
SQL Server 2000 XML (NC) Adding an XML Root Tag Handling tricky namespaces in OpenXML
Backup / Restore / Replication / Jobs / Houskeeping
Backup How Backup works What type of backup should I use? - Full, Differential, Transaction? Should I shrink the log? 22Jan2006 Automating Backups - Scripting v. Maintenance Plan / Wizard 08Mar2006 Backup to Disk, or direct to Tape? 05Dec2006
Disaster Procedure Checklist I think I have a database corruption, how do I mitigate any further damage and get upright again? 07May2007 How I Rescue Data from Corrupted Databases 07May2007 Disaster Recovery Plan 07May2007 Quiesce the SQL Service to enable low-level copy 01Aug2007
Restore RESTORE syntax / example Restore SQL 2005 to SQL 2000 via Downgrade 07May2007 Restore Full and all TLogs backups based on files in disk folder 07Dec2006 Move database to a new server (with minimal downtime) 16Feb2006 Moving to a new sql server 25Jun2006 Fix Orphaned Users (after a Restore or moving DB to a different server) Script User Logins after a Restore 01Aug2007 and Scripting users & logins from one server to another (e.g. after moving DB to a different server) 25Jul2006 how long will take to restore a 10 gb? All I have is the .bak file Restoring .BAK file to a different server? Unable to restore/attach a MDF file (single file attach / sp_attach_single_file_db) See also: This and this and this
Shrink Database / Files
Shrinking TEMPDB 19Apr2006 Database Shrinking 09Jan2006 Log Shipping -Shrinking Log and Data files (NC) MSDB Massive msdbdata.mdf
Housekeeping / Maintenance
Tara Blog Houskeeping Routines 06Oct2006 Index Tuning Wizard 07May2007 User Rights for SQL Service 07May2007 When was SQL Server last restarted? 07May2007 Optimising your indexes with DBCC INDEXDEFRAG 06Oct2006 Detach Move Db & Log File Reattach 17Mar2006 Rebuilding Indexes DBCC CHECDB, CHECKTABLE, NEWALLOC (old) Suspect Databases after Power Cut? Jobs failing (NC) Reindex All Tables in All Databases (old) deleting replication (NC)
Export / Import / DTS
Copying/backing up DTS Packages (NC) Export to Excel (NC) Generate INSERT statements for N rows of data Tool to script database records? (i.e. generate INSERT statement script) How to convert DATE Format from DD/MM/YY to MM/DD/YY in DTS (NC) Importing an Excel File with DTS (NC) Is DTS Secure for credit card backup to Access? (NC) Winzip in scheduled DTS Package (NC) Article: Using BULK INSERT to Load a Text File (NC)
Output / Reporting / Formatting
Pivot table (NC) Article: Dynamic Cross-Tabs/Pivot Tables (NC) which led to: More Dynamic CrossTabs using T-SQL 04Aug2006 (Jeffs Blog)
Error Messages
SQL Server does not exist or access denied (NC)
Connections
Linked Server Newbie Question (NC)
Configuration / Hardware
/3GB in boot.ini on Win2003 standard 19Oct2005 SQL memory /3gb /PAE AWE 19Sep2005 SQL Server Standard & 4GB memory Using AWE option in SQL Increasing SQL Server Memory
MSDE
MSDE Setup fails (NC) MSDE Install Issue (NC) Installing MSDE on XP Pro (NC) Backing up MSDE database (NC)
SQL 2005 / Yukon
Migrating to SQL 2005 Hints and Tips 01Aug2007 SELECT not allowed in Yukon/SQL2005? (NC) Download Yukon/SQL2005 (NC) SQL Server Management Studio (NC)
MySQL, Oracle, and the others
MySQL not as good as MS SQL? Migrating from Oracle to SQL Server
Other
SQL Reporting Service SP2? (NC)
Got an hour .. or ten ... to spare?
Would you work at Elwoo's office? Simple Quiz What is a Yak? 07May2007
Hello, I have several SQL 2000 logins on our servers. I removed the builtin/ groups and only have SQL authentication users, although the server is operating in "Mixed Mode". How can I secure this? I don't understand how we can just connect to any DB without ever being asked to log in. Let me know if you can help. Thanks.
Here is my goal please let me know if it is possible.
I have installed sql express on clients machines. I don't want them to be able to view the sp's or the functions. I would like to go as far as not allowing them to see the tables. I tried with encrption but this is still breakable by the user using the DAC.
Does CE
Support transactionscope?
What would I use to create tables and sp's for my sdf database? Server Managment Studio or something else?
I am new to the forum and would like to have a question answered. I want to to install Sql Server Express with advanced services but also want to have IIS installed as well. My question is, how do I install IIS without it opening Port 45? When I installed it, it would not let me finish installation without letting it act as a server. Is there any work around to solve this problem that any of you have managed to use?
I have a field which stores date which the datetime datatype... The problem is that I am also getting time information in this stored field.
I just want to extract the date part in dd-Mmm-yy format (e.g. 07-May-04). I tried convert (char (8), MyDateField, 112) but it gives me date in yyyymmdd format. How do I get the results in dd-Mmm-yy format instead?
I have a question about the best method to ensure the proper flow of control within a package. I have three related SQL tasks €“ A, B, and C €“ that must execute in sequence. If any one of the tasks fails then the remaining tasks should not execute because each is dependent on the previous step. (A €œsuccess€? precendence constraint.)
Likewise, I have a second set of SQL tasks €“ 1, 2, and 3 €“ that must execute in sequence. Task 3 should never execute unless tasks 1 and 2 have been successful.
I consider these to be two independent logic paths in the same package and, indeed, when I run the package both task A and task 1 begin running at the same time.
What I€™m not sure of is how to add a new task €“ Z €“ that will execute only after both the A-B-C and 1-2-3 task paths have completed. Diagramatically, this would be like having a €œcompletion€? constraint linking task C to task Z and another €œcompletion €œ constraint linking task 3 to task Z. In other words, the two independent paths merge at task Z. Task Z is an audit step that must always run €“ it emails summaries of the database activities performed by the other tasks.
What has me puzzled is how I get to Z when there is a failure in either the A-B-C path or the 1-2-3 path. As things stand now, the package will never reach task Z if there is a failure in an earlier task because they are joined by a €œsuccess€? constraint.
I thought I could get around this by using a €œsequence container€? but I discovered when I added A, B, and C to a container that I couldn€™t use the €œsuccess€? constraint I needed. I was just guessing that this might be the way to do it.
Can anyone help me with a best practice approach to the control flow issue I face? I€™m new if that isn€™t apparent by my question, so don€™t be afraid to make your answer simple and plain.
Hello,I'm trying to create a simple back up in the SQL Maintenance Plan that willmake a single back up copy of all database every night at 10 pm. I'd likethe previous nights file to be overwritten, so there will be only a singleback up file for each database (tape back up runs every night, so each daysback up will be saved on tape).Every night the maintenance plan makes a back up of all the databases to anew file with a datetime stamp, meaning the previous nights file stillexists. Even when I check "Remove files older than 22 hours" the previousnights file still exists. Is there any way to create a back up file withoutthe date time stamp so it overwrites the previous nights file?Thanks!Rick
New to Database Mirroring and I have a question about the Principal database server. I have a Database Mirroring setup configured for High-safety with automatic fail over mode using a witness.
When a fail over occurs because of a lost of communication between the principal and mirror, the mirror server takes on the roll of Principal. When communication is returned to the Principal server, at some point does the database that was the previous Principal database automatically go back to being the Principal server?
I need to run two reports each of A5 Size to run back to page and print on single A4 paper means in 1st half Sale bill will be printed and in second half Gate Pass Will Be Printed both report will be on same page and size and shape should be maintained. How to do it.
Hello,I am hoping you can help me with the following problem; I need to process the following steps every couple of hours in order to keep our Sql 2000 database a small as possible (the transaction log is 5x bigger than the db).1.back-up the entire database2.truncate the log3.shrink the log4.back-up once again.As you may have determined, I am relatively new to managing a sql server database and while I have found multiple articles online about the topics I need to accomplish, I cannot find any actual examples that explain where I input the coded used to accomplish the above-mentioned steps. I do understand the theory behind the steps I just do not know how to accomplish them!If you know of a well-documented tutorial, please point me in the right direction.Regards.
Does anybody know of a way to rollback SQL Server 2005 databases back to SQL Server 2000? Is there a way of doing it without resorting to Copy Database Wizard? I love to find a way of attaching a SS 2005 database to a SS 2000 instance without any issues.
I recently upgraded to SS 2005 and I am very unhappy with the SS 2005 and I want to rollback to SS 2000, which was a lot more stable. I am having several major issues that are affecting my whole company's day-to-day operations and the managers are not happy. Some of the issues include night time batch running very sluggish for no apparent reason. This is a biggest problem because it only occurs once or so a week and causes a disturbance with the daily activities when the night time processing isn€™t completed on time. The rest of the time, the batch processing runs great, even a little better then on SS 2000. I don't believe it is a matter of my application needing to be retuned because if that was the case, then why isn't it running sluggish every night? Also, it's never the same day that the sluggish behavior occurs. If it was occurring on the same night, then I would have something to investigate within our application, but it doesn't. Another issue that I am having involves a night time job that restores a copy of the production database to the Data Warehouse server to be used for updating the data warehouse. Again, most of the time it runs great (~2 1/2 hours), but once or twice a week, it goes stupid and takes 6 1/2 hours for no apparent reason. Again, it is not happening the same day either, which could give me something to invesigate. On SS 2000, this same job ran flawlessly. Never I did I run into situation that the database restoration took that long to run. Even another issue involves a SQL Server Agent Job that was put into suspended state. What's a suspended state and how can I get it out of suspended state? I can find no information about suspended state in BOL. I did a Google and nothing came up. If this suspended state was put in for security reasons, great, but then tell me how I can remove the suspended state. I am also not happy with the fact that I can't get accurate information about the queries that are actively running at that particular moment. In SS 2000, when I noticed high CPU usage on the server, I would run the sp_who2 active stored proc and it would show me all the active thread and how much CPU it was consuming. I would then find the running threads with the highest CPU numbers and investigate the query and see if we could improve it. Now in SS 2005, I get in the same situation and run the sp_who2 stored proc, and there is no smoking gun. All of the active threads are showing very little CPU usage, which I am very suspect of. What the heck happen to sp_who2? I looked at some of the other ways of looking at running processes (i.e... sys.sysprocesses) and they don't appear to be giving the information that I need.
I am very unhappy and I just want to roll back to SS 2000 and wait a couple of years before I upgrade to SS 2005.
anyone try to convert a 7.0 database back to 6.5? Is there a way to move the data back or does the 6.5 to 7.0 upgrade change field identifiers or anything else prohibiting the move?
Please help. We need back up database on remote SQL Server backup device, because first one doesn't have space for backup file. Give mi hint what to do.
Hi all, I know how to backup database form full back, diffrential backupp. I ' d like to know how to restore database from transaction log file not from backup file. Thanks fro reading.
What is the best practice for a SQL back up? We are installing Symantec Backup Exec. Is it really necessary to pay for the SQL backup agent? What does the agent do for you that the regular backups within SQL doesn't give you?
I wrote a stored procedure. It work properly. But I want to catch if any error occurs while executing it. And I want to make roll Back on error .And send the error OUTPUT How can I roolBack the command below and How can I send the error over OUTPUT parameter? execute(@cmdS) Thanks.
Hi, I am trying to connect to a SQL DB and pull data from it. But i never get back any rows. I have run the query, it works fine and i get back rows. But htis does not seem to work. HELP ? Attaching my code TryDim ConnStr As String = System.Configuration.ConfigurationManager.ConnectionStrings("Engineering_Health_SiteConnectionString").ToStringURLConn = New Data.SqlClient.SqlConnection(ConnStr) URLConn.Open() Dim param1 As New Data.SqlClient.SqlParameter("@FG", Data.SqlDbType.NVarChar) Dim param2 As New Data.SqlClient.SqlParameter("@SS", Data.SqlDbType.NVarChar) Dim query As String = "Engineering_Health_Site.dbo.usp_GetSiteURL"Dim comm As New Data.SqlClient.SqlCommand(query) comm.Connection = URLConn comm.CommandType = Data.CommandType.StoredProcedureparam1.Value = Me.DropDownList1.SelectedValue.Trim comm.Parameters.Add(param1)param2.Value = Me.DropDownList2.SelectedValue.Trim comm.Parameters.Add(param2)Dim adap As New Data.SqlClient.SqlDataAdapter(comm)Dim dt As New Data.DataTable adap.Fill(dt)For Each row As Data.DataRow In dt.Rows Response.Write(row(1).ToString) NextCatch ex As Exception Response.Write(ex.Message) Finally URLConn.Close() End Try
Hello all ASP'ers, I'm very familiar with .net code and data access as it is what I do for a living. However, what I don't do a lot is make my own web project from scratch. All our DB connections are handled through a DB class that we instansiate and use, quite easy. BTW, we hit an Oracle DB and code in C# in VS 2008 Team Developer.Here's my (simple I hope) dilemma.I'm using VS2008, C#, SQL server database. I put a text box and a button on the front page (of my web page) for users to enter their email address for a newsletter. I created the DB by right-mouse-clicking on my project icon in the Solution Explorer, add new item, then selected SQLServer Database, it and saved it. It now appears in the Solution Explorer. I've added the table and columns I need but for the life of me I cannot connect to it. I've seen TONS of connection string examples but I need help getting the proper syntax for my situationI have not created a user ID or a password for the database. What do I put in for the DataSource and the database?I dragged the database icon into my code and got the local path wher it resides:C:FilesWebProjects2008WbProjApp_DataNews.mdfHere is the most common connection string I see for SQL Server:SqlConnection Conn = new SqlConnection(" + "Data Source=Your server name;" + <------ What goes here?"database=Your Database Name;" + <------ What goes here?"UID=UserID of the server;" + <------ Can I get rid of this?"PWD=password of the server;"); <------ Can I get rid of this?I've done a different project using an Access DB and have that guy up on the web working great, I just can't get htis one connected and the data a' flowin'.Please help, this is my personal website and I want to use SQL Server but I'm getting frustrated and just might go back to Access, aaaaggghhhhhhh...Once I get past the Conn.Open(); in a try/catch I'll be good. I've got the rest of the data commands in place and ready to go. Here is a link to a visual to help you see what I'm doing, it's just a shot of my solution explorer.
Hi, For Asp.net project i have used backend as sql server database.My database name is Traveldb.i want to take the backup for this database in SQL Server as a "Filename.sql". Please tell me the steps to follow to take the backup file as SQL Script File extension.Thanks & Regards,Laxmi