When connecting to a Windows 2008 Server using remote desktop from a Windows XP client running service pack 2 or earlier, you get the following error message:
The remote computer requires Network Level Authentication, which your computer does not support.
To enable NLA in XP machines; first install XP SP3, then edit the registry settings on the XP client machine to allow NLA
• Configure Network Level Authentication
1. Click Start, click Run, type regedit, and then press ENTER.
2. In the navigation pane, locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
3. In the details pane, right-click Security Packages, and then click Modify.
4. In the Value data box, type tspkg. Leave any data that is specific to other SSPs, and then click OK.
5. In the navigation pane, locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders
6. In the details pane, right-click SecurityProviders, and then click Modify.
7. In the Value data box, type credssp.dll. Leave any data that is specific to other SSPs, and then click OK.
8. Exit Registry Editor.
9. Restart the computer.
Sunday, May 29, 2011
Wednesday, May 25, 2011
Subversion Setup on Windows
For visual studio plug in http://ankhsvn.open.collab.net/
a) Install and Select ANKHSVN from Visual Studio tools->option->source safe
1. Download & Setup SVN (Latest Version http://subversion.tigris.org/servlets/ProjectDocumentList?folderid=91)
a) Setup SVN as Service Service (cmd.exe)
-> sc create svn binpath= "\"C:\program files\Subversion\bin\svnserve.exe\" --service -r C:\svn" displayname= "Subversion Server" depend= Tcpip start= auto
N/B: Be carefull about path.
b) Start this service manually from control panel administrative service.
*** Changes start-up type manually to automatic
c) Create Repository using cmd
->svnadmin create c:\svn\lcmanagement
d) Change in config\svnserve.conf file
i) Uncomment and delete extrat trailing space
anon-access = read
auth-access = write
password-db =passwd
e) Open config\password
i) add user crediential as format username = password
2. Download & Install TortoisSVN (Latest Version http://tortoisesvn.net/downloads)
a) Import project into svn repository
i) Right click project folder
->TortoiseSVN->Import->svn://(servername)/(NameOfRepository)/ProjectSource/trunk
b) SVN Checkout Project
-Right click where you want to check out
- URL Repository
-> svn://(servername)/(NameOfRepository)/ProjectSource/trunk
Have Fun Guys!!!.
Error and Exception:
1) Problem: svnserve.conf:12: Option expected; will through if 1.d) not done carefully.
Cause : Any Extra Trailing space in config\svnserve.conf file
Solution: Follow section 1.d) carefully.
2) Problem: Expected FS format between '1' and '3'; found format '4'
Cause: Which Subverson tool did you use to create the repository? TortoiseSVN? Your TortoiseSVN may be newer, a 1.6.x release, then your 1.5 command line client
and svnserve, so svnserve 1.5.x cannot serve a 1.6.x repository.
Solution: Create Repository with svn as section 1. c)
a) Install and Select ANKHSVN from Visual Studio tools->option->source safe
1. Download & Setup SVN (Latest Version http://subversion.tigris.org/servlets/ProjectDocumentList?folderid=91)
a) Setup SVN as Service Service (cmd.exe)
-> sc create svn binpath= "\"C:\program files\Subversion\bin\svnserve.exe\" --service -r C:\svn" displayname= "Subversion Server" depend= Tcpip start= auto
N/B: Be carefull about path.
b) Start this service manually from control panel administrative service.
*** Changes start-up type manually to automatic
c) Create Repository using cmd
->svnadmin create c:\svn\lcmanagement
d) Change in config\svnserve.conf file
i) Uncomment and delete extrat trailing space
anon-access = read
auth-access = write
password-db =passwd
e) Open config\password
i) add user crediential as format username = password
2. Download & Install TortoisSVN (Latest Version http://tortoisesvn.net/downloads)
a) Import project into svn repository
i) Right click project folder
->TortoiseSVN->Import->svn://(servername)/(NameOfRepository)/ProjectSource/trunk
b) SVN Checkout Project
-Right click where you want to check out
- URL Repository
-> svn://(servername)/(NameOfRepository)/ProjectSource/trunk
Have Fun Guys!!!.
Error and Exception:
1) Problem: svnserve.conf:12: Option expected; will through if 1.d) not done carefully.
Cause : Any Extra Trailing space in config\svnserve.conf file
Solution: Follow section 1.d) carefully.
2) Problem: Expected FS format between '1' and '3'; found format '4'
Cause: Which Subverson tool did you use to create the repository? TortoiseSVN? Your TortoiseSVN may be newer, a 1.6.x release, then your 1.5 command line client
and svnserve, so svnserve 1.5.x cannot serve a 1.6.x repository.
Solution: Create Repository with svn as section 1. c)
Thursday, May 19, 2011
Sunday, May 15, 2011
Finding duplicates rows from a table in SQL Server.
Select Duplicate Rows:
SELECT col1, col2, count(*)
FROM t1
GROUP BY col1, col2
HAVING count(*) > 1
SELECT col1, col2, count(*)
FROM t1
GROUP BY col1, col2
HAVING count(*) > 1
Saturday, May 14, 2011
How to drop all tables, all views, and all stored procedures from a SQL 2008 DB
This is a follow-up to the blog entry from http://blogs.msdn.com/b/patrickgallucci/archive/2008/04/29/how-to-drop-all-tables-all-views-and-all-stored-procedures-from-a-sql-2005-db.aspx. This is a modification to the script to allow for schema specific deletes of the SP's, Views and Functions.
create procedure usp_DropSPFunctionsViews
as
-- variable to object name
declare @name varchar(1000)
-- variable to hold object type
declare @xtype varchar(20)
-- variable to hold sql string
declare @sqlstring nvarchar(4000)
declare SPViews_cursor cursor for
SELECT QUOTENAME(ROUTINE_SCHEMA) + '.' + QUOTENAME(ROUTINE_NAME) AS name,
ROUTINE_TYPE AS xtype
FROM
INFORMATION_SCHEMA.ROUTINES
UNION
SELECT QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) AS name, 'VIEW' AS xtype
FROM
INFORMATION_SCHEMA.VIEWS
open SPViews_cursor
fetch next from SPViews_cursor into @name, @xtype
while @@fetch_status = 0
begin
-- test object type if it is a stored procedure
if @xtype = 'PROCEDURE'
begin
set @sqlstring = 'drop procedure ' + @name
exec sp_executesql @sqlstring
set @sqlstring = ' '
end
-- test object type if it is a function
if @xtype = 'FUNCTION'
begin
set @sqlstring = 'drop FUNCTION ' + @name
exec sp_executesql @sqlstring
set @sqlstring = ' '
end
-- test object type if it is a view
if @xtype = 'VIEW'
begin
set @sqlstring = 'drop view ' + @name
exec sp_executesql @sqlstring
set @sqlstring = ' '
end
-- get next record
fetch next from SPViews_cursor into @name, @xtype
end
close SPViews_cursor
deallocate SPViews_cursor
GO
create procedure usp_DropSPFunctionsViews
as
-- variable to object name
declare @name varchar(1000)
-- variable to hold object type
declare @xtype varchar(20)
-- variable to hold sql string
declare @sqlstring nvarchar(4000)
declare SPViews_cursor cursor for
SELECT QUOTENAME(ROUTINE_SCHEMA) + '.' + QUOTENAME(ROUTINE_NAME) AS name,
ROUTINE_TYPE AS xtype
FROM
INFORMATION_SCHEMA.ROUTINES
UNION
SELECT QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) AS name, 'VIEW' AS xtype
FROM
INFORMATION_SCHEMA.VIEWS
open SPViews_cursor
fetch next from SPViews_cursor into @name, @xtype
while @@fetch_status = 0
begin
-- test object type if it is a stored procedure
if @xtype = 'PROCEDURE'
begin
set @sqlstring = 'drop procedure ' + @name
exec sp_executesql @sqlstring
set @sqlstring = ' '
end
-- test object type if it is a function
if @xtype = 'FUNCTION'
begin
set @sqlstring = 'drop FUNCTION ' + @name
exec sp_executesql @sqlstring
set @sqlstring = ' '
end
-- test object type if it is a view
if @xtype = 'VIEW'
begin
set @sqlstring = 'drop view ' + @name
exec sp_executesql @sqlstring
set @sqlstring = ' '
end
-- get next record
fetch next from SPViews_cursor into @name, @xtype
end
close SPViews_cursor
deallocate SPViews_cursor
GO
Subscribe to:
Posts (Atom)