Alibabacloud.com offers a wide variety of articles about find all sql server instances on network, easily find your find all sql server instances on network information here online.
Query all indicates that the select name from sysobjects where xtype= ' u ' select * from sys.tables//queries the database for all table names and row counts select A.name, B.rowsfrom syso Bjects as a INNER JOIN sysindexes as B on a.id = b.idwhere (A.type = ' u ') and [B.indid in (0, 1)] ORDER by A.name,b.rows DE sc//query all marked and space consumption \ line
An error occurred while establishing a connection with the server. When you connect to SQL Server 2005, the default setting does not allow remote connection to SQL Server may cause this failure.
(Provider: SQL
Each time you import an Excel table to the database, several more rows are displayed as 'null' rows. The following prompt is displayed when you delete the table.
"The key column information is insufficient or incorrect. Update affects multiple rows! "
Solution: You can see from your description that you have imported data from Excel to SQL Server. The imported table does not have a primary key column, and
DECLARE @name varchar, @newname varchar (@colname varchar)
DECLARE ABC cursor for
Select (a.[name] + '. ' + b.[name]) as TableName, b.[name] colname
From dbo.sysobjects A, dbo.syscolumns b where a.id = b.ID
and a.xtype= ' U '
Open ABC
Fetch next from ABC into @name, @colname
While @ @fetch_status =0 begin
Set @newname =Upper (@colname)
EXEC sp_rename @name, @newname, [COLUMN] Print @colname print @NEWNAME
Fetch next from ABC into @name, @colnam
Label:This article from: http://www.cnblogs.com/yjss/articles/2065664.html 1. Delete a table Use database name
declare mycur cursor local for SELECT [name] from dbo.sysobjects where xtype= ' U '
declare @name varchar (10 0)
OPEN mycur
FETCH NEXT from Mycur to @name while
@ @FETCH_STATUS = 0
BEGIN
exec (' drop table ' + @na Me)
FETCH NEXT from mycur to @name
END
CLOSE mycur
2. Delete a view Use database name
declare mycur cursor local for SELECT [name] from dbo.sysobjects where xtype=
indicate the sort order with a column name, order by also supports sorting by relative column position.SELECT prod_id, Prod_price, Prod_name from Products ORDER by 2 3 ; -- The output here is the same as the above query. 2 finger prod_price,3 finger prod_name3.4 Specifying the sort directionData sorting is sorted by default in ascending order, and you can specify the DESC keyword to sort it in descending order.SELECT prod_id, Prod_price, Prod_name from Products ORDER by DESC -- The DE
Label:Original: Chapter 1 securing Your Server and Network (6): Configuring Firewalls for SQL Server accessSource: http://blog.csdn.net/dba_huangzj/article/details/38082123, Special catalogue:http://blog.csdn.net/dba_huangzj/ article/details/37906349No person shall, without the consent of the author, be published in th
Label:The first approach: querying using system tables--replace text with the one you want to find. Select name from sysobjects o, syscomments s where o.id = S.id and the text like '%text% ' and O.xtype= ' P ' xtype: Object type. Can be one of the following types of objects: C = CHECK Constraint D = default value or defaults constraint F = FOREIGN key constraint L = log FN = scalar function IF = inline table function P = stored procedure PK = PRIMARY
Original source: http://blog.csdn.net/dba_huangzj/article/details/38082123, featured folder:http://blog.csdn.net/dba_huangzj/article/details/37906349 I am not responsible for any legal liability whatsoever, without the consent of the author, whether or not it is published in the form of "original" or used for commercial purposes. Previous article: http://blog.csdn.net/dba_huangzj/article/details/38063823 Objective: SQL
optimizeCan try to read and write separation, write two libraries, one is a real-time library, one is read-only library. One hours of data query real-time library, one hours before the data query read-only library, read-only library timed storage, and then set up an index; more than one weeks of data, analysis processing and storage. In this way, no matter what time period of query data, can be handled correctly-one hours of query real-time library, one hours to one weeks of query read-only lib
I suddenly couldn't open my SQL Server 2008 database yesterday. And the day before yesterday also used it to write T-SQL statements. So I am very depressed. After I go to the Internet for a query, I can't solve the problem, so I simply re-installed one side. So the content I sorted out yesterday cannot be updated to my blog in time. I can only continue to sort it
Http://www.jb51.net/article/59352.htm1. Open SQL Server Management Configuratoror enter at the command line: sqlservermanager10.msc2. Click on the MSSQLSERVER protocol and select the TCP/IP protocol on the right page.3, right click on the TCP/IP protocol, select "Properties", you need to modify the port address of the connection database4, jump out of the dialog box, there are many TCP/IP ports,
Before the client computer connects to the database engine, the server must listen on the enabled network library and require the server network protocol to be enabled. The following settings can be made using SQL Server Configura
Original source: http://blog.csdn.net/dba_huangzj/article/details/38082123, featured catalogue:http://blog.csdn.net/dba_huangzj/article/details/37906349 No person shall, without the consent of the author, be published in the form of "original" or used for commercial purposes, and I am not responsible for any legal liability. Previous article: http://blog.csdn.net/dba_huangzj/article/details/38063823 Objective: SQL
To other people do the site is not connected to the database. Baidu has a lot of, finally know their fault in where.Reported"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or is not accessible.Verify The instance name is correct and that
To find these stored procedures, you can spend time searching the internet, looking at some stored procedures that you have not yet known, and perhaps in one or two hours you may find that you want to ... Maybe you're lucky to find that other people in their article lists all the stored procedures, functions, and views
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.