I keep getting an exception when trying to cast an output param as a float type. the SPROC is marked as float OUTPUT and the Cost column in the database is a float type as well. And there are no nulls in the cloumn either. here is how my code looks:
SqlParameter prmCost= new SqlParameter("@Cost", SqlDbType.Float,8); prmCost.Direction=ParameterDirection.Output; cmd.Parameters.Add(prmCost);
//...blah blah blah
//invalid cast gets throw on here (it happens with all my float types) productDetails.Cost=(float)prmCost.Value;
Not sure if there's a GP 8.0 forum, so giving this one a go.
I've added an AFTER UPDATE trigger to the RM00101 table (customer master) in a Great Plains 8.0 SQL Server 2000 SP4 DB. The trigger assigns field values to variables, constructs an update query, and executes the query on a table in a linked SQL Server 2005 DB.
The trigger works fine when fired as a result of a direct field update made through Enterprise Manager. However, when the same update is made through the Great Plains GIU (customer card window), an exception error is thrown:
"Unhandled database exception: A Save operation on table €˜RM_Customer_MSTR€™ failed accessing SQL data
EXCEPTION_CLASS_DB DB_ERR_SQL_DATA_ACCESS_ERR€?
The odd thing is that if I drop the trigger from the RM00101 table, the exception error still occurs. Not just on the record originally updated, but on all records and all fields within the record.
Code for the trigger follows:
SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO
CREATE TRIGGER CTrig_Logic_Update_Customer ON RM00101
AFTER UPDATE AS
IF UPDATE(CUSTNMBR) or UPDATE(CUSTCLAS) or UPDATE(CNTCPRSN) or UPDATE(STMTNAME) or UPDATE(SHRTNAME) or UPDATE(TAXSCHID) or UPDATE(ADDRESS1) or UPDATE(ADDRESS2) or UPDATE(ADDRESS3) or UPDATE(CITY) or UPDATE(STATE) or UPDATE(ZIP) or UPDATE(PHONE1) or UPDATE(FAX) or UPDATE(SLPRSNID) or UPDATE(PYMTRMID) or UPDATE(PRCLEVEL) or UPDATE(SALSTERR) or UPDATE(INACTIVE) or UPDATE(HOLD) or UPDATE(CRLMTAMT)
BEGIN
DECLARE @Server_Name Varchar(25), @Logic_DB_Name Varchar(25), @SQLStr nvarchar(1000), @CustomerN int, @SICCode int, @ARContact Varchar(35), @LongName Varchar(50), @CustomerName Varchar(24), @SalesTaxCode Int, @AddrLine1 Varchar(40), @AddrLine2 Varchar(40), @AddrLine3 Varchar(40), @City Varchar(30), @StateProv Varchar(4), @PostalCode Varchar(15), @TelephoneN Varchar(25), @FaxTelephoneN Varchar(25), @SalespersonN Int, @TermsCode Varchar(60), -- Put the customer terms into the CommentN1 field @CustRateSched Int, @SalesAreaCode Int, @InactivePurge Tinyint, @CreditStatus Tinyint, @CreditLimit Int
------- Get the new Customer data from Inserted table
SELECT @CustomerN = CAST(RTRIM(i.CUSTNMBR) as Integer), @SICCode = ISNULL((SELECT Dex_Row_ID FROM RM00201 WHERE RM00201.CLASSID = i.CUSTCLAS),0), @ARContact = RTRIM(i.CNTCPRSN), @LongName = RTRIM(i.STMTNAME), @CustomerName = RTRIM(i.SHRTNAME), @SalesTaxCode = ISNULL((SELECT Dex_Row_ID FROM TX00101 WHERE TX00101.TAXSCHID = i.TAXSCHID),0), @AddrLine1 = RTRIM(i.ADDRESS1), @AddrLine2 = RTRIM(i.ADDRESS2), @AddrLine3 = RTRIM(i.ADDRESS3), @City = RTRIM(i.CITY), @StateProv = RTRIM(LEFT(i.STATE,2)), @PostalCode = RTRIM(i.ZIP), @TelephoneN = RTRIM(LEFT(i.PHONE1,10)), @FaxTelephoneN = RTRIM(LEFT(i.FAX,10)), @SalespersonN = RTRIM(i.SLPRSNID), @TermsCode = RTRIM(i.PYMTRMID), @CustRateSched = RTRIM(i.DEX_ROW_ID), @SalesAreaCode = ISNULL((SELECT Dex_Row_ID FROM RM00303 WHERE RM00303.SALSTERR = i.SALSTERR),0), @InactivePurge = i.INACTIVE, @CreditStatus = i.HOLD, @CreditLimit = i.CRLMTAMT FROM inserted i
------- Get Logic server name and database name
SELECT @Server_Name = RTRIM(l.Server_Name), @Logic_DB_Name = RTRIM(l.Logic_DB_Name) FROM tbl_Logic_DB l
------- Insert new Customer record into Logic database
I have a dataset with 500,000 records and I'm getting the following error with ReportViewer control for local report. "An error has occurred during local report processing. An error has occurred during report processing. Exception of type System.OutOfMemoryException was thrown. any help with this would be highly appreciated.
WHEN 'DAYS' THEN DATEDIFF(dd, CHECKOUT_TS, GETDATE())
ELSE DELIVER_ID END
FROM REQUEST
If @sortcolumn has 'DATE' or 'DAYS' it runs fine....any other value, I get an exception "Conversion failed when converting datetime from character string". All columns except CHECKOUT_TS are of type varchar.
I have a SSRS report that parses RTF to TXT and displays it in a report.  The report works fine and everything displays correctly.  The subscription email, however, contains a report with errors: Request for the permission of type 'System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0, Culture= neutral,PublicKeyToken=b77a5c561934e089' failed.The report contains embedded code as well as references to System.Security and System. Windows. Forms.  I've updated .....Reporting ServicesReportServer ssrvpolicy.config and ....Reporting ServicesReportManager smgrpolicy.config to change permissions to FullTrust.
Hello, I got an exception when I try to load/run a SSIS Package programmatically on the server using remoting. The client machine has no SQL Server 2005 component installed..
This is the error I get from my exe application:
Microsoft.SqlServer.Dts.Runtime.DtsPipelineException: Retrieving the COM class factory for component with CLSID {E44847F1-FD8C-4251-B5DA-B04BB22E236E} failed due to the following error: 80040154. ---> System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {E44847F1-FD8C-4251-B5DA-B04BB22E236E} failed due to the following error: 80040154. at Microsoft.SqlServer.Dts.Runtime.Application..ctor()
And this the Remote component:
<Serializable()> Public Class SSISComponent
Inherits MarshalByRefObject
Public Function LaunchPackage(ByVal sourceLocation As String, ByVal serverName As String, ByVal packageName As String, ByVal packageVariables As SortedList) As Microsoft.SqlServer.Dts.Runtime.DTSExecResult
Dim packagePath As String Dim myPackage As Package Dim integrationServices As New Application ' Combine path and filename. packagePath = Path.Combine(sourceLocation, packageName) Try If integrationServices.ExistsOnDtsServer(packagePath, serverName) Then myPackage = integrationServices.LoadFromDtsServer(packagePath, serverName, Nothing) Else Throw New ApplicationException( "Invalid package name or location: " & packagePath) End If If Not packageVariables Is Nothing Then For Each de As DictionaryEntry In packageVariables myPackage.Variables(de.Key).Value = de.Value Next End If LaunchPackage = myPackage.Execute() Catch ex As Exception Throw End Try End Function End Class
This is the code that call the remote component to run the package on the Server: Public Class Test Private Function LoadAndRunPackageRemotly(ByVal PackageName As String, ByVal PackageVariables As SortedList) As Boolean
Dim launchPackageService As New SSISComponent Dim packageResult As Microsoft.SqlServer.Dts.Runtime.DTSExecResult Try packageResult = launchPackageService.LaunchPackage(Me.SSISPackageLocation, Me.SSISServerName, PackageName, PackageVariables) If packageResult = DTSExecResult.Success Then LoadAndRunPackageRemotly = True Else LoadAndRunPackageRemotly = False End If Catch ex As Exception Throw End Try End Function End Class
I would like to inform that everything run inside a thread because the Package do a lot of things... When I build up the setup for the exe inside the Detected Dependencies there are several DLL related to SQL Server (Microsoft.SQLServer.DTSRuntimeWrap.dll etc..etc..) that I don't register .. Tis could be the problem? If yes, somebody can tell me which one I have to register ? as COM or COMRelativePath? Some other hints?
This error could be also caused by wrong permissions on the ssis? Thank you very much for any help... p.s. To use sql server agent will be my last option!! Marina b.
I have a win.forms application part of functionality of which is to show rdlc report. When I try to launch the application it says that ReportViewer assembly is missing, which was expected. When I downloaded and try to install viewer runtime from here: [URL] .....
I receive that Microsoft SQL Server System CLR Types are not installed and must be installed first. I downloaded appropriate installation from [URL] .... and it installed successfully. But when I try to run viewer runtime installation it still says that Microsoft SQL Server System CLR Types are not installed. What do I miss?
I'm looking into why a particular report is running very slowly. I call the stored proc which populates the report from query analyzer and request get an execution plan. Runtime is ~12mins
When I take the code inside the stored proc and convert it to inline code (change the parameter declarations to declare statements and procedure call parameters to set statements) and request an execution plan, the runtime is 10 seconds. The results returned are identical.
Comparing the execution plans shows the difference to lie in the SP using one index (returns 100m rows) and the inline code using another (2.5k rows). Apart from this index and the cost for some elements changing by a couple of percentage points the execution plans look very similar.
I've held off pasting the table schema and stored proc in here due to size.
One thing I'd hoped would help, but which didn't make an appreciable change, was to call the stored proc 'with recompile' in case the issue was an old execution plan.
Any suggestions how to stop the query planner making this 'bad' choice? Even some clue as to the source of the difference between the two functionally identical pieces of code might help.
When I run my report from within visual studio 2005 it generates just fine.
However, when I run the report from the reporting services local web site I get the following error. What do I need to do to fix this (temporarily turning off .net security uusing caspol didn't work).
An error occurred while executing OnInit: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed
When running a step within my DTS package I'm receiving the following error - "Provider generated code execution exception: "EXCEPTION_ACCESS_VIOLATION".
I think it may be something to do with my global variable, but I'm not sure as I'm pretty certain I've set it all up correctly.
Hi I am using Oledb Provider for Db2 from IBM. (There is another one from microsoft) Through this provider I am constructing a oledb connection manager.
This connection manager I am Using in Oledb Source adapter. Now when I set Data Access mode as Table or view I Am able to preview the data.
But when I use Data Access Mode as SQL Command try to preview I get this Error
TITLE: Microsoft Visual Studio ------------------------------ Error at s_NEWMAPPING10 [EMP [1]]: An OLE DB error has occurred. Error code: 0x80040E21. ------------------------------ ADDITIONAL INFORMATION: Exception from HRESULT: 0xC0202009 (Microsoft.SqlServer.DTSPipelineWrap) ------------------------------ BUTTONS: OK ------------------------------
Hello. You can compile a proc with a non-existant table. proc compiles do fail though on exsiting tables with non-existing columns.
Anyways, question is, how can you scan thru all procedure code to find tables that do not exist in the database? Is there any new DM feature that provides this info? Meaning, if I have a proc and inside it, refer to a table name that does not exist, I want to know the proc will not execute clean. Can the deferred name resolution be turned off somehow?
Greetings everyone, I am attempting to build my first application using Microsofts Sql databases. It is a Windows Mobile application so I am using Sql Server Compact 3.5 with Visual Studio 2008 Beta 2. When I try and insert a new row into one of my tables, the app throws the error message shown in the title of this topic. '((System.Exception)($exception)).Message' threw an exception of type 'System.NotSupportedException'
My table has 4 columns (i have since changed my FavoriteAccount datatype from bit to Integer) http://i85.photobucket.com/albums/k71/Scionwest/table.jpg
Account type will either be "Checking" or "Savings" when a new row is added, the user will select what they want from a combo box.
Next is a snap shot of my startup form. http://i85.photobucket.com/albums/k71/Scionwest/form.jpg
Where it says "Favorite Account: None" in the top panel, I am using a link label. When a user clicks "None" it will go to a account creation wizard, and set the first account as it's primary/favorite. As more accounts are added the user can select which will be his/her primary/favorite. For now I am just creating a sample account when the label is clicked in an attempt to get something working. Below is the code used.
account.FavoriteAccount = 1;//datatype is an integer, I have changed it since I took the screenshot.
financesDataSet.BankAccount.Rows.Add(account); //The next three lines where added while I was trying to get this to work. //I don't know if I really need them or not, I receive the error regardless if these are here or not.
catch (global:ystem.InvalidCastException e) { //Stops at the following line, this error was caused by 'if (this.financesDataSet.BankAccount[num].FavoriteAccount == 1)'
throw new global:ystem.Data.StrongTypingException("The value for column 'FavoriteAccount' in table 'BankAccount' is DBNull.", e);
I have no idea what I am doing wrong, all of the code I used I retreived from Microsofts help documentation included with VS2008. I have tried used my TableAdapter.Insert() method and it still failed when it got to
if (this.financesDataSet.BankAccount[num].FavoriteAccount == 1)
in my refreshDatabase() method it still failed.
When I look, the data has been added into the database, it's just when I try to retreive it now, it bails on me. Am I retreiving the information wrong?
hi have written SSIS script and i am using script component to Row count below my code what i have written. and i am getting error below i have mention...after code see the error using System;
} the error Script component has encountered an exception in user code Object is not an ADODB.RecordSet or an ADODB.Record. Parameter name: adodb at System.Data.OleDb.OleDbDataAdapter.FillFromADODB(Object data, Object adodb, String srcTable, Boolean multipleResults) at System.Data.OleDb.OleDbDataAdapter.Fill(DataTable dataTable, Object ADODBRecordSet) at ScriptMain.CreateNewOutputRows() at UserComponent.PrimeOutput(Int32 Outputs, Int32[] OutputIDs, PipelineBuffer[] Buffers) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
When running the package in VisualStudio it runs properly, but if I let this package run as part of an SQL-Server Agent job, I got the message "The script threw an exception: Exception of type 'System.OutOfMemoryException' was thrown." on my log and the package ends up with an error.
Both times it is exactly the same package on the same server, so I don't know how the debug or even if there is anything I need to debug?
I am having a Data flow task in For each loop which will gets 100 sourcetable names and 100 target table names...
am having a simpleData flow task which trasferes from OLEDBSource to OLEDBDestination. I am repeating the Dataflow task which transfers from sourcetablename extracted from for loop to a destination table var.
The problem am gettting is for the first table it is able to transfer correcly because I did mapping for those tables at design time...but for the next coming sourcetable-desttable (which r having different no of cols,datatypes) its giving Validation failed...and...needs to refresh metadata....
is there any way to refresh the metadata of Data flow task (I set the property of OLEDBSource validate external meta to false then also same error is coming)
Hi,I'm trying to execute server-side trace with SqlServer 2000 oncluster. After scripting trace by Profiler I executed this script inQueryanalyzer and got error code 12. According to BOL this code saysthat file is not created but I don't know why, is there are anyobstacles which preventing to add this trace??Does anybody had that problem?If it helps I added script which I tried to execute:-- Create a Queuedeclare @rc intdeclare @TraceID intdeclare @maxfilesize bigintset @maxfilesize = 5exec @rc = sp_trace_create @TraceID output, 0, N'C:Profiler_result esult.trc', @maxfilesize, NULLif (@rc != 0) goto error-- Client side File and Table cannot be scripted-- Set the eventsdeclare @on bitset @on = 1exec sp_trace_setevent @TraceID, 10, 1, @on/*here are n-setevents*/exec sp_trace_setevent @TraceID, 43, 35, @on-- Set the Filtersdeclare @intfilter intdeclare @bigintfilter bigintexec sp_trace_setfilter @TraceID, 1, 1, 6, N'history'exec sp_trace_setfilter @TraceID, 1, 1, 6, N'move_history'exec sp_trace_setfilter @TraceID, 10, 0, 7, N'SQL Profiler'exec sp_trace_setfilter @TraceID, 35, 1, 6, N'kis'-- Set the trace status to startexec sp_trace_setstatus @TraceID, 1-- display trace id for future referencesselect TraceID=@TraceIDgoto finisherror:select ErrorCode=@rcfinish:goThanks in advance for any adviceRegards,Bartolo
I have three script component A,B, C. A reads certain data from a table. B inserts records into a .txt file when the recordtype = 1. C inserts records into same .txt file when the recordtype = 0. Now I receive a script comp error for C as follows.
at System.IO.StreamWriter.CreateFile(String path, Boolean append)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append)
at ScriptComponent_6bda9d13fce34f90ac6315546c8d0d54.ScriptMain.PreExecute() in dts://Scripts/ScriptComponent_6bda9d13fce34f90ac6315546c8d0d54/ScriptMain:line 19
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PreExecute()
I have OLE DB Connection to Access database using Jet 4.0 provider. I have a data flow task in package. In this data flow task, I have an OLE DB source. This source uses above mentioned connection.
When this data flow task is not a part of transaction, it works fine. But when I set "TransactionOption" property to "Required", the OLE DB source returns following error. [OLE DB Source [1]] Error: The AcquireConnection method call to the connection manager "databasename" failed with error code 0xC001A004.
I have checked Distributed Transaction Cordinator running. I have some other package running fine which uses transactions but does have OLE DB source.
I have also tried setting "RetainSameConnection" property of a connection to TRUE. But still it is failing.
In short, I am not able to execute OLE DB source in side transaction.
When I call DeriveParameters against a function written in SQLCLR function it throws an exception. I've been working on this a little while and haven't found a fix. I understand that I could write additional code to do the same work DeriveParameters does, but it seems like this should work.
This is the exception thrown:
[InvalidOperationException: The stored procedure 'GSI.Utils.IsMatch' doesn't exist.]
The function is defined as
CREATE FUNCTION [Utils].[IsMatch](@Value [nvarchar](4000), @RegularExpression [nvarchar](4000)) RETURNS [bit] WITH EXECUTE AS CALLER AS EXTERNAL NAME [RegularExpressionsHelper].[UserDefinedFunctions].[IsMatch]
The C# function is defined as:
[Microsoft.SqlServer.Server.SqlFunction(IsDeterministic=true)] public static SqlBoolean IsMatch(SqlString Value, SqlString RegularExpression) { Regex rx = new Regex( RegularExpression.ToString() ); string s = Value.ToString();
return new SqlBoolean(rx.IsMatch(s)); }
This is the code I'm using to call DeriveParameters:
static void Main(string[] args) { using (SqlConnection conn = new SqlConnection(m_GetConnectionString())) { conn.Open();
I found that DeriveParameters seems to call sp_procedure_params_managed and when I call it myself it returns the parameters correctly for T-SQL functions, but returns no records when I specify a SQLCLR function.
I'm able to execute the function without issue and I'm able to use DeriveParameters against everything in the database except C# based functions (and I've tried others besides IsMatch). I'm attempting to run DeriveParameters from a console application and from ASP.NET, both running .NET 2.0.
I've experienced the same behavior in these versions:
SQL Server 2005 Enterprise Edition RTM (MSDN Image on Virtual Server) SQL Server 2005 Enterprise Edition SP1 (MSDN Image on Virtual Server) SQL Server 2005 Enterprise Edition SP1 + Hotfix kb918222 (MSDN Image on Virtual Server) SQL Server 2005 Developer Edition SP1
I copied the MSDN setup DVD content to a local drive from USB DVD drive. Started the setup process; accepted the EULA and setup installed the SQL Native Client and Setup Support Files successfully. During System Configuration Checks, the process raises the following dialog:
--------------------------- System.Runtime.InteropServices.SEHException: External component has thrown an exception.
I call the datareader using a sqlCommand that I programmatically build and it accesses the database fine. I can use the exact SQL command that I generate and I can get a result when i run it in SQL Management Studio. When I run the application and try to access the datareader, it throws an exception whose message is quite frustratingly, <column name>, or in this case "image_URL". Anyone have any idea what might be causing such an ambiguous error?
I am using VWD2005 and SQLExpress 2005. In web.config I define the connection:<connectionStrings> <add name="ProFeeRevenueUser" connectionString="Data Source=.SQLEXPRESS;AttachDBFilename=|DataDirectory|ProFeeRevenue.mdf; Initial Catalog=ProFeeRevenue;User Id=whomever;Password=whatever" providerName="System.Data.SqlClient"/> When I try this code in a class (util.cs), I get an error on trying to open the connection:System.Data.SqlClient.SqlConnection cn = new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["ProFeeRevenueUser"].ConnectionString); System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand("usp_UserSystemRolesListByUser", cn);System.Data.SqlClient.SqlDataReader dr; try {cmd.CommandType = System.Data.CommandType.StoredProcedure; System.Data.SqlClient.SqlParameter retValParm = cmd.Parameters.Add("@RowCount", System.Data.SqlDbType.Int);retValParm.Direction = System.Data.ParameterDirection.ReturnValue;cmd.Parameters.AddWithValue("@UserLogin", userLogin); cn.Open(); // error occurs here <<---------------------------- dr = cmd.ExecuteReader();if (dr.HasRows) {while (dr.Read() == true) {string MyRole = dr[1].ToString().Trim(); SystemRoles.Add(MyRole); } dr.Close(); } It works fine if I point to a SQL server database on my server, but not with SQLExpress, so I assume I have done something wrong with the connection string or the SQL Express database. Any ideas?
Hi ,I have this querypaprojnumber is varcharpatx500 is textpalineitemseq is intselect Paprojnumber,Patx500,max(palineitemseq) from pa02101,pa01601wherepa02101.pabillnoteidx=pa01601.pabillnoteidx group bypaprojnumber,patx500it throws this errorServer: Msg 306, Level 16, State 2, Line 1The text, ntext, and image data types cannot be compared or sorted,except when using IS NULL or LIKE operator.Thanks a lot for your help.AJ
while (resultSet.next()) { System.out.println(resultSet.getDate("end_date")); }
The date field is nullable, and the records in the database are currently null. But when I run this program, I get the following exception when using version 1.2 of the MS JDBC Driver:
com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from int to DATE is unsupported. at com.microsoft.sqlserver.jdbc.ServerDTVImpl.getValue(Unknown Source) at com.microsoft.sqlserver.jdbc.DTV.getValue(Unknown Source) at com.microsoft.sqlserver.jdbc.Column.getValue(Unknown Source) at com.microsoft.sqlserver.jdbc.Column.getValue(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getDate(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getDate(Unknown Source) at jdbc.main(jdbc.java:38) Exception in thread "main"
This started happening when we upgraded to the new driver. Any ideas why?
I have a table in sql server 2000 which has a column whose name starts with a number("2ndName").I have a c# code which updates the table by filling a Dataset.When I issue an update, it throws the following error:-"Incorrect Syntax near 2"Query I use to build the adapter is "SELECT id, Name, [2ndName] FROM MyTBL WHERE 1 = 3" and the statement issued to update is "objAdapter.Update(objDSDB, "MyTBL")" when it throws the error "Incorrect Syntax near 2".Any help to resolve this is appreciated.Thanks in advance.Jai
I'm inserting records from a table to another table, having multiple columns
SampleQuery :
insert into tableB (col1,col2....col10) select col1,col2....col10 from tableA
* while executing this query im getting error. (like varchar cant convert to numberic) * Here I have no clue in which column it is * also dont know which row causes it
we've been having this ancient database with old accounting data running in suspect mode since as long as I can remember (I started working here a year ago), and finally I had some time on my hands so I thought I'd try to get it online again. However I'm running in to problems:
DBCC CHECKDB (myDBName) gives this error: Msg 926, Level 14, State 1, Line 1 Database 'myDBName' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.
Running sp_helpdb only does not display the suspect database and sp_helpdb 'myDBName' gives this error even though I'm a system administrator: No permission to access database 'myDBName'.
It's possible that I might be able to dig up a backup but that would be quite tedious. Is it possible to bring the database to a state where I'm able to do a CHECKDB at least...?
-- Lumbago "Real programmers don't document, if it was hard to write it should be hard to understand"
I am trying to execute a stored procedure on Server1 which creates an excel report on a share of Server2:
The following error message is thrown: Saving of scheduled report(s) to Excel file failed : 203 SaveReportToExcel() in TlRptToFile.RptExcel failed in sproc_SaveReportAsFile - TLRptXL::SaveReportToExcel - Connection to Database failed for Analytics DataBase Server : TKTALSQL3, Application Server: and DataBase : tlAnalytics : Windows Error - The system could not find the environment option that was entered.
A DCOM component on Server1 runs the stored procedure that creates the excel report. The account under which DCOM component runs is a member of 'Administrators' group on both Server1 and Server2. Checked permissions on the shares. Account is a local Admin on both Server1 and Server2. Account under which SQLServer and ServerAgent runs is also an Admin on these shares (implicitly as part of 'Administrators' group).
I am manually able to create an excel/text file on the Server2 share while accessing it from Server1, though.