/*--a paging program implemented using stored procedures
Show page x for specified tables, views, query results
For the primary key or identity column in the table, the query is taken directly from the original table, and other cases use the
Tracking the SQL Server database server login process, found that the password calculation is very fragile, the SQL Server database Password Vulnerability embodies two aspects:
1. Password encryption algorithm for network landing
2. Password
When I recently made a report using SSRS 2005, when I called a data source with a temporary table, the system would make an error and would not be able to go to the next step of the wizard as follows:
There is a error in the query. Invalid object
This is a recently written paging stored procedure that can be applied to SQL Server 2005:
Copy Code code as follows:
If object_id (' [Proc_selectforpager] ') is not null
Drop Procedure [Proc_selectforpager]
Go
Create Proc
SQLDMO is provided by Microsoft SQL Server's SQLDMO.dll, and since SQLDMO.dll is a COM object, you must add a reference to it in the. NET project before you use it. Note To add a COM reference, locate the Microsoft SQLDMO Object Library in the list (
Clicking "Save text File" will pop up the dialog box that saves the text file.
The contents of the saved text file are as follows:
/*April 5, 2010 0:34:53User:Server: LonggelDatabase: LonggelApplication:*/
Childcaiclass
Saved for me is simply
Expert answers
By querying the three system tables in any database, you can get the default values for each field in each table. Here is the core query. It returns the default value assigned to each user table in the current database. This query is
benefits of Stored procedure functionality
Why use stored procedures? The following are some of the major benefits of stored procedure technology:
Precompile the execution program. SQL Server only needs to compile each stored procedure once,
In general, update a table, using the WHERE statement:
Copy Code code as follows:
UPDATE Ttest SET
Statusind = ' ACTIVE '
WHERE
ID = 123
Attention:
The table name after the UPDATE statement, which is not enabled for
/**
* Authorized
/EXEC sp_configure ' show advanced options ', 1;
Go
reconfigure;
Go
exec sp_configure ' xp_cmdshell ', 1;
Go
reconfigure;
Go
/** Import the text file for the specified table/
EXEC master. xp_cmdshell ' bcp dbname. TableName in
1 determine if the database exists
if exists (SELECT * from sys.databases WHERE name = ' database name ')Drop DB [Database name]
2 Determine if the table exists
if exists (select * from sysobjects where id = object_id (n ' [table name] ') and
ACCESS2000 file
Open with ACCESS2007 and migrate into SQLSERVER2005.
Open the ACCESS2007 database tool
method One : Using ACCESS2007 's own database migration Tool
1, open the ACCESS2007 Database Migration Wizard
2, click the SQL Server
Copy Code code as follows:
Use TestDB
DECLARE @conversation uniqueidentifier
While exists (select 1 from Sys.transmission_queue)
Begin
Set @conversation = (select top 1 conversation_handle from Sys.transmission_queue)
End
Sometimes a full backup, when the restore time said the database file does not allow restore, the solution:
You can copy the database files directly, Xxx.mdf and XXX.LDF (you will need to stop the SQL Server service in the actual copy process)
It
Some cases may use the following table-valued function, the table-valued function is mainly used for data calculation to return the result set, can take parameters (and a large difference of view), if the function does not have too much logic
[Available] If you are installing SQL Server 2000 requirements Cd-key, use Regedt32 to locate the registry, in the following primary key [Hkey_local_machine\system\currentcontrolset\control\ Create a DWORD key in session Manager
SafeDllSearchMode
SQL Server database paging query has been a short board of SQL Server, idle, come up with several methods, assuming that there are table article, Field ID, year ... (other omitted), Data 53,210 (customer real data, quantity is not large), paging
Common logs for diagnosing SQL Server problems
There are two main:
(1) Windows Event Log
(2) SQL Server ErrorLog
1, Windows Event Log event logs
As a windows open and Managed service program, Windows logs information about the startup, normal
The code for the core export job and the job backup are similar
Copy Code code as follows:
Alter PROC Dumpjob (@job VARCHAR (100))
As
DECLARE @retrun NVARCHAR (max)
DECLARE @jobname VARCHAR (m), @category_calss_i INT, @category_calss
This series of articles is I sqlskill.com Paul's blog to see, many misunderstandings are more typical and representative, the original from T-SQL Tuesday #11: Misconceptions about .... EVERYTHING!!, through our team's translation and collation
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.