Wednesday, August 21, 2013

[MS SQL Server] SSRS Dataset Credentials

[MS SQL Server] SSRS Dataset Credentials


SSRS Dataset Credentials

Posted: 20 Aug 2013 06:06 AM PDT

We want to use Report Builder to allow people to create ad-hoc reports from a database. I created an account in SSMS and gave it datareader role to a particular database. I then created a data source in Reporting Services and chose 'credentials stored securely in the report server'. Within Report Builder that data source is now available. Here is the issue – we never, ever want the end user to know what the username/password is/are. However, in order to create a dataset using the shared data source, you have to input the username/password. I am fairly new to using SSRS so I am really hoping that there is a way to embed the login credentials somehow so the end-user will never see them and will never be asked to supply them.

SQL database graceful shutdown that is not seen as unexpected

Posted: 21 Aug 2013 12:48 AM PDT

We have SQL server 2008 R2 on a Windows Server 2008 R2 Standard machine. We shut the database down every night to get a cold backup - the service is set to restart after an Unexpected shutdown. Our problem is the database is restarting before we can get a cold copy of the files (about 15 minutes) & whatever database is copying when SQL restarts fails to start up because the file is locked. My question is there a way to do a graceful shutdown so the operating system can tell the difference that this is NOT unexpected? We are using a .bat with Net STOP agent & net stop SQL SERVER.The obvious answer would be to take the restart off the service - but we do like that option in case of a shutdown of the database other than for the backup. Thank you for any help.

Merge replication between two different databases?

Posted: 20 Aug 2013 11:39 PM PDT

It's possible I may need to implement merge replication of one table sometime in the near future. My question is, can you merge replicate between two different databases?Say on server1, we have a database called database01, with a table 'users01', and on server02 the database is database666 and table 666users01.Could we replicate between them?Jason

Datatype conversion

Posted: 20 Aug 2013 09:58 AM PDT

How do i convert nvarchar datatype column to float? The only problem is nvarchar column has non-numeric values like names.

SQL Server log backup fails sometimes

Posted: 20 Aug 2013 12:21 PM PDT

We are running SQL Server 2008 R2 SP1. There is a scheduled transaction log backup using SQL Server maintenance job that runs at a certain time of the day. The job runs fine on few days and fails few days and there is no specific pattern. I changed the schedule to run every 5 minutes and the log backups were fine for the first 3 attempts and started failing randomly.-- operating system error 53(the network path was not found.) --I am not sure why it fails few times and runs fine the rest of the times. The backups are going directly to SAN storage and use UNC path - e.g. \\vnvx\SQL_backups\SQL Server errorlog has the following messages:Backup Error: 3041, Severity: 16, State: 1.Error: 18204, Severity: 16, State: 1. BackupDiskFile::CreateMedia: Backup device 'N:\Backups\Userdatabases\Database\db _backup_200911111511.bak' failed to create. Operating system error 53(the network path was not found.) If it fails on a regular basis I could have checked permissions, SQL Server agent start up ID etc. However it fails few times and runs successfully few times. The job is set to run with 1 retry after 2 minutes and sometimes the 2nd attempt goes through.Please help. Thanks in advance.

client was unable to reuse a session?

Posted: 20 Aug 2013 04:33 PM PDT

HiI am received email alert frequently as below error messages.[code="sql"]DESCRIPTION: The client was unable to reuse a session with SPID 119, which had been reset for connection pooling. The failure ID is 29. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.[/code]Microsoft Fix that issues http://support.microsoft.com/kb/2543687 by updating latest service pack3 & CU1 of SP3.Currently - SQL Server 2008 standard edition with SP1Can we update SP3 and CU1 for resolve that issues? please suggesion me..Thanksananda

[SQL 2012] SQL server cluster Failover installation

[SQL 2012] SQL server cluster Failover installation


SQL server cluster Failover installation

Posted: 30 Jul 2013 01:16 AM PDT

Hi guys i am supposed to do a failover installation on Windows server.I have to create a cluster group, Do any one know any site or video or notes which guides me to get prepared.Rookie here :hehe:

Format varchar to currency.

Posted: 21 Aug 2013 02:24 AM PDT

How to format varchar to currency. Negative amounts to ($100.50) with parentheses?

Database refresh security sync

Posted: 21 Aug 2013 03:04 AM PDT

To return role permissionSELECT 'EXECUTE sp_AddRoleMember ''' + roles.name + ''', ''' + users.name + '''' from sys.database_principals users inner join sys.database_role_members link on link.member_principal_id = users.principal_id inner join sys.database_principals roles on roles.principal_id = link.role_principal_idTo return the explicit permissions granted or denied objects in a database, execute the following statement in the database. Then execute the result.SELECTperms.state_desc AS State,permission_name AS [Permission],'ON',obj.name AS [on Object],'to',dPrinc.name AS [to User Name]FROM sys.database_permissions AS permsJOIN sys.database_principals AS dPrincON perms.grantee_principal_id = dPrinc.principal_idJOIN sys.objects AS objON perms.major_id = obj.object_idLEFT OUTER JOIN sys.server_principals AS sPrincON dPrinc.sid = sPrinc.sidFixing the OrphansUse database nameEXEC sp_change_users_login 'Report'If you already have a login id and password for this user, fix it by doing:EXEC sp_change_users_login 'Auto_Fix', 'user'

does it make difference nvarchar(50) or nvarchar(500)

Posted: 20 Aug 2013 07:49 PM PDT

dear friends,I have a large table with more than 10 million records and all fields are "string". I import data from csv file once in a month and this table will only be read by clients (web application)I used nvarchar(500) to be sure that field length will be enough in future. then I tried to experiment "what happens if I reduce the filed size to nvarchar(50)" ?I shrink database & files, changed 5 column types (among 50 columns) to nvarchar(50), shring again and mdf file size didn't changed. its meaningful because nvachar is not fixed length.my question is should I decrease the field sizes ? does it make any sense ? does it harm if I used "more than necessary" nvarchar lengths ?any suggestions ?thanks...

Run at Certain Time of Morning

Posted: 05 Aug 2013 03:11 AM PDT

Hi All,Im trying to add a check to see what time it is in the morning before my stored procedure runs, I tried looking around for some examples but Im sure the simple solution is right before my eyes. [code="sql"]ASdeclare @today as date = cast(getdate()-1 as date)declare @HTML as varchar(max)declare @TitleHTML as varchar(max)declare @CDCIIHTML as varchar (max)declare @CDCsubj as varchar(20) = 'CDC Report'set @TitleHTML = N'<h1 align="Left">CDC Report</h1>'+ N'<h2 align="Left"> ' + CAST(GetDate()as varchar) + '</h2>'set @CDCIIHTML = N'<h2 align="Left"> CDC CII </h2>'+ N'<style> td {border: solid black 1px; text align: center; padding-left:5px;padding-right:6px;padding-top:1px;padding-bottom:1px;font-size:10pt;}</style>'+ N'<table> <width="100%" cellpadding="5"> <table style="font-family: Calibri">'+ N'<tr bgcolor="gray"> <td width ="150" ><b>SCHEDULE</b></td> <td width ="100"><b>NC</b></td>'+ N'<td width ="100"><b>DESCRIPTION</b></td>'+ N'<td width ="175"><b>UNIT</b></td>'+ N'<td width ="125"><b>VAR PCT</b></td>'+ N'<td width ="100"><b>QTY</b></td> <td width ="125"><b>USER ID</b></td>'+ N'<td width ="200"><b>DATE</b></td>'+ N'<td width ="250"><b>REASON</b></td>'+ CAST((SELECT td = [SCHEDULE],'', td = [NDC],'', td = [DESCRIPTION],'', td = [TOUNIT],'', td = [CYCLEVARPCT],'', td = [CYCLE QTY],'', td = isnull([USERID],''),'', td = [TO_CHAR(A.TIMEDATE,'MM/DD/YYYY')],'', td = isnull([REASON],''),'' FROM [CF].[dbo].[CDC Report] WHERE SCHEDULE = 'CII'FOR XML PATH('tr'), TYPE )AS NVARCHAR(MAX)) + N'</table>'SET @HTML = @TitleHtml + isnull(@CDCIIHTML,'')if (@HTML IS not null) AND (SELECT GETDATE() >= '09:00:00') --telling me here I have incorrect --syntax, and I cant figure out why? At the greater than and closing parenthesis after 9am.begin EXEC msdb.dbo.sp_Send_dbmail @profile_name = 'SQL_Server', @recipients = '' @subject = @CDCsubj, @body_format='HTML', @body = @HTMLEND[/code]Thanks

Biztalk Adapter Pack Data Provider for SAP

Posted: 20 Aug 2013 11:23 PM PDT

We are migrating from AS400 to SAP and need to include some of the SAP Master and Transactional data in our SQL Server 2012 data warehouse. We started down the path of using SAP standard and custom extractors to pull data from SAP into BW, then use SSIS packages to pull the data from BW to the data warehouse. This works but is slow to build and execute and there are some space concerns using this method. So we started researching other methods to pull data directly from SAP into the data warehouse. We found the BizTalk Adapter pack with the Data Provider for SAP and have installed it. It seems to work very well and performs much faster than the BW method. Have any of you used the BizTalk Adapter Pack Data Provider for SAP in SSIS packages to pull data from SAP? Can you share your thoughts on how well it worked, any problems you had, pros and cons of using this Data Provider vs. BW, etc.? We want to be sure we do our due diligence before we commit to this product.Thanks,Nancy

about exam 70-457 books

Posted: 07 Aug 2013 10:59 AM PDT

I plan to take 70-457 soon and search books about it.I download "Microsoft_Press_eBook_Introducing_Microsoft_SQL_Server_2012_PDF.pdf" from microsoft website. There are 2 parts in this book.Are these part1 for exam 70-457 and part2 for 70-458?I just read part1, but I saw somebody said there is no reference book for these exams, so I want to make sure.Thanks a lot.

ALTER PARTITION MERGE .... works in SSMS but not SQLAgent Batch

Posted: 20 Aug 2013 10:52 PM PDT

The following is performed on a SQL Server 2012 SP1 installation.I have been having an issue with stored procedure that performs a 'sliding window' solution on a partitioned table that is partitioned by date. The procedure will successfully execute in SSMS but identical TSQL executed in a SQL Agent job will fail with the following error:Executed as user: NT SERVICE\SQLAgent$SQL2012. The specified partition range value could not be found. [SQLSTATE 42000] (Error 7715). The step failedThe dynamic SQL statement it fails on is: [ALTER PARTITION FUNCTION SharepointStatsPF() MERGE RANGE ('01/09/2010');I have identified the cause of my problem; all logins explicitly created have the default language set to 'British English' whereas the 'NT SERVICE\SQLAgent$SQL2012' login, created by the installation process has the default language set to 'English'. Changing this to 'British English' resolves the problem.My question is, if the default language of the 'NT SERVICE\SQLAgent$SQL2012' login be permanently left as British English, would this cause problems elsewhere?

[T-SQL] Space taken by Null !

[T-SQL] Space taken by Null !


Space taken by Null !

Posted: 20 Aug 2013 11:46 PM PDT

Over internet there are a lot of topics regarding the size taken by NULL values. There is some mismatch in every 2 topics so i though of doing some POC myself. I observed something which was strange. Following is the list of queries i executed.[code="sql"]create table tbltemp1(i int,a nvarchar(50),b varchar(50))sp_spaceused 'tbltemp1' --Over here it showed as zeroinsert into tbltemp1 values(null,null,null)select * from tbltemp1sp_spaceused 'tbltemp1' -- over it shows the sizedelete from tbltemp1sp_spaceused 'tbltemp1' --over here it should actually show zero but it is showing some values.[/code] In the last Sp_spaceused, my question is why is it showing the values for the size of DATA.

Eliminate Cursor

Posted: 20 Aug 2013 05:59 PM PDT

Hi all,I have given a scenario in which I have to eliminate cursors from all the objects of database.In my database I have around 300 stored procedure in which CURSORS are used.So, can you guys please tell me what approach should I use to remove those cursor?Also, can I remove the cursors using Tally table concept?

Avoid LEFT join

Posted: 20 Aug 2013 04:25 PM PDT

I am facing issues with a LEFT JOIN in my query. It takes 45 secs to process on the production server due to huge number of records. Need help in building a query to avoid the LEFT JOIN. I am Trying to use UNION ALL and it works much faster except that I am stuck in the last bit.scripts (sample):CREATE TABLE [dbo].[tbl_PersonDetails]( [PersonID] [int] NOT NULL, [LeaveTimeId] [int] NOT NULL) ON [PRIMARY]GOCREATE TABLE [dbo].[tbl_PersonLeaveDetails]( [PersonId] [int] NOT NULL, [LeaveFromTimeID] [int] NULL, [LeaveToTimeID] [int] NULL) ON [PRIMARY]GOINSERT [dbo].[tbl_PersonLeaveDetails] ([PersonId], [LeaveFromTimeID], [LeaveToTimeID]) VALUES (1, 5, 11)INSERT [dbo].[tbl_PersonLeaveDetails] ([PersonId], [LeaveFromTimeID], [LeaveToTimeID]) VALUES (2, 12, 15)INSERT [dbo].[tbl_PersonDetails] ([PersonID], [LeaveTimeId]) VALUES (1, 10)INSERT [dbo].[tbl_PersonDetails] ([PersonID], [LeaveTimeId]) VALUES (2, 8)INSERT [dbo].[tbl_PersonDetails] ([PersonID], [LeaveTimeId]) VALUES (3, 9)INSERT [dbo].[tbl_PersonDetails] ([PersonID], [LeaveTimeId]) VALUES (1, 4)Requirement:--------------------Need Rows from tbl_PersonDetails macthing (all 3 below) following criteria :1. tbl_PersonDetails.PersonID is present in tbl_PersonLeaveDetails2.tbl_PersonDetails.TimeID does not fall between any of the aligned (matching personid) FromTimeID and ToTimeID in tbl_PersonLeaveDetails.3. not using LEFT joinso in this case for example.. need - tbl_PersonDetails table .... record, 1,4

Differences between all columns of two rows based on date

Posted: 20 Aug 2013 07:28 PM PDT

Hey guys,I've got a table of stats which gets updated on a daily basis with an additional row for that day, at the moment, including the date field this table has 55 fields. What I'm trying to do is ascertain if any of the values have changed by X%, so like a quality control threashold, set it to say 1%, any changes over that would require a quick look.I've established how to do for one column, which I could repeat for multiple columns, however, I'm wondering if there's anything fancy to do the whole lot in one go and allow for future columns too?This is the logic I've been following thus far: http://blog.namwarrizvi.com/?p=29I can blindly copy/paste using dispstru I guess, however, I sense there's a more compact and elegant solution I'm not spotting! - Any help much appreciated.

How To Load Multiple files Using Bulk Insert & Check What Filename StartsWith

Posted: 20 Aug 2013 07:12 PM PDT

Hi Guys, I'm required to load multiple XML Files from one folder into a database table, I also need to check that the file starts with "Filename"e.g Departments_1 I need to make sure the the file starts with "department" as there'll be other files in the folder e.g Departments_2at the moment I am able to load one file at a time using the script below that checks if a file exists before loading, is it possible to achieve this using T-Sql in Management Studio, any help woul be appreciated?Here's part of the script that I'm using to load the data into a temp table below:--Load all XML data firstDECLARE @isExists INT--Cost Centresexec master.dbo.xp_fileexist 'C:\inetpub\wwwroot\Prof1t\FTP\<CLIENT_FOLDER>\Departments_1.xml', @isExists OUTPUTIF @isExists = 1BEGIN print 'Departments.xml exists' INSERT INTO tmpCostCentreXML (CostCentreCode, CostCentreName) SELECT Y.CostCentres.query('CostCentreCode').value('.', 'VARCHAR(30)'), Y.CostCentres.query('DepartmentName').value('.', 'VARCHAR(60)') FROM ( SELECT CAST(x AS XML) FROM OPENROWSET( BULK 'C:\inetpub\wwwroot\Prof1t\FTP\<CLIENT_FOLDER>\Departments_1.xml', SINGLE_BLOB) AS T(x)) AS T(x) CROSS APPLY x.nodes('Departments/Department') as Y(CostCentres); print 'Loaded Cost Centre XML'ENDELSEBEGIN print 'Departments_1.XML doesn''t exist'ENDThanks Teee

Stored Procedure Having More than 1000 Lines

Posted: 20 Aug 2013 03:01 PM PDT

Hi All, I have One stored Procedure having 1000 lines.In That Stored Procedure I have more than 500 queries.Now i want to find out which query is taking more time with out using Sql Profiler?Is it Possible?please folks share your comments

Help with calculation and query

Posted: 20 Aug 2013 06:03 AM PDT

How to calculate the update amount for the example below? Table A has the following rows. I want to get the output only for Main_dir and Main_rei which are reduced by Withhold_dir and Withhold_rei respectively which has sub_code = 50. The common connection between the rows is the Code.Table A---------Code Sub_code Name AmountsDir 20 Main_dir 100Rei 20 Main_Rei 50Dir 50 Withhold_dir 10Rei 50 Withhold_Rei 10 Output Code Sub_code Name AmountsDir 20 Main_dir 90Rei 20 Main_Rei 40

Returning stored procedure results into a CTE or temp table?

Posted: 20 Aug 2013 01:50 AM PDT

Hi all . . .Is it possible to return the results of a stored procedure into either a CTE or temp table?In other words, is it possible to do this:[code="sql"]with someCTE as ( exec someStoredProc)[/code]or this:[code="sql"]exec someStoredProc into #tempTable[/code]???Thanks in advance!

[SQL server issues] Commented Issue: AdventureWorksDW2008R2 DimDate table has missing dates [13383]

  1. AdventureWorksDW2008R2 DimDate table has missing dates

    sqlserversamples.codeplex.com/workitem/13383 - Cached - Similar
    28 May 2010 ... There is an unsaved comment in progress. You will lose your changes if you ...
    AdventureWorksDW2008R2 DimDate table has missing dates ...

  2. Issues - Microsoft SQL Server Community & Samples - CodePlex

    sqlserversamples.codeplex.com/workitem/list/basic - Cached
    22 Feb 2013 ... There seams to be an issue with the AdventureWorksDW2012 Data file ...
    AdventureWorksDW2008R2 DimDate table has missing dates.

  3. Updating... - Microsoft SQL Server Community & Samples - CodePlex

    sqlserversamples.codeplex.com/workitem/list/basic?size... - Cached
    There seams to be an issue with the AdventureWorksDW2012 Data file
    download. When I try to ... AdventureWorksDW2008R2 DimDate table has
    missing dates.

  4. AdventureWorksDW2008R2 DimDate table has missing dates [13383]

    sqlsample.blogspot.com/.../ Commented%20Issue%3A%20AdventureWorksDW2008R2%20Di... - Cached
    12 Aug 2013 ... Showing posts with label Commented Issue: AdventureWorksDW2008R2
    DimDate table has missing dates [13383]. Show all posts ...

  5. SqlServerSamples Work Item Rss Feed - Kekunda.com

    reputationless7.kekunda.com/chan-5121419/latest.php - Cached
    24 Jul 2013 ... 08/27/09--10:26: Commented Issue: Installer: The zipped DB package doesn't
    contain the DB Data (chan 5121419). Environment ========== ...

[SQL server issues] Created Issue: SQL Server 2008 Developer edition sample database install error [18174]

  1. SQL Server 2008 Developer edition sample database install error

    sqlserversamples.codeplex.com/workitem/18174 - Cached
    2 Jun 2012 ... SQL Server 2008 Developer edition sample database install error. description. I'
    m trying to install Adventureworks sample dB and i get an error.

  2. Issues - Microsoft SQL Server Community & Samples - CodePlex

    sqlserversamples.codeplex.com/workitem/list/basic - Cached
    22 Feb 2013 ... When I try to run this SQL statement: CREATE DATABASE ... SQL Server 2008
    Developer edition sample database install error. I'm trying to ...

  3. Updating... - Microsoft SQL Server Community & Samples - CodePlex

    sqlserversamples.codeplex.com/workitem/list/basic?size... - Cached
    SQL Server 2008 Developer edition sample database install error ... Id #18174 |
    Release: None | Updated: Feb 22 at 1:37 AM by pleasehelpme99 | Created: Jun
     ...

  4. Release notes 2.2 - dCache

    www.dcache.org/downloads/1.9/release-notes-2.2.shtml - Cached
    If you are installing over a pre-existent billing database, you may, after upgrading
    and starting dCache, see some messages in the log for the domain where ...

  5. Can i migrate my siebel repository and data from MS SQL SERVER ...

    siebel.ittoolbox.com/.../can-i-migrate-my-siebel-repository-and-data-from-ms -sql-server2000-to-oracle-9i-2282090 - Cached
    5 Aug 2008 ... Basically i want to change my databse server platform from MS SQL ... that you
    should backup the odbc DSN for your old DB and create new

  6. Rational Quality Manager and Rational Test Lab Manager 2.0 - Jazz ...

    jazz.net/downloads/rational-quality-manager/releases/2.0?p... - Cached
    29 Jul 2009 ... This document contains information about system requirements, installation, and
    known issues for Rational Quality Manager version 2.0.

  7. Multiple BSODs, help please? - Windows 7 - Bleeping Computer

    www.bleepingcomputer.com/forums/t/.../multiple-bsods-help-please/ - Cached
    I uninstalled Avast and installed Microsoft Security instead as I've seen ... that - I
    will certainly look harder if that appears to be the issue though.

  8. SilverStream Application Server 3.5.4 Release Notes - Novell

    www.novell.com/documentation/extendas35/docs/relnotes.html - Cached
    Welcome to SilverStream Application Server Version 3.5.4. ... For example, to
    verify the latest install level for package bos.rte.libc you would use the following ...

  9. Postfix problem(loops back to myself) - HowtoForge Forums ...

    www.howtoforge.com/forums/showthread.php?t=15868 - Cached - Similar
    Microsoft Uses DMCA To Block Many Links To Competing Open Office ·
    Download the Pirate Bay's free Pirate Browser to circumvent ...

  10. SQL Server >> Archive Page 84

    www.help-sql.info/archive/27/84.html - Cached
    45868: data processing extensions on sql server express edition ... 29423: setup
    issue: unable to install sql server 2005 express on windows 2003 server sp2

  11. Sql samples, sql tips: [SQL server issues] Created Issue: SQL Server ...

    sqlsample.blogspot.com/2013/04/sql-server-issues-created-issue-sql.html
    8 Apr 2013 ... [SQL server issues] Created Issue: SQL Server 2008 Developer edition sample
    database install error [18174]. An unexpected error has ...

  12. SqlServerSamples Work Item Rss Feed - Kekunda.com

    reputationless7.kekunda.com/chan-5121419/all_p1.html - Cached
    06/01/12--17:07: Created Issue: SQL Server 2008 Developer edition sample
    database install error [18174] (chan 5121419). I'm trying to install
    Adventureworks ...

  13. opatch failed on linux 32 bit while installing ... | Oracle Forums

    https://forums.oracle.com/thread/2258839 - Cached
    22 Jul 2011 ... Trying to install latest JulY PSU patch 12419378 on oracle 11g r2 11.2 but get ...
    the database, but stay in SQL Plus you will get a similar error.

  14. Redbook: Running IBM WebSphere Application Server on System p ...

    fr.slideshare.net/.../redbook-running-ibm-websphere-application-server-on- system-p-and-aix-optimization-and-best-practices
    This IBM Redbooks publication describes how to run the IBM Java Virtual
    Machine for AIX and WebSphere Application Server V6.1 on IBM System p and
    the AIX ...

  15. 16.3sp2 (22-Feb-08) - Petrosys Technical Support

    www.petrosysguru.com/releases/ReleaseNotes_16_3sp2.htm - Cached
    22 Feb 2008 ... 17805 Change windows install to Microsoft MSI installer. 17893 Installing Petra
    .... 18368 Issues with Multiple Dispatch Servers on one Host.

  16. wiki-analysis/data/Programming_languages.wikitax at master 路 ...

    https://github.com/dmosen/wiki.../data/Programming_languages.wikitax
    10 Jun 2013 ... Contribute to wiki-analysis development by creating an account on GitHub. ...
    Issues 15 Octocat-spinner-32 · Pull Requests 0 Octocat-spinner- ...

  17. Multiple-Step Based Registration via ASP.NET MVC 2 & WF 4

    dotnetslackers.com/.../Multiple-Step-Based-Registration-via-ASP-NET-MVC- 2-WF-4.aspx - Cached
    3 Nov 2010 ... The development environments and tools we'll use in the sample application are
    ... For this, Microsoft provides an unofficial version at codeplex ...

  18. The specified module could not be found. (Exception from ...

    www.dotnetspark.com/.../18174-specified-module-could-not-be-found- exception.aspx - Cached
    13 Sep 2010 ... I've been using SQL Server 2008 Express Edition on my development pc for
    several months now.Â? It has recently started giving me an error ...

  19. good coders code, great reuse - Peteris Krumins

    www.catonmat.net/page/45 - Cached
    14 Oct 2007 ... The only thing I am concerned with is concurrency issues. ... This is possible in a
    client/server database because there is always a single ...

  20. Windows Tech >> Visual Studio >> Archive Page 52

    www.windows-tech.info/archive/4/52.php - Cached
    17854: Upgrade "VS 2005 Pro Trial" to registered version: invalid CD key ...
    17866: Team Foundation Build installation on singer server deployment

[SQL Server 2008 issues] How to display two mail Id using database mail to recipient

[SQL Server 2008 issues] How to display two mail Id using database mail to recipient


How to display two mail Id using database mail to recipient

Posted: 20 Aug 2013 05:57 PM PDT

Hi, I had configured the database mail, using my Mail ID.So, when I send the mail to reciepient,it displays my mail ID.Now, My requirement is,I don't want only my mail ID to display. we have a Email Id for our department.But I don't want to configure a database mail account using my department email id.Is there any way ,so that we can display to the receipient's "from" as email-id on behalf of department email id.Please help me!!Thanks in Advance!!

Map SQL server Spid to PID in Task Manager

Posted: 20 Aug 2013 05:26 PM PDT

HelloI'm trying to map the SPID of a certain process to the PID under the processes tab in task manager. I can map the PID to the KPID through the sysprocesses table but this KPID does not appear in task manager under the PID's under the processes tab. How can this be done?

trying to match up two tables

Posted: 20 Aug 2013 04:54 PM PDT

Hi ProfessionalsI have two tablestable 1 which is dbo.newtable[code]software_manufacturer,productname, productversionmicrosoft,excel,11.2[/code]and table2 which is dbo.datalookuptable[code]software_manufacturer,productname, productversion, licensablemicrosoft,excel,11.2,licensable[/code]how do i query these two tables so I can find all the licensable information for dbo.newtable

Add PK CLUSTERED to existing table with dependencies

Posted: 20 Aug 2013 01:56 AM PDT

Hi,My database has a bunch of tables on it that have no indexes at all on them. I want to add indexes to these tables but I am having trouble doing it and am getting messages about dependencies... As an example:I have a table with this column:[code][ACC_Name] [nvarchar](10) NULL[/code](the table also has some other columns but I do not think they are relevant to this...)I want to add a primary key clustered in order to enforce the acc_name to always be unique (and to speed up query times). I have tested and as of right now the acc_name is indeed always unique (# distinct acc_name's = # rows in table).I first tried to create the table the way I wanted it (with the PK clustered), insert * from the existing table into my new table and then delete the existing table and re-name my new one, but it won't let me delete the existing table because there are a bunch of views that point at the existing table.Next I tried to add the primary key clustered to the existing table like this, figuring this would maybe have been a smarter way to do it anyhow:[code]ALTER TABLE [dbo].[ACC_STRUCTURE]alter column [ACC_Name] [nvarchar](10) NOT NULLALTER TABLE [dbo].[ACC_STRUCTURE]ADD CONSTRAINT PK_ACC_Name PRIMARY KEY CLUSTERED(ACC_Name)[/code]...but it won't complete the first statement because of the dependencies mentioned above. Is there a way around this?

Few tricky Questions about SQL Server 2008 that I came across...

Posted: 10 Jan 2012 06:31 AM PST

Few Questions about SQL Server 2008 that I came across. [b]Q: Which of the following allows for the truncation of a transaction log?[/b]A. Transaction logs are truncated when you use SQL Profiler.B. Transaction logs are truncated when you use the following syntax: truncate table AC. Transaction logs are truncated when you backup your database.D. You can not backup transaction log.[b]Q: Which of the following statements about unique Constraints are TRUE?[/b]A. You can have only one unique constraint applied to a table.B. Unique constraints can be used to establish a link between two tables.C. You can only have one column assigned to a unique constraint.D. If a primary key was already assigned to a table, the unique constraint would identify a special column used for indexing, [b]Q: Which of the following is an improved performance feature that uses bitmap filters for selecting minimal rows with queries?[/b]A. Table partitionsB. Star JoinC. Where clauseD. Outer Join[b]Q: Using a join in your select statement instead of a where clause is more efficient because the join pulls less data into your working memory.[/b]A. TrueB. False[b]Q: Full text indexes can be backed up and restored with the rest of the database due to the ...[/b]A. ...new index organization systemB. ...overall size of the index getting smaller.C. ...index becoming a part of the transaction logs.D. ...indexes no longer being stored outside of the database.[b]Q. Which of the following statements, if used for creating a new login id, will result in an error?[/b]A. CREATE LOGIN [HumanResources/JohnSmith] FROM WINDOWSB. CREATE LOGIN AndrewWalters WITH PASSWORD '!^%&7', DEFAULT DATABASE = HRC. CREATE LOGIN John WITH PASSWORD '*&!@*&'D. CREATE LOGIN [HumanResources/Jim] FROM WINDOWS, DEFAULT DATABASE=CRM[b]Q. Which of the following statements can be used to provide sorted result set based in the CustomerName column?[/b]A. SELECT ROW_NUMBER() AS RN, CustomerName from Customers order by CustomerNameB. SELECT ROW_NUMBER() OVER (ORDER BY CustomerName) AS RN, CustomerName FROM CustomersC. SELECT ROW_NUMBER() (ORDER BY CustomerName) AS RN, from CustomersD. SELECT ROW_NUMBER() AS RN, CustomerName from Customers

sql server 2008R2 - Memory is not releasing after big job run

Posted: 20 Aug 2013 12:43 PM PDT

Hello,We have migrated to sql server 2008R2 and I have set up my MAX Memory 32 GB and MIN left a default 0.When I was watching performance while running big batch job, it was done within 30 minutes but memory was showing almost 30 GB in task manager and after it's ran, it was still showing 30 GB memory.I couldn't understand why it's not releasing memory after job is done and still showing 30 GB memory into task manager?Thanks,

Send email in a tabular format using SQL Server database mail depending upon output row count

Posted: 20 Aug 2013 09:06 AM PDT

Hi Experts..Requirement:--If the following query resulted greater than zero rows, send the results in email in a tabular format using SQL Server database mail--if is is equal to zero ,don't send the mail.can someone help me in thisSELECT [DateTime] ,[Text] FROM [MicrosoftLog].[dbo].[Log] where [LogApplicationID] in (select [LogApplicationID] from [MicrosoftLog].[dbo].[LogApplication] where applicationname in ( 'VirtualMan', 'PhysicalMan')) and StartText<> 'count=0' and StartDateTime < GetDate() and StartDateTime > dateadd(minute, -30, GetDate())Any input is appreciatedThanks

SQL Server Jobs not being scheduled after restart

Posted: 20 Aug 2013 04:31 AM PDT

I failed over our Cluster (SQL 2008 R2) and the SQL Agent did not start (AgentXPsDisabled)... I ran this script which brings SQL Agent online, but ALL the jobs "Next Run" is set to "Not scheduled"EXEC sp_configure 'allow updates', 0RECONFIGUREgo-- then:sp_configure 'show advanced options', 1;GORECONFIGURE;GOsp_configure 'Agent XPs', 1;GORECONFIGUREGOEXEC sp_configure 'allow updates', 0RECONFIGUREI tried restarting SQL Agent from the SQL Server Config Manager but to no avail. Thoughts?

SQL Server import export wizard vs bulk insert

Posted: 20 Aug 2013 01:42 PM PDT

Hi Professionals.I have a question regarding importing data from spreadsheets.I manually use SQL Servers Import and Export wizard to import a .xls spreadsheet and it is intelligent enough to match the columns correctly. But when I do this using a bulk insert I run into problems for instancewhen I have a column named softwaremanufacturer and I import data that reads "Adobe systems, Inc" the Import wizards populates the column like so[code]softwaremanufacturerAdobe Systems, Inc[/code]but when I do a bulk insert of my csv I run into the following problems as it comes to the comma and thinks it is a new table column shifting the "Inc" part into the next column along like so[code]computername, softwaremanufacturer,productname, productversion"ACTADMINPC002 g00228" "Adobe Systems Inc" "Acrobat Reader (redistributable)""ACTADMINPC002 g00228" "Adobe Systems Inc" "Air""ACTADMINPC002 g00228" "Adobe Systems Inc" "Collaboration synchronizer""ACTADMINPC002 g00228" "Adobe Systems Inc" "EULA""ACTADMINPC002 g00228" "Adobe Systems Inc" "Flash player"[/code]Is there a way to get around thishope this makes sense and thanks in advance

SQL Join Isuue

Posted: 20 Aug 2013 01:40 PM PDT

I have three tables Table AID NAME1 NameATable BID Coutry1 County A1 Country BTable CID Family1 Family A1 Family B1 Family CI use a outer joinI get the following result set1 County A Family A1 County A Family B1 County A Family C1 County B Family A1 County B Family B1 County B Family CBut I want to get the following1 Country A Family A1 Country B Family B1 NULL Family CWhich query should I use?Thanks

Difference of two consecutive datetime rows

Posted: 20 Aug 2013 02:39 AM PDT

HI,I have the following tableEntryID DateInserted InsertedBy1776285 2013-06-03 07:46:38.340 5921776286 2013-06-03 07:47:47.677 5921776287 2013-06-03 07:48:17.367 5921776288 2013-06-03 07:49:08.750 5921776289 2013-06-03 07:49:08.750 5921776290 2013-06-03 07:49:45.177 5921776291 2013-06-03 07:54:54.290 5921776292 2013-06-03 07:57:11.703 5921776293 2013-06-03 07:57:35.930 831776294 2013-06-03 07:58:33.843 831776295 2013-06-03 07:58:36.293 5921776296 2013-06-03 07:58:54.853 831776297 2013-06-03 07:59:06.523 5921776298 2013-06-03 07:59:27.633 831776299 2013-06-03 07:59:46.383 831776300 2013-06-03 08:00:02.020 5921776301 2013-06-03 08:00:04.390 831776302 2013-06-03 08:00:29.590 5921776303 2013-06-03 08:01:00.240 5921776304 2013-06-03 08:01:12.943 831776305 2013-06-03 08:01:31.150 831776306 2013-06-03 08:01:31.990 5921776307 2013-06-03 08:01:50.373 831776308 2013-06-03 08:02:10.840 831776309 2013-06-03 08:02:30.243 831776310 2013-06-03 08:03:03.737 831776311 2013-06-03 08:04:08.750 5921776312 2013-06-03 08:04:14.723 831776313 2013-06-03 08:04:27.033 5921776314 2013-06-03 08:05:26.617 831776315 2013-06-03 08:05:26.617 831776316 2013-06-03 08:05:38.527 83Now I want to get the difference between 2 consecutive dateinserted col in hours or mins into another column say Time diff grouped by on the inserted by col since i want total time taken by each person inserted.like as belowEntryID DateInserted InsertedBy TimeDiff1776285 2013-06-03 07:46:38.340 592 diff(2013-06-03 07:47:47.677-2013-06-03 07:46:38.340)-- should be the output of this col either in mins or hours.Also if the difference is > than 3 mins I want only 3 mins as the output.1776286 2013-06-03 07:47:47.677 5921776287 2013-06-03 07:48:17.367 5921776288 2013-06-03 07:49:08.750 5921776289 2013-06-03 07:49:08.750 5921776290 2013-06-03 07:49:45.177 5921776291 2013-06-03 07:54:54.290 5921776292 2013-06-03 07:57:11.703 5921776293 2013-06-03 07:57:35.930 831776294 2013-06-03 07:58:33.843 831776295 2013-06-03 07:58:36.293 5921776296 2013-06-03 07:58:54.853 831776297 2013-06-03 07:59:06.523 5921776298 2013-06-03 07:59:27.633 831776299 2013-06-03 07:59:46.383 831776300 2013-06-03 08:00:02.020 5921776301 2013-06-03 08:00:04.390 831776302 2013-06-03 08:00:29.590 5921776303 2013-06-03 08:01:00.240 5921776304 2013-06-03 08:01:12.943 831776305 2013-06-03 08:01:31.150 831776306 2013-06-03 08:01:31.990 5921776307 2013-06-03 08:01:50.373 831776308 2013-06-03 08:02:10.840 831776309 2013-06-03 08:02:30.243 831776310 2013-06-03 08:03:03.737 831776311 2013-06-03 08:04:08.750 5921776312 2013-06-03 08:04:14.723 831776313 2013-06-03 08:04:27.033 5921776314 2013-06-03 08:05:26.617 831776315 2013-06-03 08:05:26.617 831776316 2013-06-03 08:05:38.527 83Thanks in advance.

Index Rebuild

Posted: 20 Aug 2013 07:25 AM PDT

I have to kill Index Rebuild process due to space issues, does this cause any corruption in database? Thanks

Copy Default trace from a server to your local machine

Posted: 20 Aug 2013 01:43 AM PDT

If you wish to replay events captured by the default trace can you copy the files to your local machine from the server and run them locally in profiler ?Will the trace show what stored procs were running and who ran them ?

Setting up server to add a node to a cluster.

Posted: 20 Aug 2013 12:48 AM PDT

Ok a bit of a different situation that I am used to so I need a sanity check.Right now I have a one node cluster, it was a two node cluster but we had a hardware failure so we evicted the bad node from the cluster and are rebuilding windows on the bad node after doing a hardware fix.So, that's the setup here is the question.I am guessing we add the node back into windows clustering and make it aware of the storage then add the node to sql clustering via sql install. Is that basically it? Can we add the node back to windows clustering without taking down the active node (there is some question here about adding the new node and making it aware of the storage will cause an issue with the active node).Thanks, I am used to doing this when I have two ore more existing nodes already in the windows cluster.

Error: 17189, Severity: 16, State: 1.

Posted: 23 May 2012 07:29 AM PDT

We're running 2008 SP2, 8 core, 64 GB, Enterprise Edition with about 200-500 connections. have min/max Memory setting 0/60000 and lock pages in membery.Got this error once (haven't seen before):"Error: 17189, Severity: 16, State: 1.MessageSQL Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection. Check the SQL Server error log and the Windows event logs for information about possible related problems. [CLIENT: xxx.xxx.xx.xx]"Followed by a number of these errors:"Error: 18056, Severity: 20, State: 29.MessageThe client was unable to reuse a session with SPID 210, which had been reset for connection pooling. The failure ID is 29. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message."Followed by a bunch of these:"Error: 10982, Severity: 16, State: 1.Failed to run resource governor classifier user-defined function. See previous errors in SQL Server error log from session ID 439 for details. Classifier elapsed time: 0 ms. "The instance did not restart but caused a number of application timeouts. Googling content of SQLDUMPER_ERRORLOG.log and ERRORLOG at the time of issue did not produce any meaningful results. What could be the issue?

[SQL server issues] Created Issue: AdventureWorksDW2012 Download file corrupt [19063]

  1. AdventureWorksDW2012 Download file corrupt - Microsoft SQL ...

    sqlserversamples.codeplex.com/workitem/19063 - Cached
    14 Dec 2012 ... There seams to be an issue with the AdventureWorksDW2012 Data file
    download. When I try to run this SQL statement: CREATE DATABASE ...

  2. Issues - Microsoft SQL Server Community & Samples - CodePlex

    sqlserversamples.codeplex.com/workitem/list/basic - Cached
    22 Feb 2013 ... There seams to be an issue with the AdventureWorksDW2012 Data file
    download. When I try to run this SQL statement: CREATE DATABASE ...

  3. Updating... - Microsoft SQL Server Community & Samples - CodePlex

    sqlserversamples.codeplex.com/workitem/list/basic?size... - Cached
    AdventureWorksDW2012 Download file corrupt ... Id #19063 | Release: None |
    Updated: Feb 22 at 1:37 AM by dscheierman | Created: Dec 14, 2012 at 4:05 PM
     ...

  4. Created Issue: AdventureWorksDW2012 Download file corrupt [19063]

    sqlsample.blogspot.com/.../ Created%20Issue%3A%20AdventureWorksDW2012%20Download... - Cached
    12 Aug 2013 ... Created Issue: AdventureWorksDW2012 Download file corrupt [19063]. There
    seams to be an issue with the AdventureWorksDW2012 Data file ...

  5. SqlServerSamples Work Item Rss Feed - Kekunda.com

    reputationless7.kekunda.com/chan-5121419/all_p2.html - Cached
    12/14/12--09:05: _Created Issue:... (showing articles ... 12/14/12--09:05: Created
    Issue: AdventureWorksDW2012 Download file corrupt [19063] (chan 5121419).

  6. Ofelio - Search results for...techcent - 10 of 2 returned feed content.

    www.ofelio.com/preview?lang=en&url=/show?id=apifeed&search...
    1 Oct 2012 ... Favicon 3.Created Issue: AdventureWorksDW2012 Download file corrupt [19063]
    14 Dec 2012, 6:05 pm. There seams to be an issue with the ...

  7. Tobe Kimalaja - Google+ - I experienced the same problem. Looking ...

    https://plus.google.com/102311087450897723438/.../NJ5xgHBrn9g - Cached
    25 May 2013 ... Looking for a solution for this, as well. [SQL server issues] Created Issue:
    AdventureWorksDW2012 Download file corrupt [19063].

  8. Tobe Kimalaja - Google+

    https://plus.google.com/102311087450897723438 - Cached
    25 May 2013... AdventureWorksDW2012 Download file corrupt [19063] · http://sqlsample.
    blogspot.com/2013/05/sql-server-issues-created-issue_7.html. 1.

  9. Tobe Kimalaja - Photos - Google+

    https://plus.google.com/102311087450897723438/photos - Cached
    25 May 2013 ... Looking for a solution for this, as well. Read more. [SQL server issues] Created
    Issue: AdventureWorksDW2012 Download file corrupt [19063].

  10. download files are corrupt - Computing.Net

    www.computing.net/answers/.../download-files...corrupt/169500.html - Cached - Similar
    I use Windows 98 with a DSL modem, and for the last couple of days I have been
    having trouble downloading files. The internet itself works fine ...

Search This Blog