in Education by
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. What are some hidden features of SQL Server? For example, undocumented system stored procedures, tricks to do things which are very useful but not documented enough? Answers Thanks to everybody for all the great answers! Stored Procedures sp_msforeachtable: Runs a command with '?' replaced with each table name (v6.5 and up) sp_msforeachdb: Runs a command with '?' replaced with each database name (v7 and up) sp_who2: just like sp_who, but with a lot more info for troubleshooting blocks (v7 and up) sp_helptext: If you want the code of a stored procedure, view & UDF sp_tables: return a list of all tables and views of database in scope. sp_stored_procedures: return a list of all stored procedures xp_sscanf: Reads data from the string into the argument locations specified by each format argument. xp_fixeddrives:: Find the fixed drive with largest free space sp_help: If you want to know the table structure, indexes and constraints of a table. Also views and UDFs. Shortcut is Alt+F1 Snippets Returning rows in random order All database User Objects by Last Modified Date Return Date Only Find records which date falls somewhere inside the current week. Find records which date occurred last week. Returns the date for the beginning of the current week. Returns the date for the beginning of last week. See the text of a procedure that has been deployed to a server Drop all connections to the database Table Checksum Row Checksum Drop all the procedures in a database Re-map the login Ids correctly after restore Call Stored Procedures from an INSERT statement Find Procedures By Keyword Drop all the procedures in a database Query the transaction log for a database programmatically. Functions HashBytes() EncryptByKey PIVOT command Misc Connection String extras TableDiff.exe Triggers for Logon Events (New in Service Pack 2) Boosting performance with persisted-computed-columns (pcc). DEFAULT_SCHEMA setting in sys.database_principles Forced Parameterization Vardecimal Storage Format Figuring out the most popular queries in seconds Scalable Shared Databases Table/Stored Procedure Filter feature in SQL Management Studio Trace flags Number after a GO repeats the batch Security using schemas Encryption using built in encryption functions, views and base tables with triggers JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
/* Find the fixed drive with largest free space, you can also copy files to estimate which disk is quickest */ EXEC master..xp_fixeddrives /* Checking assumptions about a file before use or reference */ EXEC master..xp_fileexist 'C:\file_you_want_to_check' More details here

Related questions

0 votes
    I am using Classic ASP and have the following VB script code From8to14 = date-14 To8to14 = date-8 This sets the two ... "& Day(From8to14) &"' " & _ "AND INTRAY.DateMatched...
asked Jul 6, 2022 in Education by JackTerrance
0 votes
    I have a store to get a list of something in system. To get information by business requirement, this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 9, 2022 in Education by JackTerrance
0 votes
    In order to create the proper queries I need to be able to run a query against the same datasource ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 23, 2022 in Education by JackTerrance
0 votes
    I'm trying to do a SQL Server 2008 setup and I've been given a Cross Language Installation failure ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    I'm trying to do a SQL Server 2008 setup and I've been given a Cross Language Installation failure ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    This one will take some explaining. What I've done is create a specific custom message queue in SQL ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 16, 2022 in Education by JackTerrance
0 votes
    In SQL Server Profile, I have it tracing SP:StmtStarting events. The "TextData" includes information like ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 12, 2022 in Education by JackTerrance
0 votes
    I have tried and tried, and can not get linked. I can connect to the server using SSMS, but can not link to ... = '[password]' GO Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I didn't see any similar questions asked on this topic, and I had to research this for something I'm working ... had the same question. Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I didn't see any similar questions asked on this topic, and I had to research this for something I'm working ... had the same question. Select the correct answer from above options...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    Just wondering if any of you guys use Count(1) over Count(*) and if there is a noticeable difference in ... SQL Server 2005.) Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    I need to remove a highly referenced table in a SQL Server database. How can I get a list of all the ... of the management studio.) Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    SELECT GETDATE() Returns: 2008-09-22 15:24:13.790 I want that date part without the time part: 2008-09-22 00: ... How can I get that? Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    Consider a database table holding names, with three rows: Peter Paul Mary Is there an easy way to turn this into ... Peter, Paul, Mary? Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    In SQL Server, it's possible to insert into a table using a SELECT statement: INSERT INTO Table (col1, col2, ... .id = other_table.id Select the correct answer from above options...
asked Jan 26, 2022 in Education by JackTerrance
...