Environment: SQL 2005 Workgroup Ed. (part of SBS 2003 R2 Premium)
I have a database attached to SQL 2005 that is on my D: drive. I'm trying to run a full backup of this database to a backup device also on D:. The first time I ran the backup it worked fine, then I installed SQL 2005 SP1 and now it's failing. The error message is:
quote:
Backup failed for Server 'MYSERVER'. (Microsoft.SqlServer.Smo)
System.Data.SqlClient.SqlError: Write on "My Backup Device(D:BackupMyBackupDevice.bak)" failed: 112(There is not enough space on the disk.)(Microsoft.SqlServer.Smo)
In the event viewer, the following events are logged in the Application log:
quote:
Source: MSSQLSERVER
Category: (6)
Event ID: 3041
Description:
BACKUP failed to complete the command BACKUP DATABASE MyDatabase. Check the backup application log for detailed messages.
quote:
Source: MSSQLSERVER
Category: (2)
Event ID: 18210
Description:
BackupMedium::ReportIoError: write failure on backup device 'D:BackupMyBackupDevice.bak'. Operating system error 112 (There is not enough space on the disk.).
If I do the backup to the MSSQL default backup directory (on C: ), the backup completes successfully. If I try to back up the master database (on C: ) to the backup directory I created on D:, the backup completes successfully. If I try to back up the master database to the MSSQL default backup directory (on C: ), the backup completes successfully.
The SqlServer and SqlAgent processes are both running under a domain user account, and that account has full control of my backup directory on D:. I should also mention that my D: drive has over 100GB free, and the database is only 330MB. It is a simple database model.
I've searched all day today trying to find the solution to this issue, and I can't find anything relevant. Could someone please help me!!! I'm about at my wit's end!
So for the last week of my life, literally, I have been trying to import excel files, text files, etc through the bcp utility, link server and also trying bulk insert....I am really, really tired of this not working and I am starting to think there is a bug in express. I first thought these issues might have to do with Vista but I have even tried and failed with XP SP2. I am not new to SQL Server, nor am I a new developer - I have over five years experience so I am really pissed about it at this point! I know most professional developers use SQL Server 2005 Enterprise or something other than Express which is why I am probably not getting answers. btw, this is not the first time I have posted about these issues either. I have referenced multiple sources including forums, books on-line and I even resorted to getting a SQL Server 2005 EXPRESS book for dummies! I have enabled remote connections for both named pipes and tcp/ip. I have started the sql browser service. I have given the correct permissions to the file I want to import and to the table I want to import the data to. The file contains the int values 1,2,3,4,5,6,7,8,9 --> I have even tried saving this file as a .csv -- thanks a whole bunch sql server 2005 dev team for getting rid of the import/export wizard found in 2000, arrrrrgh!
BULK INSERT TestDB.dbo.tblTestData FROM 'C:datamyData.txt' WITH (DATAFILETYPE = 'char', FIELDTERMINATOR =','); GO
Msg 4864, Level 16, State 1, Line 1 Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 1 (columnValue).
Can ANYONE give me a real answer on h ow I can get this to actually work?
I am using sql server 2000 and windows server 2003 standard edition: My database backup job is failing due to lack of disk space. I am taking the backup onto E drive and the available free space on E drive is 6.85 GB and there are no other drives I can use for the database backups. The size of mdf file is 21 GB and that of ldf file is 4.2 GB. The transaction log back up job of that db ran fine. This database recovery model is Full and Auto shrink is not checked. There is one primary filegroup for the database. In this situation, I am thinking of the following option: 1. Backup the db and log files onto another network shared drive. If I want to still use the same server E drive to backup the db and log files instead of using another network shared drives. how can I do that. Please let me know the best way of handling this issue. Any help is greatly appreciated. Thanks!
Backup job for User databases is failing. I found below errors View job history
Step 0: The job failed. The job was invoked by schedule 4(DBMP_User). The last step to run was step 1(subplan) Step 1:
Message: Executed as user ServernameSystem. The package execution failed. The step failed
Appln-event log:
SQL server scheduled job DBMP_User failed. Invoked on 2007-12-24 , the job was failed.
Sql server error log
Database backed up. DBname creation,date()time……paged dumped 8434659,first LSN: 21126:101410:48,last LSN :21128:933:1, number of dump devices:1, device information: file=1,type=disk (E:MSSQLBACKUP ) This is an informational message only. No user action is required
Error log:
Date: Log: SQL Agent (current …) Message: (396) An idle CPU condition has not been defined-OnIdle job schedules will have no effect.
I have an SSIS package that does one simple thing: perform a FULL backup of a database.
I executed this package yesterday at 2:00. The package backs up to four individual files on a network share. The network share is accessible from the SQL Server. THe database in question is 245GB in size.
The package was running fine when I left for the day. When I got in today, there was an error in the SQL Server log:
Error: 3041, Severity: 16, State: 1.
BACKUP failed to complete the command BACKUP DATABASE ServicingODS. Check the backup application log for detailed messages.
Where is this infamous backup application log?!? The Event Viewer says the same thing. Needless to say, the error message is a bit vague.
There were no "issus" overnight (power outages, network issues, etc.)
Help! I am getting a Job failure for a DB Backup Job when I open up the EM -> Management -> SQL Server Agt -> Jobs When I check the SQL Logs, there is no Error message, nor is there an error message in the DB Maintenance Plan History. I checked the Server to make sure the DB was being backed up, and the current file is there. Does anybody have any suggestions? Thanks! (make me look good to the rest of my group!)
I have a DB Maintenance plan created that performs optimizations, integrity checks, and a database backup. The optimizations and integrity checks work fine, but the backup job fails. The backup job is to write the .bak file to a network share. When I change the owner of the job to "sqluser", the job fails at step 0 withe the following error: The job failed. Unable to determine if the owner (rsnsqluser) of job DB Backup Job for DB Maintenance Plan 'Online Database Server Maintenance Plan' has server access (reason: Could not obtain information about Windows NT group/user 'rsnsqluser'. [SQLSTATE 42000] (Error 8198)). Checked with the system admin for this server and sqluser has priviledges to do everything, including write to the network share.
So, now I change the owner of the same maintenance job from sqluser to "sa". I now get this error: Executed as user: RSNsqluser. sqlmaint.exe failed. [SQLSTATE 42000] (Error 22029). The step failed.
Checked the settings for MSSQLSERVER and SQLSERVERAGENT in Control Panel. Everything seems to be in order according to the other threads I have read.
For grins, I tried to ensure the sqluser password on the SQL Server Agent was correct. When I try to enter the new password I get this: sql server agent startup account could not be verified I click yes (it asks if I want to continue anyway). Is the password not being registered properly in the agent?
One other thing, the sqluser user is listed under Security|Logins as connecting with Windows Authentication. We have several other servers that are set up the same and work fine. What am I missing? I'm pulling my hair out! :eek:
Backup job for User databases is failing. I found below errors View job history
Step 0: The job failed. The job was invoked by schedule 4(DBMP_User). The last step to run was step 1(subplan) Step 1:
Message: Executed as user ServernameSystem. The package execution failed. The step failed
Appln-event log:
SQL server scheduled job DBMP_User failed. Invoked on 2007-12-24 , the job was failed.
Sql server error log
Database backed up. DBname creation,date()time€¦€¦paged dumped 8434659,first LSN: 21126:101410:48,last LSN :21128:933:1, number of dump devices:1, device information: file=1,type=disk (E:MSSQLBACKUP ) This is an informational message only. No user action is required
Error log:
Date: Log: SQL Agent (current €¦) Message: (396) An idle CPU condition has not been defined-OnIdle job schedules will have no effect.
BACKUP DATABASE CorporateComplaints TO DISK = 'E:MSSQLBACKUPInsight_Dump.BAK' WITH INIT -- Declare the variable to be used. DECLARE @MyCounter INT DECLARE @MySpid INT DECLARE @MYSQL varchar(50)
-- Initialize the variable. SET @MyCounter = (SELECT Count(spid) FROM SysProcesses WHERE SysProcesses.dbid = ( SELECT dbid FROM SysDatabases WHERE SysDatabases.name = 'CorporateComplaints2' ))
print'mycounter '+ cast(@MyCounter as varchar (5))
-- Test the variable to see if the loop is finished. WHILE (@MyCounter > 0) BEGIN -- Kill process. EXEC sp_refreshview ActiveProcessesView SET @MySpid = (SELECT Min(Spid) FROM ActiveProcessesView) SET @MYSQL = 'KILL ' + CAST (@MySpid AS Varchar ) EXEC (@MYSQL)
-- Increment the variable to count this iteration -- of the loop. SET @MyCounter = @MyCounter - 1 END GO
RESTORE FILELISTONLY FROM DISK = 'E:MSSQLBACKUPInsight_Dump.BAK' RESTORE DATABASE CorporateComplaints2 FROM DISK = 'E:MSSQLBACKUPInsight_Dump.BAK'
WITH REPLACE, MOVE 'CorporateComplaints_Data' TO 'E:MSSQLDATAcorpcomps2data.mdf', MOVE 'CorporateComplaints_Log' TO 'F:MSSQLDATACorpcomplaints2Log.ldf'
error event id 17055
Can any body help wht is wrong in script. I dont understand what is there in middle part its killing some process. what is need.
what I can usderstand its taking a backup of database CorporateComplaints and restoring it to CorporateComplaints2.
In one off my production box, we are notable to take a backups of MSDB . When i look at the error, it is failing locate allocation unit ID.. complete error as below
Msg 2533,Sev 16,State 1, Line 36 : Table error : Page (1:111720 ) allocated to object id 110623437, index ID 1, Partition ID 72057594043432960, alloc unit ID 72057594044874752 (type-inrow data) was not seen. This page is invalid or may have an incorrect alloc unit ID in its header.[SQLSTATE 42000]
Due this failure, we are unable to take the backup of MSDB database and our integrity check and reindex jobs also failured with the same.Also, I could see events of I/O issues with underlaying hard dirve with following name
DeviceHarddisk0DR0,has a bad block.
1. I dont no what could happen if restart my server, Question is: Does it recognize MSDB during server statup.
We get frequent (1 out of 3) "sqlmaint.exe failed" errors during backups for one of our larger databases (40GB). So i removed the maintenance plan and put in a custom backup job to get a better error msg in the log:
BackupMedium::ReportIoError: write failure on backup device 'F:MSSQLmydb_2008_1_3_21_45.BAK'. Operating system error 112(There is not enough space on the disk.).
However, we have PLENTY of space on disk: LOG DISK - NTFS - used space = 2GB, free space = 81GB BACKUP DISK - NTFS - used space = 29GB, free space = 82GB So even if it doubled in size, there would still be 50GB free.
I am using sql server 2012 with HADR (Always on with sql cluster).
We have database maintenance plans through wizard for full backup & DBCC CHECK DB. It was running successfully but it failed with the below error
Execute SQL Task Description: Failed to acquire connection "Local server connection". Connection may not be configured correctly or you may not have the right permissions on this connection.
(A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)).
(A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)).
I can able to take the backup from query window. It is succesful. The Sql Agent has full permissions. I don't think there are any recent changes happen.
Recently I created a new db in production and restored it from test. Ihave a nightly backup job that backs up all user databases. The backupfor this new db is failing.The message in the error log is2005-10-04 00:13:47.65 backupBACKUP failed to complete the command BACKUP DATABASE [MTUDD_GEMINI]TO DISK = N'd:sqldataMSSQLBACKUPMTUDD_GEMINI MTUDD_GEMINI_db_200510040013.BAK'WITH INIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMATI notice that the file name seems to have a space in it between thedatabase name and the end of the backup _db and a space also appears atthe end of the directory name.I can perform a backup successfully using the backup task under alltasks under the database via Enterprise Manager.Anyone seen this? Any suggestions other than backuping up the dbmanually, dropping the database, recreating it, and restoring it fromthe backup?-- Mark D Powell --
FYI: I've posted this on a couple of forums and haven't gotten any response. I hope someone here can help since this is way past due.
First I'll give a little background on our situation.
Log Shipping and Replication are out, so I am scripting a backup locally, an xcopy to a remote box, and then a restore.
In the early stages of this, I'm trying to do 3 databases. 2 of them work fine alone. It's when I add the 3rd one that I have a problem. I noticed that in the 2nd stored procedure that I probably need to take out the WITH REPLACE if I'm dropping it beforehand as well. I don't have time to test it on this box until later tonight. I don't think that's the issue because it was doing the same thing before I added the drop. I'm overwriting the .txt file so I don't have the exact error that it's giving. I believe it's something similar to "Server: Msg 11, Level 16, State 1, Line 0 General network error. Check your network documentation." I believe it also said [SQLSTATE 42000].
Now for the code. Props to Tara and the code she's put online.
Any help would be appreciated and I'll be glad to help answer questions related to what I've got.
CREATE PROC sp_backup_user_dbs3 AS SET nocount ON DECLARE @Now CHAR(14) -- current date in the form of yyyymmddhhmmss DECLARE @cmd SYSNAME -- stores the dynamically created DOS command DECLARE @Result INT -- stores the result of the dir DOS command DECLARE @RowCnt INT -- stores @@ROWCOUNT DECLARE @DBName SYSNAME DECLARE @filename VARCHAR(200) -- stores the path and file name of the BAK file DECLARE @loglogical VARCHAR(1000) DECLARE @datalogical VARCHAR(1000) DECLARE @restoreData VARCHAR(255) DECLARE @restoreLog VARCHAR(255) DECLARE @backupFile VARCHAR(255) DECLARE @physicalNameData VARCHAR(255) DECLARE @physicalNameLog VARCHAR(255) DECLARE @physicalNameDataStripped VARCHAR(255) DECLARE @physicalNameLogStripped VARCHAR(255) DECLARE @ExecStr NVARCHAR(4000) DECLARE @strSQL VARCHAR(1000) DECLARE @restoreToDataDir VARCHAR(255) DECLARE @restoreToLogDir VARCHAR(255) DECLARE @path VARCHAR(100) SET @path = 'I:ackupMoveTo14'
--we need to delete all the old backup files from the I:ackupMoveTo14 folder -- Build the del command SELECT @cmd = 'del ' + @path + '*.BAK' + ' /Q /F' --PRINT @cmd EXEC master..xp_cmdshell @cmd, NO_OUTPUT
CREATE TABLE #whichdatabase ( dbname SYSNAME NOT NULL )
INSERT INTO #whichdatabase ( dbname ) SELECT [name] FROM master.dbo.sysdatabases WHERE [name] IN ( 'db1', 'db2') ORDER BY [name] -- Get the database to be backed up SELECT TOP 1 @DBName = dbname FROM #whichdatabase SET @RowCnt = @@ROWCOUNT -- Iterate throught the temp table until no more databases need to be backed up WHILE @RowCnt <> 0 BEGIN SELECT @filename = @Path + '' + @DBName + '.BAK' BEGIN backup log @dbname WITH truncate_only END
-- Backup the database BACKUP database @DBName TO disk = @filename
DELETE FROM #whichdatabase WHERE dbname = @DBName
-- Get the database to be backed up SELECT TOP 1 @DBName = dbname FROM #whichdatabase SET @RowCnt = @@ROWCOUNT -- Let the system rest for 5 seconds before starting on the next backup WAITFOR delay '00:00:05' END
DROP TABLE #whichdatabase SET nocount OFF BEGIN SET @cmd = '' SET @cmd = 'xcopy I:ackupMoveTo14*.BAK \RemoteServer /C /Y' EXEC master.dbo.xp_cmdshell @cmd END BEGIN
EXEC [RemoteServer].master..usp_restoreDbsFromDir2 END RETURN 0 GO
3rd Step(the code for the usp_restoreDbsFromDir2 on the remote server):
-- Get files sorted by date SET @cmd = 'dir ' + @restoreDir + '*.BAK /OD'
CREATE TABLE #Dir (DirInfo VARCHAR(7000) ) -- Stores the dir results CREATE TABLE #BackupFiles (BackupDate varchar(10), BackupFileName nvarchar(1000) ) -- Stores only the data we want from the dir CREATE TABLE #RestoreFileListOnly ( LogicalName nvarchar(128), PhysicalName nvarchar(260), Type char(1), FileGroupName nvarchar(128), [Size] numeric(20,0), [MaxSize] numeric(20,0) )
INSERT INTO #Dir EXEC master.dbo.xp_cmdshell @cmd
INSERT INTO #BackupFiles SELECT SUBSTRING(DirInfo, 1, 10), SUBSTRING(DirInfo, LEN(DirInfo) - PATINDEX('% %', REVERSE(DirInfo)) + 2, LEN(DirInfo)) FROM #Dir WHERE ISDATE(SUBSTRING(DirInfo, 1, 10)) = 1 AND DirInfo NOT LIKE '%<DIR>%'
-- Get the newest file SELECT TOP 1 @bkpFile = BackupFileName FROM #BackupFiles ORDER BY BackupDate DESC
SET @rowCnt = @@ROWCOUNT
-- Iterate throught the table until no more databases need to be backed up WHILE @RowCnt <> 0 BEGIN
SET @cmd = @restoreDir + @bkpFile
INSERT INTO #RestoreFileListOnly EXEC('RESTORE FILELISTONLY FROM DISK = ''' + @cmd + '''')
--get the dbname from the bkpFile name --SET @strSQL = CHARINDEX('_db_', @bkpFile) --SET @dbname = LEFT(@bkpFile, @strSQL - 1)
SET @backupDisk = @restoreDir + @bkpFile SELECT @datalogical = LogicalName FROM #RestoreFileListOnly WHERE Type = 'D' SELECT @loglogical = LogicalName FROM #RestoreFileListOnly WHERE Type = 'L' SELECT @PhysicalDataPath = PhysicalName FROM #RestoreFileListOnly WHERE Type = 'D' SELECT @PhysicalLogPath = PhysicalName FROM #RestoreFileListOnly WHERE Type = 'L'
SELECT @strSQL = 'alter database ' + @dbname + ' set offline with rollback immediate' --alter database MyDatabase set offline with rollback immediate --PRINT @strSQL EXEC (@strSQL)
SELECT @strSQL = 'DROP database ' + @dbname --alter database MyDatabase set offline with rollback immediate --PRINT @strSQL EXEC (@strSQL)
In SQL Server 7.0 I right click on the database, select Tasks, Select backup, then indicate backup of database (complete) to tape. Overwrite (I put tape into NT Server), OK, then it says backup in progress and then I get the message shown in the subject...
Any advice please? I have backed up NT files on this tape before and have tried a second tape...
Hi Guys i have been trying so hard to get an answer for my problem but still havent found a solution Well my problem is i have got two tables table 1 Companyname id year volume_for_jan vol_for_feb.....vol_dec abc 1 2000 34 333 ......555 2 2000 33 22 666
table 2 Companyname id year volume_for_jan vol_for_feb.....vol_dec rrr 44 2001 55 66.............888 24 2001 22 35 454
each table has almost 800000 rows
I need to generate a report out of these tables which should be in the following format:
Company name Id Year Vol_for_jan Vol_for_feb......... abc 1 2000 34 33 2 2000 33 22 rrr 44 2001 55 66
How shall i do that???
I dont have any indexes on the tables coz there is no unique field!
Svr2: Windows 2003 R2 SP2 Standard IIS 6.0 SQL 2005 Standard SP2 WSUS 3.0 SP1 SCCM 2007 RTM
Svr2 query works fine, Srv1 query returns this error:
An error occurred when the report was run. The details are as follows: The query has been canceled because the estimated cost of this query (2147483647) exceeds the configured threshold of 100000. Contact the system administrator.
Error Number: -2147217900
Source: Microsoft OLE DB Provider for SQL Server
Native Error: 8649
This is the query language:
SELECT DISTINCT dbo.v_R_System.Netbios_Name0 AS [Machine Name], dbo.v_R_System.Resource_Domain_OR_Workgr0, dbo.v_GS_OPERATING_SYSTEM.Caption0 AS [Operating System Caption], dbo.v_R_System.Operating_System_Name_and0 AS [Operating System], dbo.v_GS_OPERATING_SYSTEM.Version0 AS [Operating System Version], dbo.v_GS_OPERATING_SYSTEM.CSDVersion0 AS [Service Pack Version], dbo.v_GS_COMPUTER_SYSTEM.Manufacturer0 AS [System Manufacturer], dbo.v_GS_COMPUTER_SYSTEM.Model0 AS [System Model], dbo.v_GS_PC_BIOS.SerialNumber0 AS [System Serial Number (if Available)], dbo.v_GS_PROCESSOR.MaxClockSpeed0 AS [Processor Speed (GHz)], dbo.v_GS_COMPUTER_SYSTEM.NumberOfProcessors0 AS [Number of Processors (or Cores)], dbo.v_GS_X86_PC_MEMORY.TotalPhysicalMemory0 AS [Memory (KBytes)], dbo.v_GS_LOGICAL_DISK.Size0 AS [Disk Space (MB)], dbo.v_GS_LOGICAL_DISK.FreeSpace0 AS [Free Disk Space (MB)], dbo.v_RA_System_IPAddresses.IP_Addresses0 AS [IP Address], dbo.v_RA_System_MACAddresses.MAC_Addresses0 AS [MAC Address], dbo.v_GS_PC_BIOS.Description0 AS [BIOS Description], dbo.v_GS_PC_BIOS.ReleaseDate0 AS [BIOS Release Date], dbo.v_GS_PC_BIOS.SMBIOSBIOSVersion0 AS [SM BIOS Version], dbo.v_GS_OPERATING_SYSTEM.WindowsDirectory0 AS [Windows Install Directory]
FROM dbo.v_R_System
INNER JOIN dbo.v_GS_OPERATING_SYSTEM ON dbo.v_GS_OPERATING_SYSTEM.ResourceID = dbo.v_R_System.ResourceID INNER JOIN dbo.v_GS_SYSTEM_ENCLOSURE ON dbo.v_GS_SYSTEM_ENCLOSURE.ResourceID = dbo.v_R_System.ResourceID INNER JOIN dbo.v_GS_COMPUTER_SYSTEM ON dbo.v_GS_COMPUTER_SYSTEM.ResourceID = dbo.v_R_System.ResourceID INNER JOIN dbo.v_RA_System_IPAddresses ON dbo.v_RA_System_IPAddresses.ResourceID = dbo.v_R_System.ResourceID INNER JOIN dbo.v_RA_System_MACAddresses ON dbo.v_RA_System_MACAddresses.ResourceID = dbo.v_R_System.ResourceID INNER JOIN dbo.v_GS_X86_PC_MEMORY ON dbo.v_GS_X86_PC_MEMORY.ResourceID = dbo.v_R_System.ResourceID INNER JOIN dbo.v_GS_PROCESSOR ON dbo.v_GS_PROCESSOR.ResourceID = dbo.v_R_System.ResourceID INNER JOIN dbo.v_GS_PC_BIOS ON dbo.v_GS_PC_BIOS.ResourceID = dbo.v_R_System.ResourceID INNER JOIN dbo.v_GS_LOGICAL_DISK ON dbo.v_GS_LOGICAL_DISK.ResourceID = dbo.v_R_System.ResourceID INNER JOIN dbo.v_FullCollectionMembership ON (dbo.v_FullCollectionMembership.ResourceID = v_R_System.ResourceID)
WHERE (dbo.v_GS_LOGICAL_DISK.DeviceID0 = 'C:') AND dbo.v_FullCollectionMembership.CollectionID = 'in00000f' Order by dbo.v_R_System.Netbios_Name0
I got this erorr when trying to create my stored proc,
What do i need to fix, and how do i fix it?!!
Msg 457, Level 16, State 1, Procedure PROC_DAILY_ACTIVITY, Line 13
Implicit conversion of char value to varchar cannot be performed because the collation of the value is unresolved due to a collation conflict.
Code Block set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go
-- ============================================= -- Author: <Zaccheus,Tenchy> -- Create date: <NOVEMEBER,12,2007> -- Description: <Reporting stored procedure,DAILY ACTIVITY,> -- ============================================= CREATE PROCEDURE [dbo].[PROC_DAILY_ACTIVITY] (@Region_Key int=null) AS BEGIN SELECT Region_Key, Null as Customer_Code, Non_Customer_Activities.Question_code, Non_Customer_Activities.Description, Region AS Region, Name AS Territory_Name, Non_Customer_Activities.Que_Desc AS Store_Name, Non_Customer_Activities.Logged_Time AS TheDate, Non_Customer_Activities.response AS Response, Null as is_Visit_Fg FROM [FSSRC].[dbo].Qry_Sales_Group Sales_Group INNER JOIN (Select QH.[question_code] ,Question_Header.Description ,CONVERT(datetime,DATEADD(day, (qh.cycle_day-1), p.start_date),6) Logged_Time ,SUBSTRING([entity_code],1,5) SR_Code ,[response] ,Territory_Code SR_Territory_Code ,'Not Customer Related' Que_Desc From question_history QH INNER JOIN Period P ON p.period_code = qh.period_code INNER JOIN [RC_DWDB_INSTANCE_1].[dbo].[Tbl_Territory_In_Sales_Responsible] as Territory_In_Sales_Responsible ON Territory_In_Sales_Responsible.SalesPerson_Purchaser_Code=SUBSTRING([entity_code],1,5) COLLATE Latin1_General_CI_AS INNER JOIN dbo.questions Question_Header ON Question_Header.question_code = QH.question_code WHERE [entity_code] like '%.USER%' AND Question_Header.Question_Code IN('AME01','ASE01','ACO01','ALU01','AOS01','APH01','ATR01','ATE01','ACR06','ACR05','ACR02','ACR03','ACR08','ACR07') AND CONVERT(datetime,DATEADD(day, (qh.cycle_day-1), p.start_date),6) = '11/9/2007' ) Non_Customer_Activities ON Sales_Group.Code = Non_Customer_Activities.SR_Territory_Code UNION ALL SELECT Customer_Activities.Customer_Code, NULL, NULL, Region AS Region, Name AS Territory_Name, Customer_Activities.Customer_Name AS Store_Name, Customer_Activities.Logged_Time AS TheDate, NULL AS Response, is_Visit_Fg FROM [FSSRC].[dbo].Qry_Sales_Group Sales_Group INNER JOIN (Select distinct time_log Logged_Time ,[entity_code] Customer_Code ,[name] Customer_Name ,Territory_Code Cust_Territory_Code ,MAX(is_Visit_Fg) Is_Visit_Fg From question_history QH INNER JOIN Period P ON p.period_code = qh.period_code INNER JOIN dbo.questions Question_Header ON Question_Header.question_code = QH.question_code INNER JOIN [FSSRC].[dbo].[customer] ON Entity_Code = [customer_code] INNER JOIN [FSSRC].[dbo].[visit] V ON V.[customer_code] = QH.[entity_code] AND V.[period_code] = QH.[period_code] AND V.[cycle_day] = QH.[cycle_day] INNER JOIN [RC_DWDB_INSTANCE_1].[dbo].[Tbl_Territory_In_Sales_Responsible] as Territory_In_Sales_Responsible ON Territory_In_Sales_Responsible.SalesPerson_Purchaser_Code=[sales_person_code] COLLATE Latin1_General_CI_AS WHERE [entity_code] NOT like '%.USER%' AND Convert(datetime,convert(Varchar,time_log,110)) = '11/9/2007'
GROUP BY time_log ,[entity_code] ,[name] ,Territory_Code ) Customer_Activities ON Sales_Group.Code = Customer_Activities.Cust_Territory_Code WHERE @Region_Key=Region_Key order by 4 END
SQL Server 2005 version: 2153 I created a maintplan for system and user databases includes rebuild index, maint cleanup tasks.
Job is failing for user databases It includes rebuild index task( online index enabled) and maintenance cleanup task, scheduled at every sunday 1 AM.
I receive following errors:
In eventvwr log
sql server scheduled job 'DBMP_RebuildIndex_User' status: failed-Invoked on 2007-12-02 -1:00 Message: The job failed. The job was invoked by schedule 8 ('DBMP_RebuildIndex_User-Schedule).The last step to run was step1 ('DBMP_RebuildIndex_User')[/red]
In log report:
Failed-1073548784) Excuting the query "ALTER INDEX [XPKact_log] ON [dbo].[act log] REBUILD WITH (PAD_INDEX=OFF, STATISTICS_NORECOMPUTE=OFF,ALLOW_ROW_LOCKS=ON,ALLOW_PAGE_LOCKS=ON,SORT_IN_TEMPDB=OFF,ONLINE=ON) "failed with the following error "Online index operation cannot be performed for index 'XPKact_log' because the index contains column 'action_desc' of data type text, ntext.image.varchar(max),varbinary(max) or xml. For non clusterd index the column could be an include column of the index. for clusterd index it could be any column of the table .Incase of drop_existing the cloumn could be part of new or old index. The operation must be performed offline". Possible failure reasons : Problems with the querey .'" Resultset" property not set correctly, parameters not set correctly, or connection not established correctly.
Please anyone help me on this? I really appriciate
Reorganize Index job is failing for user databases
Log Report says: Failed (-1073548784) Executing the query 'ALTER INDEX [ams_1v11_alerts_groupcount] ON [dbo].[ams_1v11_alerts] REORGANIZE WITH (LOB_COMPACTION=ON)
"failed with the following error:"The index"ams_1v11_alerts_groupcount" (partition 1) on table "ams_1v11_alerts" cannot be reorganized because page level locking is disabled.".possible failure reasons:Problems with the query ,"ResultSet" property not set correctly, parameters not set correctly, or connection not estabilished correctly.
I have already running REBUILD INDEX job every suday 1 AM.
Please advice is it necessary to run both REORGANIZE INDEX and REBUILD INDEX ???
HI, I current have two 2005 boxes running 9.0.3050 in different DMZ with the source running a DTS to drop and copy its tables to the source every night. It was working up until last thursday. Nothing has changed in the FW rules and getting no errors. One is 3.5GB which copies fine, the other is 21GB and runs all night with only getting a fraction of the tables populated. I'm the hardware guy, but have some understanding w/ sql. Thanks in advance for any help.
SQL Server 2005 version: 2153 I created a maintplan for system and user databases includes rebuild index, maint cleanup tasks.
Job is failing for user databases It includes rebuild index task( online index enabled) and maintenance cleanup task, scheduled at every sunday 1 AM.
I receive following errors:
In eventvwr log
sql server scheduled job 'DBMP_RebuildIndex_User' status: failed-Invoked on 2007-12-02 -1:00 Message: The job failed. The job was invoked by schedule 8 ('DBMP_RebuildIndex_User-Schedule).The last step to run was step1 ('DBMP_RebuildIndex_User')[/red]
In log report:
Failed:(-1073548784) Excuting the query "ALTER INDEX [XPKact_log] ON [dbo].[act log] REBUILD WITH (PAD_INDEX=OFF, STATISTICS_NORECOMPUTE=OFF,ALLOW_ROW_LOCKS=ON,ALLOW_PAGE_LOCKS=ON,SORT_IN_TEMPDB=OFF,ONLINE=ON) "failed with the following error "Online index operation cannot be performed for index 'XPKact_log' because the index contains column 'action_desc' of data type text, ntext.image.varchar(max),varbinary(max) or xml. For non clusterd index the column could be an include column of the index. for clusterd index it could be any column of the table .Incase of drop_existing the cloumn could be part of new or old index. The operation must be performed offline". Possible failure reasons : Problems with the querey .'" Resultset" property not set correctly, parameters not set correctly, or connection not established correctly.
Please anyone help me on this? I really appriciate
I installed VS 2005, but the optional component SQL Express is failing. The log says "SQL Express installation stopped due to unexpected errors". Can some one help me out how to resolve this issue?
Fresh install of Server 2003 R2 Enterprise with SP2 slipstreamed. Fresh install of SQL Server 2005 Enterprise RTM. Manual install of SQL Server 2005 SP2, Database Engine failed. Uninstall SQL Server 2005, Database Engine failed to uninstall ("Fatal error during installation.").
This is on a DC, and still failes to uninstall after a reboot.
Ideas on how I can clean this up without a format ?
Log Snip:
GetServiceUserGroup failed for MSSQLSERVER, 5 Error Code: 0x80070534 (1332) Windows Error Text: No mapping between account names and security IDs was done. Source File Name: sqlcasqlcax.cpp Compiler Timestamp: Wed Sep 21 01:10:12 2005 Function Name: SetInstanceProperty Source Line Number: 1196
Error Code: 1332 MSI (s) (74!34) [20:09:48:406]: Product: Microsoft SQL Server 2005 -- Error 29528. The setup has encountered an unexpected error while Setting Internal Properties. The error is: Fatal error during installation. Error 29528. The setup has encountered an unexpected error while Setting Internal Properties. The error is: Fatal error during installation.
Sql 2005 Enterprise fails to install on a 64 bit VmWare Windows 2003 virtual server. All componets install up to including the Reporting services. The next componet (I believe it is the management studio portion) fails to install. I have moved the install files to the local machine and this did not help. If someone knows how to fix this please share.
I keep getting a failure when trying to run my agent which is trunning an SSIS 2005 package. I have checked the logins and appear to have given the right logins owner to the msdb database and my other databases but still getting this error:
03/09/2006 10:13:31,Run EBN Process,Error,0,BG-22SQL,Run EBN Process,(Job outcome),,The job failed. The Job was invoked by User domainmyuserid. The last step to run was step 1 (Run EBN SSIS Package).,00:00:02,0,0,,,,0 03/09/2006 10:13:31,Run EBN Process,Error,1,BG-22SQL,Run EBN Process,Run EBN SSIS Package,,Executed as user: domainaccount_we_setup_to_run_all_sql_services_on_this_server. The package execution failed. The step failed.,00:00:02,0,0,,,,0
Is it the package that is failing or permission issue?
I don't know where to turn to. [Setup has detected a problem with Microsoft .Net Framework installation and cannot proceed. Microsoft .Net Framwork is either not installed on this system or is corrupt.]
I'm going around in circles (for days and I'm furious...sorry!)
I've a new laptop with Vista Home Premium and trying to install VS 2005 together with SQL 2005 Express. I got VS2005 installed (told me issues with SQL Express so failed on that part of it). Installed Service packs for VS2005 then a service pack for VS2005 on Vista. Tried to install SQLEXPR_ADV.exe (newest SQL 2005 with advanced features and came upon the above message).
I just don't know what to do next...this is my 10th day at trying to get something to work with this operating system.
I have a "merge" publication created, with only Procedures, Views and Functions. (Note I have other merge publications that replicate the tables from the same database). I keep getting the same error (see -below) on various procedures. I cannot find anything wrong with the procedures themselves. I also checked the offending procedure by removing it from the publication and compiling it in the database...it works fine. None of my other publications (all tables) encounter this error. * I have 3 others.
My version of SQL is 9.00.1399.06
Here is the message I am getting. Any help would be greatly appreciated. Note I changed the proc name due to client restrictions.
Message: StartIndex cannot be less than zero. Parameter name: startIndex Command Text: select 'number' = convert(int, 0), 'definition' = definition from sys.sql_modules where object_id = object_id(@qualified_object_name) union all select 'number' = convert(int, procedure_number), 'definition' = definition from sys.numbered_procedures where object_id = object_id(@qualified_object_name) Parameters: @qualified_object_name = [dbo].[pra_merge]
Stack: at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithOptionalResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate, Int32 queryTimeout, CommandBehavior commandBehavior) at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithOptionalResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate, CommandBehavior commandBehavior) at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.TextModeOnObjectScripter.Script() at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateNonTableArticleSchScript(Scripter scripter, BaseArticleWrapper articleWrapper, SqlSmoObject smoObject, Boolean quotedIdentifierOn, Boolean ansiNullsOn, Boolean textMode) at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateStoredProcedureArticleScripts(ArticleScriptingBundle articleScriptingBundle) at Microsoft.SqlServer.Replication.Snapshot.MergeSmoScriptingManager.GenerateArticleScripts(ArticleScriptingBundle articleScriptingBundle) at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateObjectScripts(ArticleScriptingBundle articleScriptingBundle) at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.DoScripting() at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.DoScripting() at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.DoScripting() at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot() at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun() at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQLServer, Error number: 52006) Get help: http://help/52006
Source: mscorlib Target Site: System.Text.StringBuilder Remove(Int32, Int32) Message: StartIndex cannot be less than zero. Parameter name: startIndex Stack: at System.Text.StringBuilder.Remove(Int32 startIndex, Int32 length) at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.TextModeOnObjectScripter.ProcessGetObjectScriptResult(SqlDataReader dataReader) at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithOptionalResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate, Int32 queryTimeout, CommandBehavior commandBehavior) (Source: mscorlib, Error number: 0)
I have been struggling with a problem for the last couple days now regarding MSTD and distributed transactions. The main issue is that 3 servers are each sitting in a different domain. Non of the domains trust each other.
As of yesterday, I could get all the SQL 2005 chatting to each other using MSDTC without a problem. However, I have a SQL 2000 box which refuses to work. A normal query across a linked server works fine. A distributed transaction will not work. This is the case from A to B and B to A.
I have tested with DTCPing and it says all is ok.
The error messages are:
SQL 2000 > SQL 2005
OLE DB provider "SQLNCLI" for linked server "T-ServerTServer" returned message "No transaction is active.".
Msg 7391, Level 16, State 2, Line 2
The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "T-ServerTServer" was unable to begin a distributed transaction.
And the other way round:
[OLE/DB provider returned message: New transaction cannot enlist in the specified transaction coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransaction returned 0x8004d00a].
Msg 7391, Level 16, State 1, Line 2
The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction.
If watching the DTC monitor, it shows an active transaction then goes back to 0.
All instances are on a 4 node cluster with 3 nodes turned off for the testing.
I have run out of things to try. Most of the symptoms for the above messages are to do with DTC security, the Turn RPC Security Off reg hack. All instances and OS (W2K3) are the latest updates / patches.
As for the 3rd server, SQL 2005, it is happy to talk
Anybody got a gem which I can try?
Edit: Both SQL 2005 servers are x64 while the 2000 is x86
I am tying to set up an SQL 2005, SP1 failover cluster on a new set of hardware. Everytime I try to run the install, I get this error
TITLE: Microsoft SQL Server 2005 Setup ------------------------------
Setup failed to start on the remote machine. Check the Task scheduler event log on the remote machine.
I've gone through this doc (http://msdn2.microsoft.com/en-us/library/ms189910.aspx) and checked all of the applicable cautions:
I don't have an antivirus package running.
All of the SQL setup pre-checks run fine.
I have a SQL Group created, with the shared drive as a resource.
NBT is disabled on both heartbeat NIC's.
NBT is explicitly enabled on both external NIC's.
While I do have DDNS running, just to be safe I've pre-created an A record for my SQL VR.
Both nodes are registered in DNS and Setup correctly finds the second node.
In the Application event log on the second node (the one failing...), I get MSI Installer 'Install Started' successes (and sometimes I even get "Product: Microsoft SQL Server 2005 -- Installation completed successfully.")
I am running the install as myself, a Domain Admin and am explicitly added to the Administrators group on both servers.
Remote Registry is running.
Task Scheduler is running.
There is plenty of space everywhere.
All of the Admin shares are enabled.
The node I am running the install from is the owner of all of the cluster groups and resources:
Cluster group
MSDTC group
SQL group
This is all that is in my setup log:
Microsoft SQL Server 2005 9.00.1399.06 ============================== OS Version : Microsoft Windows Server 2003 family, Enterprise Edition Service Pack 2 (Build 3790) Time : Tue Nov 06 16:45:52 2007
Task did not appear to start on machine: \ERLEW01B: 267013
I'm at a total loss and I'm getting very frustrated...
I'm trying to upgrade an existing installation of SSE 2005 to SSE 2005 with Advanced Services SP1 so I can take advantage of Reporting Services. I'm installing on a box that has XP Pro SP2 installed. As prompted by the SSE setup, I had to install IIS. After installing IIS, the setup went along okay until it came time to configure the report server. I chose the default (configure with the default configuration) and I get the following error message:
TITLE: Microsoft SQL Server Setup ------------------------------
SQL Server Setup failed to obtain system account information for the ASPNET account. To proceed, reinstall the .NET Framework, and then run SQL Server Setup again.
For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=setup.rll&EvtID=SQLSetup90&EvtType=28126
------------------------------ BUTTONS:
OK ------------------------------
Anybody know what is causing the error and how to fix it? I tried the above link and it didn't provide any helpful information. Do I really need to reinstall the .Net Framework (I'm hoping not)? Any help would be greatly appreciated.