Skip to main content

Posts

Showing posts from August, 2012

Search specific string inside Stored Procedure, View, Function, Trigger, Table Name, Table Field in SQL Server

this query can be used to search specific string inside, no need to right click  - modify - and search manually from Query designer / SSMS DECLARE @NextString NVARCHAR(40) DECLARE @Pos INT DECLARE @NextPos INT DECLARE @String NVARCHAR(40) DECLARE @Delimiter NVARCHAR(40) DECLARE @Query nvarchar(2000) DECLARE @WHERE nvarchar(1000) DECLARE @Query2 nvarchar(2000) DECLARE @Where2 nvarchar(1000) SET @Query =  'SELECT DISTINCT so.name, ' +    'CASE so.xtype ' +     'WHEN ''P'' THEN ''SPROC'' ' +     'WHEN ''IF'' THEN ''FUNCTION'' ' +     'WHEN ''FN'' THEN ''FUNCTION'' ' +     'WHEN ''V'' THEN ''VIEW'' ' +     'WHEN ''U'' THEN ''TABLE'' ' +     'WHEN ''TR'' THEN ''TRIGGER'' ' +    'END AS [TYPE] ' +  'FROM

Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI" for linked server [linked_server_name]

just got this error when try to execute query against LinkServer (SQL 2000) from SQL 2005 eventhough the link can create but i can't do 4 parts query select * from LINKED.DB.DBO.TABLE the problem because SQL 2000 needs to run certain SP that not exists in master so the LINK query can run create   procedure  sp_tables_info_rowset_64       @table_name  sysname ,       @table_schema      sysname   =   null,           @table_type  nvarchar ( 255 )   =   null as declare @Result int set @Result = 0 exec  @Result =  sp_tables_info_rowset  @table_name , @table_schema ,  @table_type this  solution  originally POST  by  Marek Adamczuk until then

Enable Samesite for the .NET Framework 3.5 SP1 bootstrapper package

hi, i recently got an error when trying to publish ClickOnce app that run under 3.5 framework. the error said " The install location for prerequisites has not been set to 'component vendor's web site' and the file 'dotNetFx35setup.exe' in item 'Microsoft.Net.Framework.3.5.SP1' cannot be located on disk." so i found the solution for this one Update the Package Data Open the [Program Files]\Microsoft SDKs\Windows\v6.0A\ Bootstrapper \Packages\DotNetFx35SP1 folder or % ProgramFiles (x86)%\Microsoft SDKs\Windows\v6.0A\ Bootstrapper \Packages\DotNetFx35SP1 on x64 operating systems Edit the Product.xml file in Notepad. Paste the following into the <  PackageFiles  > element:  < PackageFile  Name="TOOLS\clwireg.exe"/> < PackageFile  Name="TOOLS\clwireg_x64.exe"/> < PackageFile  Name="TOOLS\clwireg_ia64.exe"/> Find the element for <  PackageFile  Name="dotNetFX30\XPSEP