When I saw the code Getting All the Information of the Server in SQL Server – MSSQL Query, I thought to share mine.This more or less sums the general MS SQL instance information Good Luck
When I saw the code Getting All the Information of the Server in SQL Server – MSSQL Query, I thought to share mine.This more or less sums the general MS SQL instance information Good Luck
I needed to get the list of my reports and what data source and dataset they use. use ReportServer; WITH XMLNAMESPACES ( DEFAULT ‘http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition’, ‘http://schemas.microsoft.com/SQLServer/reporting/reportdesigner’ AS rd ) SELECT distinct ReportName = name ,DataSetName = x.value(‘(@Name)[1]’, ‘VARCHAR(250)’) ,DataSourceName = x.value(‘(Query/DataSourceName)[1]’,’VARCHAR(250)’) ,CommandText = x.value(‘(Query/CommandText)[1]’,’VARCHAR(250)’) FROM ( SELECT C.Name,CONVERT(XML,CONVERT(VARBINARY(MAX),C.Content)) AS reportXML FROM ReportServer.dbo.Catalog C WHERE C.Content is …
When you create a Linked Server on SQL Server, some users may get this error: EXECUTE denied on object ‘xp_prop_oledb_provider’, database ‘mssqlsystemresource’, schema ‘sys’. So, the only thing you need (if you have set up your permissions correctly on Linked Server) is to run the following code: GRANT EXECUTE ON SYS.XP_PROP_OLEDB_PROVIDER TO LOGIN; …
I had my SSRS running smoothly, but there was one thing bothering me. That was email sender friendly name. In RS Configuration Manager you can setup e-mail settings, and enter senders e-mail address. But every time I got an email with report, the sent from stated sql@sqlreports.com. But I need an friendly name. So, I …
Have you ever tried to connect to AS400. It’s been a hassle for me. But finally I got it to work, so let me share little of my wisdom with you. First create linked server, then change options to it. EXEC master.dbo.sp_addlinkedserver @server = N’AS400′, @srvproduct=N’i520′, @provider=N’IBMDA400′, @datasrc=N’AS400′, @provstr=N’User Id=USER;Password=PWD;Default Collection=DAT;’ Change option: USE [master] …
For table comparison, i like to use Red Gate SQL compare. Great tool, but if you don’t have money for it, you can always try to write your own comparation script. You can then script it as function, and use it. It does not have, options like SQL Compare, but for now it will do …
Recently, I was asked a question, how to send notification to multiple users. First you must create operator in SQL Agent. In field “E-mail name:” you enter multiple e-mails, divided by semicolon (;). And then you just have to set notifications in Agent Job Good Luck
I tried to find out how to connect through SMSS to SQL server as another domain user. You must run SMSS as “RUN AS..” so the code is as follows: runas /netonly /user:domain\user “C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe” EDIT:!! Due to version changes: %windir%\System32\runas.exe /netonly /user:domain\user “C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe -S SERVER” EDIT!! When …
When you are working with custom software over your database, you can easily find some data you need to clean up. It can be trash from poorly written code, or users can write rubbish if no controls are established. So next couple of posts will be about searching and updating this kind of trash values. …
Few months ago, I was given a task to send some notifications via circular letter. The best thing is to send it by MS WORD. Unfortunately, after sending this, the attachment could not be read on the recipients side. Me and my colleague could not understand, is it because WORD or attachment or in the …