1. display all user databases:Select dbid, name, filename from Master. DBO. sysdatabases where dbid> 4
2. display all tables in the database:Current Database: Select name from {db_name} .. sysobjects where xtype = 'U'Database creation: Select name
1. Prepare the MSDE installation file. There is a setup. ini file under the MSDE directory. The content in the file is changed to the following:[Options]Securitymode = SQLSapwd = saDisablenetworkprotocols = 0The above indicates installation in
We can include the entire package in SSIs in a transaction. But what if a table needs to be locked during package execution? The built-in transaction processing of SSIS can solve this problem. Before that, familiarize yourself with the concept of
In SQL Server, you can call the command line tool BCP under DOS to generate text files for the data or SQL statement results in the table.
BCP command parameter format:
BCP {dbtable | query} {in | out | queryout | format} datafile[-m maxerrors]
Getdate // get the current date of the system
Datepart // obtain the specified date part (year, month, day, And hour table)
Getdate () function: gets the current date and time of the system. The return value is of the datetime type.
Usage: getdate ()
In SQL Server 2005, Microsoft released a report that can be viewed directly. However, this report cannot be used in SQL Server 2000.So I wrote the following sentence to return the same result.Create Table TMP (name varchar (50), rows int, reserved
Use Performance Monitor to identify SQL server hardware bottlenecks
The best way to start sqlserver performance tuning is to start with the Performance Monitor (system monitor. You can monitor some key counters within a 24-hour period. You will be
-- One way to detect CPU pressure is to calculate the number of worker processes in the running state,-- You can obtain this information by executing the following DMV query:
SELECT COUNT(*) AS workers_waiting_for_cpu,t2.scheduler_idFROM
Detect memory bottleneck in SQL serverby: Kasim wirama, mcdba
This article, I wowould like to give information about memory bottleneck at SQL Server. the easiest way to know whether your SQL Server undergoes memory bottleneck is by looking at Task
If you are a very busy SQL Server dBA, what do you need to pay attention to first? Which tasks need to be completed regularly to ensure database robustness? In the previous article, we showed you the five wrong practices for Operating SQL server. In
If the table contains clustered indexes and the data to be inserted is sorted to match the clustered index key, the data will be copied to a table with a clustered index andOrderPrompt.This is faster than copying data to a table before creating a
Using ing SQL protocols through windows powershell
Sometimes we are asked about the possibility of processing ing SQL Server protocols through powershell. in SQL Server 2008, The sqlps tool incorporates WMI and SMO into this powerful Windows
DeadlockingOccurs when two user processes have locks on separate objects and each process is trying to acquire a lock on the object that the other process has. when this happens, SQL Server identifies the problem and ends the deadlock by
There are many terminologies in SQL Server backup, which make readers who read the online documentation feel very painful and tangled. I don't know which one is.
Media set/media set (the online documentation contains 2 naming conventions, which
-- List databases in an SQL server instanceSp_databases-- Returns the list of feature names and matching values of SQL Server, database gateway, or basic data source.Sp_server_info-- Returns the list of stored procedures in the current
During the work period, the problem of exporting and importing data between databases of different versions is often involved. Simply sort it out and compare the performance. You are welcome to discuss and supplement some methods that are missing.
00
1. the stored procedure can be compiled only when it is created. You do not need to re-compile the stored procedure every time you execute it. However, the SQL statement we usually use is compiled every time you execute it, therefore, using stored
This article summarizes how to save images to SQL Server in. Net winform and. Net webform (Asp.net) and read the display method.
1. Use Asp.net to upload images and store them in SQL Server. Then, read and display the images from SQL Server:
1)
SQL Server maintains a series of tables in MSDB data to store all the backup and restoration details. Even if you are using a third-party backup application, as long as the application uses the virtual device interface (VDI) of SQL Server for backup
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.