Tuesday, July 2, 2013

[SQL Server 2008 issues] Hi we are getting errors and failed status for sqlserver r2 installation need help

[SQL Server 2008 issues] Hi we are getting errors and failed status for sqlserver r2 installation need help


Hi we are getting errors and failed status for sqlserver r2 installation need help

Posted: 01 Jul 2013 07:18 PM PDT

HI,we are getting errors and failed status for sqlserver r2 installation need helpmessage we got in display window at last screen----------Description: SQL Server 2008 R2 Setup has encountered an error. Problem signature: Problem Event Name: SQL100MSI Problem Signature 01: 10.50.1600.1 Problem Signature 02: 1.0.1215.0 Problem Signature 03: Synchronization.msi Problem Signature 04: 0x162A16FE Problem Signature 05: 0x1603 Problem Signature 06: Install_Synchronization OS Version: 6.1.7601.2.1.0.272.7 Locale ID: 1033Additional information about the problem: LCID: 1033Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409If the online privacy statement is not available, please read our privacy statement offline: C:\Windows\system32\en-US\erofflps.txt

SQL Server Replication

Posted: 01 Jul 2013 06:58 PM PDT

Good Day. We configured a pull Replication with the Distributor residing on the Publisher. I am able to see transactions going to the Distributor, but I would like to know how one can monitor the transactions going FROM the Distributor TO the Subscriber .

How to Store Data in Database using Data table

Posted: 01 Jul 2013 05:10 PM PDT

c# - Insert data from DataTable to database table

Agent Job Links to Another SQL Server and Fails due to Service Account Privs

Posted: 22 May 2013 02:54 PM PDT

To my friends in the community, here is a stumper that I can't seem to find sufficient information on despite repeated Google searches to figure out how to solve. Let me preface my explanation by saying that I am not a DBA and I have only limited access to the involved servers because they belong to a customer for which we are implementing an application.What is going to be needed is kind of a step-by-step, cookbook approach because I'm not sure at quite what level their DBA resources operate. Without further adieu:1. Our application runs on a virtualized server named SQL2. I do not have direct access to this server but I can access the database for our application using SSMS from the application tier's server.2. There is a SQL Server Agent job defined that runs on SQL2 but links to a different SQL Server (SQL1) containing another application from which our application needs to draw some data. I do have limited access directly to SQL1 but very limited privileges there.3. On both servers, there is a SQL account defined ('myaccount') and the password is the same on both. This account does have sufficient privs on SQL1 to access the customer's application's database, or at least the table I need to read from.On my application server, I can launch SSMS, connect to SQL2 and run the SP below and it runs just fine. It is but a small subset of the actual SP that needs to run to keep this somewhat simple. I have defined an agent job on SQL2 whose owner is 'myaccount.' When the agent job runs it gets an error message. It is set up to run the exact same EXEC as shown below.[code="sql"]-- From SSMS this runs without issues:EXEC [dbo].[TestConnectToLinkedServer];-- Above is defined as the job step in the agent job named "Test Linked Server Connection"-- When I run this, it failsEXEC msdb..sp_start_job N'Test Linked Server Connection';-- I can get the error message it fails on with this (top 2 rows):EXEC dbo.sp_help_jobhistory @job_name = N'Test Linked Server Connection',@mode='FULL' ;[/code]The error message returned by the last query is:[code="plain"]The job failed. The Job was invoked by User myaccount. The last step to run was step 1 (Run SP).Executed as user: NT AUTHORITY\SYSTEM. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. [SQLSTATE 28000] (Error 18456). The step failed.[/code]Clearly the account that is being used on SQL1 (AUTHORITY\ANONYMOUS LOGON) isn't the same as the one on SQL2 (NT AUTHORITY\SYSTEM). I'm thinking this must have something to do with the account mappings but I am not sure on which server the mapping needs to be changed (or for that matter what it needs to be changed to).Here is the SP that is run either manually or by the agent:[code="sql"]CREATE PROCEDURE [dbo].[TestConnectToLinkedServer]AS BEGIN DECLARE @CustAppDBname NVARCHAR(20) = N'CustApp' ,@LinkedServer NVARCHAR(20) = N'SQL1' ,@retval INT ,@ErrorCount INT = 0 ,@ErrorCount1 INT = 0 ,@SQL NVARCHAR(MAX); IF NOT EXISTS ( SELECT 1 FROM sys.servers WHERE name = @LinkedServer) EXEC sp_addlinkedserver @server=@LinkedServer, @srvproduct=N'SQL Server'; BEGIN TRY -- This will fail if there is no server to link to (i.e., account not recognized) EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=@LinkedServer ,@useself='TRUE', @locallogin='myaccount'; SELECT @retval = 0; END TRY BEGIN CATCH SELECT -3, 'Problem linking to Customer'' app server: ' + @LinkedServer, @retval ,[SQL Error Number] = ERROR_NUMBER() ,[SQL Error Severity] = ERROR_SEVERITY() ,[SQL Error State] = ERROR_STATE() ,[SQL Error Procedure] = ERROR_PROCEDURE() ,[SQL Error Line] = ERROR_LINE() ,[SQL Error Message] = ERROR_MESSAGE();; SELECT @ErrorCount = @ErrorCount + 1, @retval = -1; SELECT @ErrorCount1 = -3 END CATCH IF @ErrorCount = 0 EXEC @retval = sys.sp_testlinkedserver @LinkedServer; IF @retval <> 0 BEGIN SELECT -4, 'Test of linked server failed' SELECT @ErrorCount = @ErrorCount + 1, @retval = -1; END SELECT @SQL = N' SELECT TOP 10 * FROM [' + @LinkedServer + N'].[' + @CustAppDBname + N'].dbo.AppTable' EXEC sp_executesql @SQL IF @LinkedServer IS NOT NULL AND EXISTS ( SELECT 1 FROM sys.servers WHERE name = @LinkedServer) BEGIN IF @ErrorCount1 <> -3 EXEC sp_droplinkedsrvlogin @rmtsrvname=@LinkedServer, @locallogin='myaccount'; EXEC sp_dropserver @LinkedServer, 'droplogins'; ENDEND[/code]Any help would be greatly appreciated. BTW. I am not sure there's sufficient information here to lead someone to identify and precisely resolve the issue. If there is not, please let me know what additional information you need to diagnose the issue and I'll try to get it. It may take a day or two to get it as I'll be relying on others arms and legs to get it done (most likely).

Query execution plan

Posted: 01 Jul 2013 05:14 PM PDT

what is Query execution plan? how to trouble shoot the slow performane of queires ?

possible or not

Posted: 01 Jul 2013 04:47 PM PDT

how to use Table in Parameter for store procedure

Table Partition / Index Partition

Posted: 01 Jul 2013 04:38 PM PDT

Hi ,What is main difference between Table Partition and Index partition. Thanks,RR

Partitioning on Existing table with non clustered index in date column.

Posted: 26 Jun 2013 08:33 PM PDT

Hi All,I have one table with 10 lacks records. I partitioned that table on CreatedDate column with non clustered index( i am not removing clustered index on ID column, It is as part of primary key).It is inserting to data into relevant partition only. But i am verifying is that table partitioned or not by using below steps, in object Explorer-Database-->TestDB-->tables-->select partitioned table and Right click on table select properties --Storage File Group= PrimaryTable Partitioned = FalseIf create Partitioned with Clustered index , it is showing correctly Table Partitioned = True But i am creating with non clustered.Can any one explain, [b]Is that below steps are correct process to do the partition, If i create non clustered index on datetime column is there any performance issue on existing queries.[/b]CREATE TABLE tblPartition(ID int primary key identity(1,1),Name varchar(30),CreatedDate Datetime)insert into tblPartition(Name,CreatedDate)SELECT 'Name1','2013-05-26 13:53:47.650'union allselect 'Name2','2013-05-26 13:53:47.650'union allSELECT 'Name1','2013-06-26 13:53:47.650'union allselect 'Name2','2013-06-26 13:53:47.650'union allSELECT 'Name1','2013-07-26 13:53:47.650'union allselect 'Name2','2013-07-26 13:53:47.650'goCREATE PARTITION FUNCTION [PartitionFunction](datetime) AS RANGE RIGHT FOR VALUES (N'2013-05-31 23:59:59', N'2013-06-30 23:59:59', N'2013-07-31 23:59:59')CREATE PARTITION SCHEME [PartitionScheme] AS PARTITION [PartitionFunction] TO ([FGNdf10], [FGNdf11], [FGNdf12], [PRIMARY])CREATE [b]NONCLUSTERED[/b] INDEX [IX_PartitionScheme_CreatedDate] ON [dbo].[tblPartition]([CreatedDate])WITH (SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PartitionScheme]([CreatedDate])

SQL Agent Proxy

Posted: 01 Jul 2013 01:46 PM PDT

Hi Guys, We are encountering an issue while using SQL Agent proxy account to run cmdexec.We hv login "sch" and granted sysadmin and linked it to a credential and this has been added to subsystem CMdExec. But still we are getting this errorUnable to start execution of step 1 (reason: JobOwner sa doesn't have permissions to use proxy 3 for subsystem CmdExec). I also tried changing the job owner to "sch" it doesnt help.Any help would be appreciated ;-)Thanks for your time.Cheersv

NULL datetime field. Is it possible?

Posted: 01 Jul 2013 05:24 AM PDT

When I query a datetime field, the result is a date and time. SELECT SentDate FROM MyTable. Result = '2013-07-01 12:32:47.000', which is fineWhen I use the following to return blank/NULL for all values:SELECT '' AS SentDate FROM MyTableResult = ''The field then turns into a varchar field.My real question...........Is there a way to not return the '1900-01-01 00:00:00.000' in the result and still make the field a datetime field?

Permissions required to view Data Sources for an SSIS Package in a Job Step

Posted: 01 Jul 2013 10:32 AM PDT

Version: Microsoft SQL Server 2008 R2 (SP2) - 10.50.4276.0 (X64) I have SSIS Packages that execute via a SQL Server Job. I want to grant members of the SQLAgentOperatorRole fixed database role the ability to view the "Data sources" tab (read-only) in the Job Step Properties. For some reason, the Connection Manager options are blank while other Tabs such as "General", "Set Values" and "Command Line" all show their respective values as read-only already. (I attached a screen print of the Tab in the Job Step I'm referring to.) I haven't found anything short of assigning sysadmin privileges (which obviously I don't want to do) to expose the values in the Data Sources Tab to the SQLAgentOperatorRole.Can someone please tell me what permissions are required to allow a read-only view to the Data Sources Tab? Thanks for the help!

RESTORE DATABASE

Posted: 18 Apr 2013 06:31 AM PDT

Hello,What is the syntax on how to restore database on these requirement:I need to run restore sql job from server 1,but the bakup file is on server2 and database where I need to restore is on server2here is how I startedRESTORE DATABASE MyDatabase FROM DISK='E:\Backups\MyDatabase.bak'Can anyone help me?Thank you

Import multiple files into multiple tables

Posted: 30 Jun 2013 10:59 PM PDT

Dear DBAs,I have 200 flat, text files. Each one has different fields separated by one specific charactere (¶). The name of the files are the name I wish to give to the tables I want to import. The names of the fields are in the first row of each file. Is there a way to import them all in once, or I have to import one by one?Do you have any script ready to do it?Thanks in advance.DBA Cabuloso,Lucas Benevides

Cycle errorlog based on numer of records.

Posted: 30 Jun 2013 10:38 PM PDT

Is there any way I can read the number of records in the errorlog without reading the output of xp_readerrorlog into a temp table / table variable?I suspect not, I would just have liked to avoid the unnecessary processing.Thanks.

Need to create a snaphot for reporting server?

Posted: 01 Jul 2013 12:05 AM PDT

HiLooking for some help/links to where I can figure out how to copy all our tables in our production database to a database on our reporting server on a nightly basis.If it matters I don't want to overwrite tables that exist on the reporting server and don't on the live server, for example reporting servers has a dimdate table live doesn't i want to keep that on the reporting server...Thanks

After cancelling SQL job database stuck in restoring state

Posted: 14 Dec 2011 05:24 AM PST

Hi I was doing restore operation and i cancelled SQL agent job in middle now my DB is stuck in Restoring State. can you suggest me what to do please?Thanks

Queries that cause full scan table

Posted: 13 Jun 2013 05:35 PM PDT

Hi everybody , I would like to retrieve queries that cause full scan table in sql server.Someone can help me please?? :ermm:

Backup Scenario

Posted: 30 Jun 2013 11:26 PM PDT

Hi all, I want to know the backup scenario for the accidental deletion of table in a database. 1. we have every day full backups ( 1 AM) 2. every 4 hour differential backups 3. every 15 min t log backups. one of the table was accidentally deleted from database around 4.35 PM and the issue was reported to DBA team 1 hour later. so how to deal with this issue.we need all the data before and after the deletion of table for the database and we need to restore table as well.

Using RAISERROR with Dynamic SQL

Posted: 28 Jun 2013 04:16 AM PDT

Can anyone provide me a short example of how to implement this? I am not able to do this and need to.Any and all help will be greatly appreciated!! Back to Google!

Create Report for each day of month with sepaarte tabs for each date

Posted: 30 Jun 2013 10:33 PM PDT

Hi,I wanted to create a report with separate tab for each day of month in excelsheet .1. I have table with Values in it and also having Column for Date ,I want to use this dateColumn from here to create ExcelSheets in Report.xvv_DateStretch_YU2. I have another StoredProc named xlo_CreateReportdata_SP It populates all related data for a particular date.3. I want to use this data in Report and separate it based on date Tabs.4. I dont want to create report for dates already it have been created.I need suggestions from you experts here ,how can to implement this in best way....

No comments:

Post a Comment

Search This Blog