Archive

Archive for the ‘SQL’ Category

xp_cmdshell disabled

As you are getting up to speed with SQL Server 2005, you might notice that scripts using master.dbo.xp_cmdshell no longer work:

Msg 15501, Level 16, State 1, Procedure xp_cmdshell, Line 1
This module has been marked OFF. Turn on ‘xp_cmdshell’ in order to be able to access the module.

This change is by design and is part of Microsoft’s overall “secure by default” approach. However, the error message is not very helpful in solving the problem, as there is no magic switch in Management Studio to enable this feature. To turn xp_cmdshell functionality back on, use the sa account or another administrator, and issue this code:

Read more…

Categories: SQL

News In SQL 2008

you can run this insert statement :

insert into tablename(col1,col2,col3)

values(1,”Ahmed”,”Bagalaty”),

(2,”SQL”,”2008″),

(3,”Rahma”,”Bagalaty”)

Some SQL Statments (Up-to-date)

1- To Get the Last Record in table name test for Example With columns ( testId,testName )

then write the select statment :

Read more…

Copy Columns Data From Table To Other Table

INSERT INTO Stores( ProductID, ProductName)
SELECT ProductID, ProductName FROM Products

Read more…

Categories: SQL
Follow

Get every new post delivered to your Inbox.