Console.WriteLine Generates HostProtectionException
Aug 25, 2006
Gotcha!
It took a few minutes of staring at my CLR method (it's actually a ServiceBroker service), trying to figure out why I was getting an exception on something that looked pretty innocuous.
It turned out to be the Console.WriteLine(...) statement. In hindsight, not really much of a surprise . However, for debugging purposes, I'd still like to use Console.WriteLine. Is there a HostProtectionAttribute I can apply that will allow it?
Josh
View 1 Replies
ADVERTISEMENT
Sep 20, 2007
I use sp_OAMethod 'WriteLine' to write some VARCHAR data into a file. The problem is, that when the VARCHAR data contains special characters like "äüö", they not not correctly written and the file, if its a xml file is invalid.
VARCHAR data is "Datei abholenDateiname prüfen"
Statements are:
SET @XMLComment = '<!-- TestCase :' + @param_TestCase + ' -->'
execute @OLEResult = sp_OAMethod @FileID, 'WriteLine', Null, @XMLComment
Output is: <!-- TestCase Datei abholenDateiname pr�->
Is there any workaround to have it read/write special characters correctly in the file?
Any help is appreciated.
Thanks.
Added later:
I found a way to do the same with bcp, but also that utility has problems with "äöü" characters.
View 1 Replies
View Related
Nov 29, 2006
I have traditionally thrown message boxes while developing SSIS packages and removing them when finished, but wish to move to something more appropriate. From my understanding, Debug.WriteLine is supposed to output to the console while debugging.
In various places I'm calling System.Diagnostics.Debug.WriteLine("Stuff") but nothing comes up in the output console. Am I using this the wrong way?
View 5 Replies
View Related
Oct 12, 2001
Recently I did an upgrade form SQL 7 to SQL 2000. Everything went smoothly
except there is a little problem with an Optimization job (reorganize data and index pages/remove unused space from database files). The job itself runs
fine. But when I do a transaction log backup, it generates a huge log backup file. I don't remember that there was such a huge-sized transaction log backup file when I ran it on SQL 70. Is SQL 2000 different from SQL 7 on this aspect?
View 1 Replies
View Related
Feb 9, 2007
I have an application (ASP.NET 2.0/SQL Server 2005) which makes heavy use of table adapters for pulling records from SQL. Under heavy load, we get a lot of SQL Server Timeout errors. We have run a trace on SQL Server and it shows that several of the SQL statements being passed into SQL Server, from the Table Adapters, have bad SQL.
For example, here is the SQL in one of the table adapters
SELECT HomeMsgID, messageName, messageHTML, messageText, populationID
FROM MyUCR_HomeMessages
WHERE (populationID IN
(SELECT populationID
FROM MyUCR_Population_CPID AS
MyUCR_Population_CPID_1
WHERE (CPID = @CPID))) AND (isVisible = 1)
AND (showDate <= @showDate) AND (removeDate >= @removeDate)
I call it with the following:
DateTime showDate = DateTime.Today;
DateTime removeDate = DateTime.Today;
myUCR_HomePageMsgsTableAdapters.MyUCR_HomeMessagesTableAdapter ta = new
myUCR_HomePageMsgsTableAdapters.MyUCR_HomeMessagesTableAdapter();
myUCR_HomePageMsgs.MyUCR_HomeMessagesDataTable dt = new
myUCR_HomePageMsgs.MyUCR_HomeMessagesDataTable();
ta.FillByCPID(dt, showDate, removeDate, CPID);
What the SQL trace shows, when it fails, is this (notice the extra single
quotes around the showDate, removeDate parameters):
E000
exec sp_executesql N'SELECT HomeMsgID, messageName, messageHTML,
messageText, populationID
FROM MyUCR_HomeMessages
WHERE (populationID IN
(SELECT populationID
FROM MyUCR_Population_CPID AS
MyUCR_Population_CPID_1
WHERE (CPID = @CPID))) AND (isVisible = 1)
AND (showDate <= @showDate) AND (removeDate >= @removeDate)',N'@showDate
datetime,@removeDate datetime,@CPID int',@showDate=''2007-02-05
00:00:00:000'',@removeDate=''2007-02-05 00:00:00:000'',@CPID=3071225
1[Microsoft][SQL Native Client][SQL Server]Incorrect syntax near '2007'.
I recreated the SQL to use a stored procedure, and got a similar error:
E000exec dbo.spFillHomeMsgByCPID @showDate=''2007-02-05
00:00:00:000'',@removeDate=''2007-02-05 00:00:00:000'',@CPID=3008195
5[Microsoft][SQL Native Client][SQL Server]Incorrect syntax near '2007'.
However, if I create dynamic SQL and use the following, there are no errors.
string mySql = string.Empty;
mySql = "SELECT HomeMsgID, messageName, messageHTML, messageText,
populationID FROM MyUCR_HomeMessages WHERE (populationID IN (SELECT
populationID FROM MyUCR_Population_CPID AS MyUCR_Population_CPID_1 WHERE
(CPID = " + CPID + "))) AND (isVisible = 1) AND (showDate <= '" + showDate +
"') AND (removeDate >= '" + removeDate + "')"; SqlDataAdapter adapter = new
SqlDataAdapter(mySql, ConfigurationManager.ConnectionStrings["MyUCR2007ConnectionString"].ToString());
DataSet RecordCount = new DataSet();
adapter.Fill(RecordCount);
DataTable testDT = RecordCount.Tables[0];
I am using VSTS with the Service Pack installed. SQL 2005 is running on W2K3 Enterprise, fully patchedThanks,James
View 1 Replies
View Related
Feb 27, 2006
I've come across several references indicating that the recovery model can be set to simple by using the following sql statement:
ALTER DATABASE dbname SET RECOVERY SIMPLE
However, all I get is the error message below. What is the correct syntax?
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '.'.
Msg 195, Level 15, State 7, Line 1
'recovery' is not a recognized SET option.
View 7 Replies
View Related
Jan 13, 2006
I am trying to export data from my local server to the hosting server. However I get errors when executing it:
Validating (Error)
Messages
Error 0xc0202049: Data Flow Task: Failure inserting into the read-only column "ID".
(SQL Server Import and Export Wizard)
Error 0xc0202045: Data Flow Task: Column metadata validation failed.
(SQL Server Import and Export Wizard)
Error 0xc004706b: Data Flow Task: "component "Destination 7 - Batches" (497)" failed validation and returned validation status "VS_ISBROKEN".
(SQL Server Import and Export Wizard)
Error 0xc004700c: Data Flow Task: One or more component failed validation.
(SQL Server Import and Export Wizard)
Error 0xc0024107: Data Flow Task: There were errors during task validation.
(SQL Server Import and Export Wizard)
Any idea?
View 24 Replies
View Related
Feb 22, 2008
hi, all, i am using VS 2005. the c# program and sql data(Database1.mdf) including Table1 are within the same project.how can i use the C# program to access the data within Database1.mdf?such as what is the ConncetionString of that?any simple sample codes? btw. i have tried: String connStr =@"server = (local)etsdk;database = Database1;integrated security = sspi;";
View 2 Replies
View Related
Aug 10, 2006
Can someone who knows a lot more about this than me please tell why, when the following code executes, I get a pop-up window telling me the usage of isqlw.exe?
<code>
strQueryCommandPath = "C:\Program Files\Microsoft SQL Server\80\Tools\Binn\";
strArguments = "-S(local)\SQLEXPRESS ";
strArguments += "-Usa ";
strArguments += "-Padminmlc ";
strArguments += "-i" + strCurrentDir + strFileName + " ";
myProcess.StartInfo.WorkingDirectory = strQueryCommandPath;
myProcess.StartInfo.FileName = "ISQLW.EXE";
myProcess.StartInfo.Arguments = strArguments;
myProcess.StartInfo.UseShellExecute = false;
return myProcess.Start();
</code>
I've also tried it with a space in between the - switch and also with quotes around the switch arguments. I've put the entire path in just the StartInfo.FileName instead of switching the working directory as well. I can't for the life of me get it to actually fire off this command for some reason.
p.s. I've also tried using "/"s instead of "-"s as well.
View 3 Replies
View Related
Feb 27, 2007
After installing SP2 for SQL Serve 2005, I get strange errors when using either "Estimated Execution Plan" or "Actual Execution Plan".
Using "Estimated Execution Plan" generates this error
An error occurred while executing batch. Error message is: Error processing execution plan results. The error message is:
There is an error in XML document (1, 3998).
Unexpected end of file while parsing has occurred. Line 1, position 3998.
Using "Actual Execution Plan" generates this error
An error occurred while executing batch. Error message is: Error processing execution plan results. The error message is:
There is an error in XML document (1, 4001).
Unexpected end of file has occurred. The following elements are not closed: RelOp, ComputeScalar, RelOp, Update, RelOp, QueryPlan, StmtSimple, Statements, Batch, BatchSequence, ShowPlanXML. Line 1, position 4001.
All I do is testing this solutiondeclare@t table (dt datetime)
insert@t
select'02-Jan-2007' union all
select'01-Feb-2007' union all
select'10-Feb-2007' union all
select'28-Feb-2007' union all
select'18-Mar-2007'
DECLARE@DaysRange INT,
@NumOfCalls INT
SELECT@DaysRange = 35,
@NumOfCalls = 4
SELECTt1.dt AS theDate
FROM@t AS t1
CROSS JOIN@t AS t2
WHEREt2.dt >= DATEADD(day, DATEDIFF(day, 0, t1.dt), 0)
AND t2.dt < DATEADD(day, DATEDIFF(day, 0, t1.dt), @DaysRange)
OR
t2.dt >= DATEADD(day, DATEDIFF(day, @DaysRange, t1.dt), 1)
AND t2.dt < DATEADD(day, DATEDIFF(day, 0, t1.dt), 1)
GROUP BYt1.dt
HAVINGCOUNT(*) >= @NumOfCallsHas anyone else experienced this?
Peter Larsson
Helsingborg, Sweden
View 9 Replies
View Related
Mar 21, 2007
When I attempt to generate scripts via SSMS for several databases on this server (x64 Enterprise Windows 2003 Server SP1), I receive a "severe error" message. I have run DBCC commands of various sorts and backed up and restored but the error persists.
I have read other posts on this forum that seem to be asking about related issues and the response appears to be "talk with support" or "post a bug report". What should I do? Any assistance would be appreciated.
Here's the dump:
=====================================================================
BugCheck Dump
=====================================================================
This file is generated by Microsoft SQL Server
version 9.00.3152.00
upon detection of fatal unexpected error. Please return this file,
the query or program that produced the bugcheck, the database and
the error log, and any other pertinent information with a Service Request.
Computer type is AT/AT COMPATIBLE.
Current time is 16:55:02 03/20/07.
4 Unknown CPU 9., 2205 Mhz processor (s).
Windows NT 5.2 Build 3790 CSD Service Pack 1.
Memory
MemoryLoad = 54%
Total Physical = 4951 MB
Available Physical = 2260 MB
Total Page File = 28583 MB
Available Page File = 26144 MB
Total Virtual = 8388607 MB
Available Virtual = 8383329 MB
***Stack Dump being sent to C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLLOGSQLDump0052.txt
SqlDumpExceptionHandler: Process 55 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is
terminating this process.
* *******************************************************************************
*
* BEGIN STACK DUMP:
* 03/20/07 16:55:02 spid 55
*
*
* Exception Address = 00000000021B4CEF Module(sqlservr+00000000011B4CEF)
* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
* Access Violation occurred reading address 000000001DC6BEE4
* Input Buffer 510 bytes -
* SELECT SCHEMA_NAME(v.schema_id) AS [View_Schema], v.name AS [
* View_Name], st.name AS [Name], st.no_recompute AS [NoAutomaticRecomputat
* ion], st.auto_created AS [IsAutoCreated], CAST(1 - INDEXPROPERTY(st.obje
* ct_id,st.name,N'IsStatistics') AS bit) AS [IsFromIndexCreation] FROM sys
* .all_views AS v INNER JOIN sys.stats st ON st.object_id=v.object_id WHER
* E (v.type = 'V') ORDER BY [View_Schema] ASC,[View_Name] ASC,[Name] ASC
*
*
* MODULE BASE END SIZE
* sqlservr 0000000001000000 0000000003523FFF 02524000
* ntdll 0000000078EC0000 0000000078FF8FFF 00139000
* kernel32 0000000077D40000 0000000077EB2FFF 00173000
* MSVCR80 0000000078130000 00000000781FEFFF 000cf000
* msvcrt 000007FF7FC00000 000007FF7FC85FFF 00086000
* MSVCP80 000000007C420000 000000007C530FFF 00111000
* ADVAPI32 000007FF7FEE0000 000007FF7FFE4FFF 00105000
* RPCRT4 000007FF7FD30000 000007FF7FED8FFF 001a9000
* USER32 0000000078C30000 0000000078D3BFFF 0010c000
* GDI32 000007FF7FC90000 000007FF7FD28FFF 00099000
* CRYPT32 000007FF7D180000 000007FF7D2DEFFF 0015f000
* MSASN1 000007FF7D150000 000007FF7D179FFF 0002a000
* Secur32 000007FF7E7F0000 000007FF7E811FFF 00022000
* MSWSOCK 000007FF76FE0000 000007FF7705BFFF 0007c000
* WS2_32 000007FF77150000 000007FF7717FFFF 00030000
* WS2HELP 000007FF77140000 000007FF7714BFFF 0000c000
* USERENV 000007FF7C4A0000 000007FF7C5A8FFF 00109000
* opends60 00000000333E0000 00000000333E7FFF 00008000
* NETAPI32 000007FF77370000 000007FF77407FFF 00098000
* SHELL32 000007FF7F190000 000007FF7FB97FFF 00a08000
* SHLWAPI 000007FF7EF60000 000007FF7EFFAFFF 0009b000
* IMM32 000007FF7D320000 000007FF7D358FFF 00039000
* comctl32 000007FF7F000000 000007FF7F186FFF 00187000
* psapi 000007FF7E1B0000 000007FF7E1BFFFF 00010000
* instapi 0000000048060000 000000004806CFFF 0000d000
* sqlevn70 000000004F610000 000000004F7B8FFF 001a9000
* SQLOS 00000000344D0000 00000000344D5FFF 00006000
* rsaenh 000000000FFB0000 000000000FFEDFFF 0003e000
* AUTHZ 000007FF7E2C0000 000007FF7E2ECFFF 0002d000
* MSCOREE 000006427EE60000 000006427EED3FFF 00074000
* ole32 000007FF7ECE0000 000007FF7EF51FFF 00272000
* msv1_0 000007FF7E330000 000007FF7E373FFF 00044000
* iphlpapi 000007FF57250000 000007FF57280FFF 00031000
* kerberos 000007FF77410000 000007FF774C2FFF 000b3000
* cryptdll 000007FF7DAB0000 000007FF7DABEFFF 0000f000
* schannel 000007FF7DB70000 000007FF7DBB0FFF 00041000
* COMRES 000007FF7E920000 000007FF7E9E5FFF 000c6000
* XOLEHLP 000007FF5C560000 000007FF5C566FFF 00007000
* MSDTCPRX 000007FF67140000 000007FF67210FFF 000d1000
* msvcp60 0000000009460000 0000000009549FFF 000ea000
* MTXCLU 000007FF7B540000 000007FF7B569FFF 0002a000
* VERSION 000007FF7FBF0000 000007FF7FBFAFFF 0000b000
* WSOCK32 000007FF770F0000 000007FF770F9FFF 0000a000
* OLEAUT32 000007FF7E9F0000 000007FF7EB03FFF 00114000
* CLUSAPI 000007FF7B1C0000 000007FF7B1E3FFF 00024000
* RESUTILS 000007FF7B310000 000007FF7B32BFFF 0001c000
* DNSAPI 0000000009560000 00000000095ADFFF 0004e000
* winrnr 000007FF7E820000 000007FF7E82AFFF 0000b000
* WLDAP32 000007FF7E780000 000007FF7E7E5FFF 00066000
* rasadhlp 0000000009650000 0000000009656FFF 00007000
* security 000007FF77530000 000007FF77534FFF 00005000
* msfte 0000000049980000 0000000049D2DFFF 003ae000
* dbghelp 000000000BAA0000 000000000BBFCFFF 0015d000
* WINTRUST 000007FF7E210000 000007FF7E25DFFF 0004e000
* imagehlp 000007FF7E2A0000 000007FF7E2B2FFF 00013000
* dssenh 000000000FF70000 000000000FFABFFF 0003c000
* hnetcfg 000007FF6D1F0000 000007FF6D280FFF 00091000
* wshtcpip 000007FF76FA0000 000007FF76FAAFFF 0000b000
* NTMARTA 000007FF7E2F0000 000007FF7E32BFFF 0003c000
* SAMLIB 000007FF76F80000 000007FF76F95FFF 00016000
* ntdsapi 000007FF7DAD0000 000007FF7DAF3FFF 00024000
* xpsp2res 000007FF5C210000 000007FF5C4D6FFF 002c7000
* CLBCatQ 0000000003530000 000000000360CFFF 000dd000
* sqlncli 00000000337A0000 0000000033A5FFFF 002c0000
* COMCTL32 000007FF76200000 000007FF762EDFFF 000ee000
* comdlg32 000007FF7D360000 000007FF7D3D6FFF 00077000
* SQLNCLIR 0000000035000000 0000000035032FFF 00033000
* msftepxy 0000000003670000 0000000003690FFF 00021000
* xpsqlbot 000000004A7C0000 000000004A7C7FFF 00008000
* xpstar90 0000000053C30000 0000000053CB5FFF 00086000
* SQLSCM90 0000000053AD0000 0000000053ADBFFF 0000c000
* ODBC32 000007FF63EB0000 000007FF63F16FFF 00067000
* BatchParser90 00000000520C0000 00000000520ECFFF 0002d000
* ATL80 000000007C630000 000000007C64DFFF 0001e000
* odbcint 000007FF63DC0000 000007FF63DD7FFF 00018000
* xpstar90 000000000FC60000 000000000FC85FFF 00026000
* xplog70 0000000034730000 000000003473FFFF 00010000
* xplog70 000000000FCA0000 000000000FCA2FFF 00003000
*
* P1Home: FFFFFADF7A660868:
* P2Home: 000000000AC3E180: FFFFFADF7A660868 000000000AC3E180 0000000000000001 000000009EB0A930 00010000
00000000 FFFFFADF878AD010
* P3Home: 0000000000000001:
* P4Home: 000000009EB0A930: 0000000000000000 000000009EC4E1D8 000000009EB8A000 0000006400000018 00000000
9EACE000 FFFFFFFF00000000
* P5Home: 0001000000000000:
* P6Home: FFFFFADF878AD010:
* ContextFlags: 000000000010001F:
* MxCsr: 0000000000001FA0:
* SegCs: 0000000000000033:
* SegDs: 000000000000002B:
* SegEs: 000000000000002B:
* SegFs: 0000000000000053:
* SegGs: 000000000000002B:
* SegSs: 000000000000002B:
* EFlags: 0000000000010246: 005C003A0043003D 0067006F00720050 0020006D00610072 0065006C00690046 00510053
005C0073 004C004D0058004C
* Rax: 000000001DC6BD50:
* Rcx: 0000000000000000:
* Rdx: 0000000000000000:
* Rbx: 0000000000000001:
* Rsp: 000000000AC3E720: 000000000AC3E778 00000000013DA150 0000000000000000 0000000000000000 00000000
00000000 000000009EB9DD40
* Rbp: 000000009EB0A930: 0000000000000000 000000009EC4E1D8 000000009EB8A000 0000006400000018 00000000
9EACE000 FFFFFFFF00000000
* Rsi: 0000000000000000:
* Rdi: 0000000000000000:
* R8: 000000011DC6BD50: 000000001DC60001 0000000000000000 0000000000000000 0000000000000000 00000000
00000031 000000011DC6ACB0
* R9: 000000009EC4E228: 0000000000000000 0000000000000000 000000009EB0A930 0000000000000000 00000000
00000000 0000000000000000
* R10: 0000000001017C00: 2444C74878EC8348 5C8948FFFFFFFE30 4868246C89487024 247C894860247489 894C5024
64894C58 8B48DA8B4848246C
* R11: 000000000AC3E988: 0000000000000000 00000000FFFFFFFF 0000000000000000 0000000000000000 00000000
FFFFFFFF 0000000000000000
* R12: 000000011DC6BD50: 000000001DC60001 0000000000000000 0000000000000000 0000000000000000 00000000
00000031 000000011DC6ACB0
* R13: 000000000AC3EA00: 0000000000000000 0000000000000000 0000000002ECF280 0000000000000000 FFFFFFFF
FFFFFFFE 000000011D9581C0
* R14: 0000000003640580: 0000000200000000 0000000000000008 0000026300000000 0000000003640080 00000001
1DC6C300 000000011DC6A2B0
* R15: 0000000000000002:
* Rip: 00000000021B4CEF: 848900000194808B 548D480000018024 3687E8C88B497824 485024448948FEEE 1374187D
3B66E88B 01DCB58B187D8B66
* *******************************************************************************
* -------------------------------------------------------------------------------
* Short Stack Dump
00000000021B4CEF Module(sqlservr+00000000011B4CEF)
00000000021BAD40 Module(sqlservr+00000000011BAD40)
00000000021BAEBA Module(sqlservr+00000000011BAEBA)
00000000021BB029 Module(sqlservr+00000000011BB029)
00000000017B32FA Module(sqlservr+00000000007B32FA)
0000000001343FBC Module(sqlservr+0000000000343FBC)
0000000002527308 Module(sqlservr+0000000001527308)
0000000001CC9A78 Module(sqlservr+0000000000CC9A78)
0000000001391E90 Module(sqlservr+0000000000391E90)
0000000001343ACB Module(sqlservr+0000000000343ACB)
0000000001343B70 Module(sqlservr+0000000000343B70)
0000000001343D4F Module(sqlservr+0000000000343D4F)
0000000001079D91 Module(sqlservr+0000000000079D91)
00000000010796A1 Module(sqlservr+00000000000796A1)
000000000147EE04 Module(sqlservr+000000000047EE04)
000000000147EEBB Module(sqlservr+000000000047EEBB)
0000000001023AA2 Module(sqlservr+0000000000023AA2)
00000000010243A2 Module(sqlservr+00000000000243A2)
0000000001035FDA Module(sqlservr+0000000000035FDA)
00000000010355E5 Module(sqlservr+00000000000355E5)
00000000010366C8 Module(sqlservr+00000000000366C8)
0000000001289FEE Module(sqlservr+0000000000289FEE)
000000000100782E Module(sqlservr+000000000000782E)
0000000001007FB2 Module(sqlservr+0000000000007FB2)
00000000010079D1 Module(sqlservr+00000000000079D1)
000000000146B4D7 Module(sqlservr+000000000046B4D7)
000000000146BC0A Module(sqlservr+000000000046BC0A)
000000000146BB01 Module(sqlservr+000000000046BB01)
000000000146B999 Module(sqlservr+000000000046B999)
00000000781337A7 Module(MSVCR80+00000000000037A7)
0000000078133864 Module(MSVCR80+0000000000003864)
0000000077D6B69A Module(kernel32+000000000002B69A)
PSS @0x0000000099D9DBF0
-----------------------
CSession @0x0000000099D9C410
----------------------------
m_spid = 55 m_cRef = 22 m_rgcRefType[0] = 1
m_rgcRefType[1] = 1 m_rgcRefType[2] = 19 m_rgcRefType[3] = 1
m_rgcRefType[4] = 0 m_rgcRefType[5] = 0 m_pmo = 0x0000000099D9C080
m_pstackBhfPool = 0x0000000000000000 m_dwLoginFlags = 0x83e0 m_fBackground = 0
m_fClientRequestConnReset = 0 m_fUserProc = -1 m_fConnReset = 0
m_fIsConnReset = 0 m_fInLogin = 0 m_fAuditLoginSent = 1
m_fAuditLoginFailedSent = 0 m_fReplRelease = 0 m_fKill = 0
m_ulLoginStamp = 122 m_eclClient = 5 m_protType = 6
m_hHttpToken = FFFFFFFFFFFFFFFF
m_pV7LoginRec
---------------------
0000000000000000: 5c010000 02000972 00100000 00000006 e8130000 € ......r............
0000000000000014: 00000000 e0830000 00000000 00000000 5e000f00 € ................^...
0000000000000028: 00000000 00000000 7c002600 c8000f00 e6000000 € ........|.&.........
000000000000003C: e6001c00 1e010000 1e010000 0014c23f 4c1e1e01 € ...............?L...
0000000000000050: 3e005c01 00005c01 00000000 0000€ € € € € € € € € € € € € € € >...........
CPhysicalConnection @0x0000000099D9C2E0
---------------------------------------
m_pPhyConn->m_pmo = 0x0000000099D9C080
m_pPhyConn->m_pNetConn = 0x0000000099D9CB00
m_pPhyConn->m_pConnList = 0x0000000099D9C3E0
m_pPhyConn->m_pSess = 0x0000000099D9C410 m_pPhyConn->m_fTracked = -1
m_pPhyConn->m_cbPacketsize = 4096 m_pPhyConn->m_fMars = 0 m_pPhyConn->m_fKill = 0
CBatch @0x0000000099D9CFD0
--------------------------
m_pSess = 0x0000000099D9C410 m_pConn = 0x0000000099D9CEC0 m_cRef = 3
m_rgcRefType[0] = 1 m_rgcRefType[1] = 1 m_rgcRefType[2] = 1
m_rgcRefType[3] = 0 m_rgcRefType[4] = 0 m_pTask = 0x00000000062C4DA8
EXCEPT (null) @0x000000000AC3B608
---------------------------------
exc_number = 0 exc_severity = 0 exc_func = 0x0000000001891970
Task @0x00000000062C4DA8
------------------------
CPU Ticks used (ms) = 159 Task State = 2
WAITINFO_INTERNAL: WaitResource = 0x0000000000000000 WAITINFO_INTERNAL: WaitType = 0x0
WAITINFO_INTERNAL: WaitSpinlock = 0x0000000000000000 SchedulerId = 0x3
ThreadId = 0x1374 m_state = 0 m_eAbortSev = 0
EC @0x0000000099D9DC00
----------------------
spid = 55 ecid = 0 ec_stat = 0x0
ec_stat2 = 0x0 ec_atomic = 0x0 __fSubProc = 1
ec_dbccContext = 0x0000000000000000 __pSETLS = 0x0000000099D9CF30 __pSEParams = 0x0000000099D9D350
__pDbLocks = 0x0000000099D9DCC0
SEInternalTLS @0x0000000099D9CF30
---------------------------------
m_flags = 0 m_TLSstatus = 3 m_owningTask = 0x00000000062C4DA8
m_activeHeapDatasetList = 0x0000000099D9CF30
m_activeIndexDatasetList = 0x0000000099D9CF40
SEParams @0x0000000099D9D350
----------------------------
m_lockTimeout = 10000 m_isoLevel = 4096 m_logDontReplicate = 0
m_neverReplicate = 0 m_XactWorkspace = 0x0000000091150410
m_pSessionLocks = 0x0000000099D9DD70 m_pDbLocks = 0x0000000099D9DCC0
m_execStats = 0x000000011CADE810 m_pAllocFileLimit = 0x0000000000000000
View 1 Replies
View Related
Jun 13, 2007
Hi,
I've a dataset which is filled using a stored procedure in either MSSQL2005 or 2000.
The procedure may return sql-errors (f.ex 208 if a table is not found), but the procedure will anyway return data which shall populate the dataset, independent on 208 errors.
The procedure works fine if running it from f.ex. SqlMgtStudio, and the dataset is filled if the procedure triggers no errors.
However, if the procedure triggers an error like 208, then I get an exception in the application and the dataset is not populated with the data returned by the procedure.
Is there a way of telling the DataSet/SqlDataAdapter to fill the dataset even if the sql-code genererates som errors?
Regards, Guttorm
View 2 Replies
View Related
Oct 3, 2006
Send Mail hangs up in Yellow 5 min. and turns Red with Timeout error. I am assuming that I have a problem with SMTP Connection manager.
I copied the SMTP server name from my Outlook.
Task sometimes works like a charm. But it is not consistent.
How can I debug this?
Thanks,
Gulden
View 4 Replies
View Related
Dec 3, 2007
Hi
the following code generates an error while executing dbServer.Databases("InvModel").Transfer dbTransfer
error description
[SQL-DMO]Invalid parameter type; must be string or numeric ordinal, or an object; check documentation for this property or method.
I am trying with sql2005 express edition. the code was one which we used for sql 2000
Code Block
Dim dbTransfer As New SQLDMO.Transfer2
Dim dbServer As New SQLDMO.SQLServer2
dbServer.Connect gStrSQLServerName, "sa", "NEWTECH001"
With dbTransfer
.DestDatabase = Trim(txtCompCode)
.DestLogin = "sa"
.DestPassword = "NEWTECH001"
.DestServer = gStrSQLServerName
.DropDestObjectsFirst = True
.CopyAllObjects = True
.CopyAllTables = True
.CopyAllViews = True
.CopyData = SQLDMOCopyData_Replace
.IncludeDependencies = False
End With
Screen.MousePointer = vbHourglass
prgbar.Value = 35
dbServer.Databases("InvModel").Shrink 1, SQLDMOShrink_Default
DoEvents
Screen.MousePointer = vbHourglass
prgbar.Value = 50
DoEvents
dbServer.Databases("InvModel").Transfer dbTransfer
DoEvents
Screen.MousePointer = vbHourglass
REgds
Pramod
View 1 Replies
View Related
Dec 21, 2005
I have created a Web application that uses a SQL Express file Database (mdf). I have also created a console application that looks to the (mdf) in the Web Directory to process some server-side tasks, (Email, process data, etc). Everything works well on my Development Machine, however when I Publish my Web App and Console application to a server, the Web App works fine, the Console App is buggy. The main error I get is ;that the user logged into the server cannot access the Database. (User domcholman cannot access). However this is not always the case, sometimes it works.
Question is, how does SQL Express authenticate credentials when in Windows Auth mode? Shouldn't it allow the Service account to access the database? Are there any best practices? Should I use an account and password instead? thanks...
View 1 Replies
View Related
May 28, 2003
Logged on local Administrator on one of my sqlserver 2000 "ABC" and registered 5 sql groups and linked 50 sql2k servers from MSDE to Standare (all sp3).
Now, I need a different login on this machine "ABC", how could I get back all the SQL Enterprise Manager Console Root Setting and connections like before?
thanks
David
View 11 Replies
View Related
Jul 13, 2006
Can the Server Management Studio Express be installed on a machine without SQL Server Express?
I have a machine that I use daily that I need to access a remote instance but there is not a need (or space) to fully install SQL Server onto the local machine - all I need is the management tool.
I tried installing it but the process errors out, saying a pre-requisite (MSXML6) isn't found. It refers me to a site with all the different SQL Server downloads.
All I need is the management tool on this machine. Is there a way to do it?
Tried loading "MOM" but it doesn't show up either
Thanks
Paul P
View 3 Replies
View Related
Aug 3, 2007
I need to execute a console program and capture its output.
What's the best way to do it?
(no xp_cmdshell approach)
Thanks,
View 1 Replies
View Related
Feb 14, 2007
Hello All ...I
am attempting to create a program that will run on the PocketPC 2003
environment. I have upgraded Visual Studio to SP1, I have installed SQL
Server Compact Edition on my development machine and I have installed
SQL Server Compact Edition Tools For Visual Studio on the development
machine.I have created a new project Visual Basic - Smart
Device - Pocket PC 2003. I have created a form for user input. I build
and deploy the form to the Symbol Pocket PC to test - no connection to
data and it works.I then add a reference to
System.Data.SqlServerCE.dll and rebuild and redeploy the application to
the handheld. When I attempt to open the form I receive the following
error:psmPocket.exeNotSupportedExceptionSystem.Drawing.Bitmapat
System.Resources.ResourceReader.LoadObjectV2() at
System.Resources.ResourceReader.LoadObject() at
System.Resources.RuntimeResourceSet.GetObject() at
System.Resources.ResourceManager.GetObject() at
System.Resources.ResourceManager.GetObject() at
pmsPocket.frmSetSOPType.InitializeComponent() at
psmPocket.frmSetSOPType..ctor() at
System.Reflection.RuntimeContructorInfo.InternalInvoke() at
System.Reflection.RuntimeContructorInfo.InternalInvoke() at
System.Reflection.ContrcutorInfo.Invoke() at
System.Activator.CreateInstance() at MyForms.Create__Instance__() at
MyForms.get_frmSetSOPType() at psmPocket.SetSOPType.Main()Now
the confusing part is that I haven't changed any of the forms or the
code behind the forms, I have simply added the reference to the project.Any idea why adding the reference to System.Data.SqlServerCE.dll would cause the system to start generating these errors?I've
checked, the install process has loaded the .NET 2 framework to the
handheld. And as indicated at the beginning of this message, the
application showed the form prior to my adding the reference.Thoughts?Thanks ...
View 1 Replies
View Related
Feb 23, 2008
hi, i'm using the following code to generate the value of a column in a database, where the colums value is dependent upon the multiplication of two other cells in the same row. When I execute the statement, it will work fine for whole numbers, but it does not work correctly for decimal values. All columns are of type varchar(50). An exmple.................It just multiplied 200 by 2.50 and returned 600SqlCommand objCmd2 = new SqlCommand("UPDATE Portfolio SET Current_Worth=Current_Price*Number_Of_Shares WHERE Name_Of_Asset LIKE '%'+@Name_Of_Asset+'%'", objConn);objCmd2.Parameters.AddWithValue("@Name_Of_Asset", DropDownList1.SelectedValue);objConn.Open();objCmd2.ExecuteNonQuery();objConn.Close(); Any ideas?
View 5 Replies
View Related
Jan 8, 2008
Can anyone help me figure out how to set up a new table using SSIS with a record field that will generate a unique number? The record number is also the primary key in the table. I did this about a year ago with a bit of help, but once you get the language right and initiate the creation, the text for defining the table is no longer available. I have seen a lot of references for MySQL and MS SQL 2000 and an AUTO_Generate or a UNIQUE ID. None of this works within MS SQL 2005 in SSIS.
Thanks!
Jim
View 8 Replies
View Related
Apr 26, 2007
I have created a report, and am setting default values for the parameters. Once the default parameters is set, the report automatically generates. Is there a way to make it not automatically generate the report? We are setting the parameters with values that will get the end user the most recent data, but alot of times, they will want to pull older data as well. We don't want them to have to wait for the report to automatically generate before they can change the parameter values
View 1 Replies
View Related
Mar 24, 2008
Hello everybody,
MySQL has a WebServer console, that lets to create tables via easy to handle SQL queries. Since I am used to SQL Server console, I would like to have such window in Micosoft SQL Server Express coming with Visual Studio 2008. Despite I searched for it, I did not find a database console window.
Does MS SQL Server Express offer a Server Console that lets the database to be accessed via SQL queries, please?
View 2 Replies
View Related
Apr 8, 2006
So i installed sql express and the management console and have the sql service and browser running. I try to connect to my instance of sql express with the management console and it says it doenst allow remote connections.
error: http://img95.imageshack.us/my.php?image=error28to.jpg
What do i need to do to be able to use the management console?
I was able to connect before but due to some bad advice think i stuffed up the whole thing and had to uninstall sql express and the management console. I re-installed them both but am now getting this error. what the heck is the deal with this? It shouldnt be this hard!
This is in relation to an earlier issue i had trying to get to connect to a database from within visual web developer express and now i can connect to my sql express instance but cant get into the managment studio. :(
View 1 Replies
View Related
May 31, 2006
Hi
My console applications work for SA and no other user. I can run the Stored procedures used in the console application from Query analyser when logged in with username/password that I am attempting to use for console applications. I am using SQL server authenication. User access permissions look ok in Enterprise Manager. Access is permit for my user.
Any suggestions?
Thanks
View 1 Replies
View Related
Aug 16, 2007
When i try to connect to Integration Services on a SQL 2005 Machine, it Gives me a Class not registeed.
But i can connect to SQL 2008 Integration Services without a issue.
I tried Restarting the 2008 machine and Also Reinstalling the SSIS Piece and also Reinstalled SQL 2008, but nothing seems to Help.
View 6 Replies
View Related
Feb 21, 2008
is there a possibility to print the value of a variable in the debug console? it seems that Console.WriteLine in a script task doesn't work. or is there a better way in order to debug the value of a variable at a certain point?
View 7 Replies
View Related
Dec 15, 2006
I have a VB .Net console application that invokes a report via a web service call. It then renders the report into Excel and emails it to the appropriate party.
I would like to suppress the email event if the dataset is empty. So the question is, can one access the NoRows property or equivalent in this environment?
I am able to get some information from the following code:
rs.ExecutionHeaderValue = execHeader
execInfo = rs.LoadReport(reportPath, historyID)
result = rs.Render(format, devInfo, extension, _
encoding, mimeType, warnings, streamIDs)
execInfo = rs.GetExecutionInfo()
The result and execInfo do not seem to deliver back the row count. Is this information available at all? If not, I may have to do an ADO call to the query to get it. Running the query twice is a pretty inefficient solution.
View 2 Replies
View Related
Apr 5, 2007
We installed SQL Server 2005 x64 on a server for our client here at our office. We can't connect to it using Enterprise Manager. I'm assuming we need to install the management console because of the differences in 2000 and 2005. The install is for a x64 and our workstations are x32. Do I need to get a media kit for a x32 because the x64 install won't work. Where can I get the install for the x32 Management console and will this work?
View 3 Replies
View Related
Dec 12, 2014
I have a table that stores Terminal ID, Product Name, Cost and Effective Date. I need to generate query that will produce record set with start effective date and end date based on terminal and product. Table has over million records. In example below you could see table structure/data and desired outcome.
SELECT fmc_terminal, fmc_date = CAST(d. fmc_date AS DATETIME)
,d.fmc_prodlnk, d. fmc_cost
INTO #TestTable
FROM (
SELECT 1, '2014-12-03 00:04:00.000','A', 2.25 UNION ALL
[Code] ....
Expected outcome
fmc_terminalfmc_prodlnkfmc_cost StartDateEndDate
1A2.25 NULL2014-12-03 00:04:00.000
1A2.26 2014-12-03 00:04:00.0002014-12-03 11:33:00.000
And so on….
View 4 Replies
View Related
Aug 11, 2009
It's OS / SQL related. I backup to a UNC device, and frequently get a network related error - but not always. And the error is also OS related...
The scene: 64 bit Windows Server 2008 hosts 64 bit SQL 2008 Standard, and devices are created to point to 64 Server 2008 Server B (ServerBSQL_backupsdvc_DB.bak). The database is backed up daily, on a job, and when run the following error is returned:
Date2009/08/08 06:43:30 AM
LogJob History (Backup_AssetData_2009-08-08)
Step ID3
ServerSQL01
Job NameBackup_AssetData_2009-08-08
Step NameBackup Database - Second Attempt
Duration00:05:33
Sql Severity16
Sql Message ID3013
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted0
Message
Executed as user: COMPANYSERVICE_USER. Processed 94096 pages for database 'AssetData', file 'AssetData' on file 1. [SQLSTATE 01000] (Message 4035) Processed 1 pages for database 'AssetData', file 'AssetData_log' on file 1. [SQLSTATE 01000] (Message 4035) The operating system returned the error '64(failed to retrieve text for this error. Reason: 15105)' while attempting 'FlushFileBuffers' on 'dvc_AssetData(
iscsrv-dcm04RISCSRV-SQL01_Backupsdvc_AssetData.bak)'. [SQLSTATE 42000] (Error 3634) BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.
The file is generated, the same size as a successful backup, but the job terminates unsuccessful.I have tried to delete the devices' file, and then the backup usually succeeds. This may point to a permissions' type error, but the user the job is run under is a domain admin. The destination server is not unavailable during this time, and the network shares also remain active throughout the excersize - although I haven't got a way to "prove" this.
I have a few databases that backup to the UNC described above (different files) that don't fail..My SQL2000 server backs up it's databases to the SQL2008 server, and those backups don't fail with this error.
My research has led me to understand that the 64bit OS tries to buffer the files it receives from another server, and I was wondering if this could be influencing the backups as the destination server is also 64 bit Windows Server 2008.
##20090812## UPDATE
I tried another way to do the backup; with the same results:
Backup database Infovest to disk = '
iscsrv-dcm04
iscsrv-sql01_backupsdvc_Infovest_Z.bak' with INIT,STATS=1
[code]....
View 9 Replies
View Related
May 15, 2015
i have a time series table which generates a flag for every 10 mins. the table looks as below. I am trying to write a sql query which gives me the start date and end date of a particular flag, each time the flag starts. i tried to do it using cursors and actually joining the table to itself based on a 10 min offset but couldn't get the required results.
startdate enddate
flag
2009-11-02 23:30 2009-11-02 23:50
-999
2009-12-08 04:50 2009-12-08 04:50 -990
View 3 Replies
View Related
May 17, 2008
Ok so I managed finally to get an Excel Spreadsheet to connect as a linked server.
When I right click it , go to run scripts and click on create to i can see the tab of script below:
/****** Object: LinkedServer [EXCELLINK] Script Date: 05/17/2008 08:37:04 ******/
EXEC master.dbo.sp_addlinkedserver @server = N'EXCELLINK', @srvproduct=N'Excel', @provider=N'Microsoft.Jet.OLEDB.4.0', @datasrc=N'c:PRICINGFINAL2.xls', @provstr=N'Excel 8.0'
/* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'EXCELLINK',@useself=N'False',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL
GO
EXEC master.dbo.sp_serveroption @server=N'EXCELLINK', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'EXCELLINK', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'EXCELLINK', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'EXCELLINK', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'EXCELLINK', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'EXCELLINK', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'EXCELLINK', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'EXCELLINK', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'EXCELLINK', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'EXCELLINK', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'EXCELLINK', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'EXCELLINK', @optname=N'use remote collation', @optvalue=N'true'
Now I am not sure exactly how to go about querying to pull the data into a table.
The table I want to set will have three columns:
CREATE TABLE new_price (
item_id CHAR(12),
item_lst_lnd_cost DECIMAL(9,2),
item_prc_2 DECIMAL(9,2))
the columns in the EXCELLINK linked server spreasdsheet are named the same as the columns above. Once the table is created how do I use the linked server to import the data?
Brooks C. Davis
IT AdministratorLogistics Manager SFTF LLC dba Ashley Furniture Homestores
DELL POWEREDGE 2850 Dual Core Xeon x3 = 1xDB 1xSQL 1xTS | DELL POWEREDGE 2950 Quad Core Xeon = 1xTS | SERVER 2003 | MS SQL 2005 | PERVASIVE EMBEDDED V.9
View 1 Replies
View Related