Showing posts with label application. Show all posts
Showing posts with label application. Show all posts

Friday, March 30, 2012

help!!!求救!!!

Application Log: Event ID 17311
SQL Server is terminating because of fatal exception c0000005. This error may be caused by an unhandled Win32 or C++ exception, or by an access violation encountered during exception handling. Check the SQL error log for any related stack dumps or messages. This exception forces SQL Server to shutdown. To recover from this error, restart the server (unless SQLAgent is configured to auto restart).

Message
[012] The MSSQL$DATAPROSQL service terminated unexpectedly

please please who can tell me why and how to ?

事件类型: 错误
事件来源: MSSQLSERVER
事件种类: (2)
事件 ID: 17311
日期: 2006-8-19
事件: 11:10:47
用户: N/A
计算机: TXOA
描述:
由于出现异常 c0000005,SQL Server 正在终止。此错误可能是由未处理的 Win32 或 C++ 异常造成的,也可能是因在处理异常过程中遇到的违规访问引起的。请查看 SQL 错误日志,获取任何相关的堆栈转储或消息。此异常会强制 SQL Server 关闭。要从此错误中恢复,请重新启动服务器(除非已将 SQLAgent 配置为自动重新启动)。
数据:
0000: 9f 43 00 00 10 00 00 00 ?C......
0008: 05 00 00 00 54 00 58 00 ....T.X.
0010: 4f 00 41 0

这里有没有微软中国的大侠啊,这个问题是到底怎么回事啊,在sql2000时,打sp3补丁可以解决,可是sql2005的sp1补丁我打了也没有解决啊,更奇怪的是,为什么我在“服务”中设置了sqlserver的故障恢复为“重新启动”也不执行呢???

我的数据库服务器配置是cpu:intel 至强 2.4×4,RAM:1GB,OS:MSWindows 2000 Advance Server

哪位大侠能告诉我这到底是为什么和怎么解决啊???

I think this might be a 'server guy' problem. It sounds like this is a windows issue.

You will probably need to work in tandem with that person to diagnose, if it keeps happening. Make sure your disks are good, RAM is good, etc. Think about rebuilding if it keeps happening.

Microsoft can read the dump for you, and there are switches, I believe, that you can set to make sure you get specific dump logs. If you are desperate and don't want to ask them, there are applications (some from them, I think) that can read a windows dump file.

|||Fatal exception tends to be a bug. I suggest you contact MS technical support.

Monday, March 26, 2012

Help! Something adds 1 hour to my datetimes! :-S

Hi,
For some reason, somewhere in my application 1 hour is added to my dates,
depending in which time zone the application is run...
Because I don't have a clue where this happens, I posted this to the three
relevant newsgroups (vb/ado, sql and xml): my aplogize for this.
I'm doing a Synchronisation between two SQL Servers (2000): All the Data is
read into a DataSet, and exported to an XML-file:
SQL Server -> DataSet (VB.NET 2003) -> XML -> DataSet -> SQL Server
When I run everything in the West Central Africa Timezone (GMT+1, no
summer-time): everything works fine. But I notice that all my dates in my
XML-file are written like this
"<DATE_DEB_APP>2006-02-01T00:00:00.0000000+01:00</DATE_DEB_APP> ": with the
"+01:00" at the end. But not that big of a problem, because the application
writes the date with 00:00 hours to the database.
I (well, my pc) is in the Brussels Timezone (GMT+1: but because of the
summer-hour we actuallt have GTM+2 now).
Everything goes fine also when I put the databse on my local SQL Server,
make the XML-file, read it again, and write it to the other database (also
local). All the dates are also presented with the "+01:00"-suffix. Except
one: a date that the application writes to the database when filling the
DataSet, and select it at the end to put it in the XML-file also: this one
gets the suffix "+02:00":
<SyncSend>2006-05-03T09:58:19.6070000+02:00</SyncSend>
So far so good: some not-really wanted things, but everything goes fine.
Problems start when I'm doing a synchronisation between an SQL server in
Central African TimeZone, and a local one in Brussels Timezone.
What hapens is that all my dates are having 1 hour added to them! So instead
of the "2006-02-01T00:00:00" they have as value "2006-02-01T01:00:00"!!
I somehow can understand why this happens; because 00:00h in Central Africa
is 01:00h in Brussels on this moment. But I don't want it to happen! I want
the exact time to be transfered!
Does anybody has a clue where this exactly happens? And how to prevent this?
Is there a way to say that it has to use the actual value? and not one that
calculates the time?
On this moment it's really nice to be able to use tha capbilities of the
DataSet with the XML-files and SqlDataAdapter with commandbuilder to do my
insert and updates. I won't really like to loose this :-S
Thanks a lot in advance!
Any help our hints would be really appreciated!
PieterReading your post, it sounds like you want the Brussels events to use UTC
and the African events to not. If so, you will have to write in something
that detects where the event is occuring and adjust, if necessary.
The system, itself, will either use UTC (default) or local. If you wanted to
configure to one or the other, it is possible. But, configuring different
client locations to different methods is problematic and will require custom
coding.
Hope I understand the problem. Good luck!
Gregory A. Beamer
****************************************
*********
Think Outside the Box!
****************************************
*********
"Pieter Coucke" <pietercoucke@.hotmail.com> wrote in message
news:OCQ59tobGHA.536@.TK2MSFTNGP02.phx.gbl...
> Hi,
> For some reason, somewhere in my application 1 hour is added to my dates,
> depending in which time zone the application is run...
> Because I don't have a clue where this happens, I posted this to the three
> relevant newsgroups (vb/ado, sql and xml): my aplogize for this.
> I'm doing a Synchronisation between two SQL Servers (2000): All the Data
> is read into a DataSet, and exported to an XML-file:
> SQL Server -> DataSet (VB.NET 2003) -> XML -> DataSet -> SQL Server
> When I run everything in the West Central Africa Timezone (GMT+1, no
> summer-time): everything works fine. But I notice that all my dates in my
> XML-file are written like this
> "<DATE_DEB_APP>2006-02-01T00:00:00.0000000+01:00</DATE_DEB_APP> ": with
> the "+01:00" at the end. But not that big of a problem, because the
> application writes the date with 00:00 hours to the database.
> I (well, my pc) is in the Brussels Timezone (GMT+1: but because of the
> summer-hour we actuallt have GTM+2 now).
> Everything goes fine also when I put the databse on my local SQL Server,
> make the XML-file, read it again, and write it to the other database (also
> local). All the dates are also presented with the "+01:00"-suffix. Except
> one: a date that the application writes to the database when filling the
> DataSet, and select it at the end to put it in the XML-file also: this one
> gets the suffix "+02:00":
> <SyncSend>2006-05-03T09:58:19.6070000+02:00</SyncSend>
> So far so good: some not-really wanted things, but everything goes fine.
> Problems start when I'm doing a synchronisation between an SQL server in
> Central African TimeZone, and a local one in Brussels Timezone.
> What hapens is that all my dates are having 1 hour added to them! So
> instead of the "2006-02-01T00:00:00" they have as value
> "2006-02-01T01:00:00"!!
> I somehow can understand why this happens; because 00:00h in Central
> Africa is 01:00h in Brussels on this moment. But I don't want it to
> happen! I want the exact time to be transfered!
> Does anybody has a clue where this exactly happens? And how to prevent
> this? Is there a way to say that it has to use the actual value? and not
> one that calculates the time?
> On this moment it's really nice to be able to use tha capbilities of the
> DataSet with the XML-files and SqlDataAdapter with commandbuilder to do my
> insert and updates. I won't really like to loose this :-S
> Thanks a lot in advance!
> Any help our hints would be really appreciated!
> Pieter
>|||Pieter,
This is due to the standard way in which dotnet DateTimes are serialized and
deserialized.
To see what is happening, write a test app and, run code like this :
==
DateTime dt = // set to any DateTime you want to test
MessageBox.Show(dt.ToString("yyyy-MM-dd HH:mm:ss")); // X
string SerializedDate = XmlConvert.ToString(dt);
MessageBox.Show(SerializedDate); // Y
==
Close this test app, then change to another timezone on your PC, restart
your test app, then run code like this :
==
string SerializedDate = // set to exact string value shown when "Y" above
is run.
DateTime dt = XmlConvert.ToDateTime(SerializedDate);
MessageBox.Show(dt.ToString("yyyy-MM-dd HH:mm:ss")); // Z
==
You should see that the values shown by X and Z are different, as a result
of a DateTime being serialized in one timezone, and deserialized in another.
One possible solution might be to manually modify the serialized XML at the
deserialization end, just before deserialization takes place. You'd need to
tweak the timezone components of the serialized DateTime strings, so that
they would look like local DateTimes when they are deserialized. (This
applies mainly for dotnet 1.1 - there may be better ways in dotnet 2.0).
HTH,
Stephen
"Pieter Coucke" <pietercoucke@.hotmail.com> wrote in message
news:OCQ59tobGHA.536@.TK2MSFTNGP02.phx.gbl...
> Hi,
> For some reason, somewhere in my application 1 hour is added to my dates,
> depending in which time zone the application is run...
> Because I don't have a clue where this happens, I posted this to the three
> relevant newsgroups (vb/ado, sql and xml): my aplogize for this.
> I'm doing a Synchronisation between two SQL Servers (2000): All the Data
> is read into a DataSet, and exported to an XML-file:
> SQL Server -> DataSet (VB.NET 2003) -> XML -> DataSet -> SQL Server
> When I run everything in the West Central Africa Timezone (GMT+1, no
> summer-time): everything works fine. But I notice that all my dates in my
> XML-file are written like this
> "<DATE_DEB_APP>2006-02-01T00:00:00.0000000+01:00</DATE_DEB_APP> ": with
> the "+01:00" at the end. But not that big of a problem, because the
> application writes the date with 00:00 hours to the database.
> I (well, my pc) is in the Brussels Timezone (GMT+1: but because of the
> summer-hour we actuallt have GTM+2 now).
> Everything goes fine also when I put the databse on my local SQL Server,
> make the XML-file, read it again, and write it to the other database (also
> local). All the dates are also presented with the "+01:00"-suffix. Except
> one: a date that the application writes to the database when filling the
> DataSet, and select it at the end to put it in the XML-file also: this one
> gets the suffix "+02:00":
> <SyncSend>2006-05-03T09:58:19.6070000+02:00</SyncSend>
> So far so good: some not-really wanted things, but everything goes fine.
> Problems start when I'm doing a synchronisation between an SQL server in
> Central African TimeZone, and a local one in Brussels Timezone.
> What hapens is that all my dates are having 1 hour added to them! So
> instead of the "2006-02-01T00:00:00" they have as value
> "2006-02-01T01:00:00"!!
> I somehow can understand why this happens; because 00:00h in Central
> Africa is 01:00h in Brussels on this moment. But I don't want it to
> happen! I want the exact time to be transfered!
> Does anybody has a clue where this exactly happens? And how to prevent
> this? Is there a way to say that it has to use the actual value? and not
> one that calculates the time?
> On this moment it's really nice to be able to use tha capbilities of the
> DataSet with the XML-files and SqlDataAdapter with commandbuilder to do my
> insert and updates. I won't really like to loose this :-S
> Thanks a lot in advance!
> Any help our hints would be really appreciated!
> Pieter
>|||Ok, Thanks for the advice Gregory and Stephen!

Help! Something adds 1 hour to my datetimes! :-S

Hi,
For some reason, somewhere in my application 1 hour is added to my dates,
depending in which time zone the application is run...
Because I don't have a clue where this happens, I posted this to the three
relevant newsgroups (vb/ado, sql and xml): my aplogize for this.
I'm doing a Synchronisation between two SQL Servers (2000): All the Data is
read into a DataSet, and exported to an XML-file:
SQL Server -> DataSet (VB.NET 2003) -> XML -> DataSet -> SQL Server
When I run everything in the West Central Africa Timezone (GMT+1, no
summer-time): everything works fine. But I notice that all my dates in my
XML-file are written like this
"<DATE_DEB_APP>2006-02-01T00:00:00.0000000+01:00</DATE_DEB_APP> ": with the
"+01:00" at the end. But not that big of a problem, because the application
writes the date with 00:00 hours to the database.
I (well, my pc) is in the Brussels Timezone (GMT+1: but because of the
summer-hour we actuallt have GTM+2 now).
Everything goes fine also when I put the databse on my local SQL Server,
make the XML-file, read it again, and write it to the other database (also
local). All the dates are also presented with the "+01:00"-suffix. Except
one: a date that the application writes to the database when filling the
DataSet, and select it at the end to put it in the XML-file also: this one
gets the suffix "+02:00":
<SyncSend>2006-05-03T09:58:19.6070000+02:00</SyncSend>
So far so good: some not-really wanted things, but everything goes fine.
Problems start when I'm doing a synchronisation between an SQL server in
Central African TimeZone, and a local one in Brussels Timezone.
What hapens is that all my dates are having 1 hour added to them! So instead
of the "2006-02-01T00:00:00" they have as value "2006-02-01T01:00:00"!!
I somehow can understand why this happens; because 00:00h in Central Africa
is 01:00h in Brussels on this moment. But I don't want it to happen! I want
the exact time to be transfered!
Does anybody has a clue where this exactly happens? And how to prevent this?
Is there a way to say that it has to use the actual value? and not one that
calculates the time?
On this moment it's really nice to be able to use tha capbilities of the
DataSet with the XML-files and SqlDataAdapter with commandbuilder to do my
insert and updates. I won't really like to loose this :-S
Thanks a lot in advance!
Any help our hints would be really appreciated!
PieterReading your post, it sounds like you want the Brussels events to use UTC
and the African events to not. If so, you will have to write in something
that detects where the event is occuring and adjust, if necessary.
The system, itself, will either use UTC (default) or local. If you wanted to
configure to one or the other, it is possible. But, configuring different
client locations to different methods is problematic and will require custom
coding.
Hope I understand the problem. Good luck!
--
Gregory A. Beamer
*************************************************
Think Outside the Box!
*************************************************
"Pieter Coucke" <pietercoucke@.hotmail.com> wrote in message
news:OCQ59tobGHA.536@.TK2MSFTNGP02.phx.gbl...
> Hi,
> For some reason, somewhere in my application 1 hour is added to my dates,
> depending in which time zone the application is run...
> Because I don't have a clue where this happens, I posted this to the three
> relevant newsgroups (vb/ado, sql and xml): my aplogize for this.
> I'm doing a Synchronisation between two SQL Servers (2000): All the Data
> is read into a DataSet, and exported to an XML-file:
> SQL Server -> DataSet (VB.NET 2003) -> XML -> DataSet -> SQL Server
> When I run everything in the West Central Africa Timezone (GMT+1, no
> summer-time): everything works fine. But I notice that all my dates in my
> XML-file are written like this
> "<DATE_DEB_APP>2006-02-01T00:00:00.0000000+01:00</DATE_DEB_APP> ": with
> the "+01:00" at the end. But not that big of a problem, because the
> application writes the date with 00:00 hours to the database.
> I (well, my pc) is in the Brussels Timezone (GMT+1: but because of the
> summer-hour we actuallt have GTM+2 now).
> Everything goes fine also when I put the databse on my local SQL Server,
> make the XML-file, read it again, and write it to the other database (also
> local). All the dates are also presented with the "+01:00"-suffix. Except
> one: a date that the application writes to the database when filling the
> DataSet, and select it at the end to put it in the XML-file also: this one
> gets the suffix "+02:00":
> <SyncSend>2006-05-03T09:58:19.6070000+02:00</SyncSend>
> So far so good: some not-really wanted things, but everything goes fine.
> Problems start when I'm doing a synchronisation between an SQL server in
> Central African TimeZone, and a local one in Brussels Timezone.
> What hapens is that all my dates are having 1 hour added to them! So
> instead of the "2006-02-01T00:00:00" they have as value
> "2006-02-01T01:00:00"!!
> I somehow can understand why this happens; because 00:00h in Central
> Africa is 01:00h in Brussels on this moment. But I don't want it to
> happen! I want the exact time to be transfered!
> Does anybody has a clue where this exactly happens? And how to prevent
> this? Is there a way to say that it has to use the actual value? and not
> one that calculates the time?
> On this moment it's really nice to be able to use tha capbilities of the
> DataSet with the XML-files and SqlDataAdapter with commandbuilder to do my
> insert and updates. I won't really like to loose this :-S
> Thanks a lot in advance!
> Any help our hints would be really appreciated!
> Pieter
>|||Pieter,
This is due to the standard way in which dotnet DateTimes are serialized and
deserialized.
To see what is happening, write a test app and, run code like this :
==DateTime dt = // set to any DateTime you want to test
MessageBox.Show(dt.ToString("yyyy-MM-dd HH:mm:ss")); // X
string SerializedDate = XmlConvert.ToString(dt);
MessageBox.Show(SerializedDate); // Y
==Close this test app, then change to another timezone on your PC, restart
your test app, then run code like this :
==string SerializedDate = // set to exact string value shown when "Y" above
is run.
DateTime dt = XmlConvert.ToDateTime(SerializedDate);
MessageBox.Show(dt.ToString("yyyy-MM-dd HH:mm:ss")); // Z
==
You should see that the values shown by X and Z are different, as a result
of a DateTime being serialized in one timezone, and deserialized in another.
One possible solution might be to manually modify the serialized XML at the
deserialization end, just before deserialization takes place. You'd need to
tweak the timezone components of the serialized DateTime strings, so that
they would look like local DateTimes when they are deserialized. (This
applies mainly for dotnet 1.1 - there may be better ways in dotnet 2.0).
HTH,
Stephen
"Pieter Coucke" <pietercoucke@.hotmail.com> wrote in message
news:OCQ59tobGHA.536@.TK2MSFTNGP02.phx.gbl...
> Hi,
> For some reason, somewhere in my application 1 hour is added to my dates,
> depending in which time zone the application is run...
> Because I don't have a clue where this happens, I posted this to the three
> relevant newsgroups (vb/ado, sql and xml): my aplogize for this.
> I'm doing a Synchronisation between two SQL Servers (2000): All the Data
> is read into a DataSet, and exported to an XML-file:
> SQL Server -> DataSet (VB.NET 2003) -> XML -> DataSet -> SQL Server
> When I run everything in the West Central Africa Timezone (GMT+1, no
> summer-time): everything works fine. But I notice that all my dates in my
> XML-file are written like this
> "<DATE_DEB_APP>2006-02-01T00:00:00.0000000+01:00</DATE_DEB_APP> ": with
> the "+01:00" at the end. But not that big of a problem, because the
> application writes the date with 00:00 hours to the database.
> I (well, my pc) is in the Brussels Timezone (GMT+1: but because of the
> summer-hour we actuallt have GTM+2 now).
> Everything goes fine also when I put the databse on my local SQL Server,
> make the XML-file, read it again, and write it to the other database (also
> local). All the dates are also presented with the "+01:00"-suffix. Except
> one: a date that the application writes to the database when filling the
> DataSet, and select it at the end to put it in the XML-file also: this one
> gets the suffix "+02:00":
> <SyncSend>2006-05-03T09:58:19.6070000+02:00</SyncSend>
> So far so good: some not-really wanted things, but everything goes fine.
> Problems start when I'm doing a synchronisation between an SQL server in
> Central African TimeZone, and a local one in Brussels Timezone.
> What hapens is that all my dates are having 1 hour added to them! So
> instead of the "2006-02-01T00:00:00" they have as value
> "2006-02-01T01:00:00"!!
> I somehow can understand why this happens; because 00:00h in Central
> Africa is 01:00h in Brussels on this moment. But I don't want it to
> happen! I want the exact time to be transfered!
> Does anybody has a clue where this exactly happens? And how to prevent
> this? Is there a way to say that it has to use the actual value? and not
> one that calculates the time?
> On this moment it's really nice to be able to use tha capbilities of the
> DataSet with the XML-files and SqlDataAdapter with commandbuilder to do my
> insert and updates. I won't really like to loose this :-S
> Thanks a lot in advance!
> Any help our hints would be really appreciated!
> Pieter
>|||Ok, Thanks for the advice Gregory and Stephen!

Help! Set up Windows Group to access application

I am sorry for cross-posting, but I'm used to posting in the programming
section and posted there as a force of habit.
I have an application written in VB6 that is hooked up to Sql Server 2005.
I can't seem to get a regular user to be able to access it. There's a Sql
Server error:
"Login failed for user ''. The user is not associated with a trusted Sql
Server connection." Note that it doesn't name the user; just supplies blank
single quotes together.
I want to use Windows Authentication. I set up a group in Active Directory
called CustomerService.
Can someone show me step by step how I set up the CustomerService group to
access the database MyDatabase?
Any help will be greatly appreciated!!
Sandy> "Login failed for user ''. The user is not associated with a trusted Sql
> Server connection." Note that it doesn't name the user; just supplies
> blank
> single quotes together.
I'm not sure of the significance of the empty string. Most often, the
message specifies user "(NULL)" and that means that the users Windows
credentials could not be verified and may be due to a number of different
reasons. For example, I've seen that happen when the client computer clock
was significantly different that the domain controller.

> Can someone show me step by step how I set up the CustomerService group to
> access the database MyDatabase?
You can grant all members of that AD group access to the database as
follows:
SQL 7 and SQL 2000:
EXEC sp_grantlogin 'MyDomain\CustomerService'
USE MyDatabase
EXEC sp_grantdbaccess 'MyDomain\CustomerService'
SQL 2005:
CREATE LOGIN [MyDomain\CustomerService]
FROM WINDOWS
USE MyDatabase
CREATE USER [MyDomain\CustomerService]
Hope this helps.
Dan Guzman
SQL Server MVP
"Sandy" <Sandy@.discussions.microsoft.com> wrote in message
news:A3D05D3B-79C1-4318-AFE7-E65604A0EFE5@.microsoft.com...
>I am sorry for cross-posting, but I'm used to posting in the programming
> section and posted there as a force of habit.
> I have an application written in VB6 that is hooked up to Sql Server 2005.
> I can't seem to get a regular user to be able to access it. There's a Sql
> Server error:
> "Login failed for user ''. The user is not associated with a trusted Sql
> Server connection." Note that it doesn't name the user; just supplies
> blank
> single quotes together.
> I want to use Windows Authentication. I set up a group in Active
> Directory
> called CustomerService.
> Can someone show me step by step how I set up the CustomerService group to
> access the database MyDatabase?
> Any help will be greatly appreciated!!
> --
> Sandy|||You would execute something like the following:
USE master
GO
CREATE LOGIN [YourDomain\SomeGroup]
FROM WINDOWS
WITH DEFAULT_DATABASE= YourDefaultDatabaseName
GO
USE YourDatabase
GO
CREATE USER [YourDomain\SomeGroup]
FOR LOGIN [YourDomain\SomeGroup]
WITH DEFAULT_SCHEMA= YourDefaultSchemaName
That's just to access the database. Then you need to figure
out permissions in the database.
-Sue
On Mon, 14 May 2007 17:45:01 -0700, Sandy
<Sandy@.discussions.microsoft.com> wrote:

>I am sorry for cross-posting, but I'm used to posting in the programming
>section and posted there as a force of habit.
>I have an application written in VB6 that is hooked up to Sql Server 2005.
>I can't seem to get a regular user to be able to access it. There's a Sql
>Server error:
>"Login failed for user ''. The user is not associated with a trusted Sql
>Server connection." Note that it doesn't name the user; just supplies blan
k
>single quotes together.
>I want to use Windows Authentication. I set up a group in Active Directory
>called CustomerService.
>Can someone show me step by step how I set up the CustomerService group to
>access the database MyDatabase?
>Any help will be greatly appreciated!!|||Thanks for your reply, Sue.
Would I use dbo as YourDefaultSchemaName?
I need all the users in YourDomain/SomeGroup to be able to execute stored
procedures, insert, update and delete on all tables in the database. How
would I word that?
Again, any help is greatly appreciated!
--
Sandy
"Sue Hoegemeier" wrote:

> You would execute something like the following:
> USE master
> GO
> CREATE LOGIN [YourDomain\SomeGroup]
> FROM WINDOWS
> WITH DEFAULT_DATABASE= YourDefaultDatabaseName
> GO
> USE YourDatabase
> GO
> CREATE USER [YourDomain\SomeGroup]
> FOR LOGIN [YourDomain\SomeGroup]
> WITH DEFAULT_SCHEMA= YourDefaultSchemaName
> That's just to access the database. Then you need to figure
> out permissions in the database.
> -Sue
> On Mon, 14 May 2007 17:45:01 -0700, Sandy
> <Sandy@.discussions.microsoft.com> wrote:
>
>

HELP! Server Error in '/Reports' Application.

Infrequently I get the following error message when trying to access the
report manager.
Server Error in '/Reports' Application.
----
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: Assembly microsoft.crm.platform.types.dll security
permission grant set is incompatible between appdomains.
Source Error:
Line 5: <assemblies>
Line 6: <add assembly="Microsoft.Crm.Platform.ComProxy,
Version=1.0.0000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 7: <add assembly="Microsoft.Crm.Platform.Types,
Version=1.2.3297.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 8: </assemblies>
Line 9: </compilation>
Source File: d:\inetpub\wwwroot\web.config Line: 7
----
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573You likely have a Code Access Security issue. This can be a complex issue to
describe, but Reporting Services is very fussy over code security. Basically
the default permissions of any code running in Reporting Services (RS) is
in-memory execution. Perhaps your assembly is trying to do something beyond
this. In that case you need to configure security in the files
rspreviewpolicy.config and rssrvpolicy.config. I would start by debugging
your assembly as you debug run your report from Visual Studio.
Look at the following msdn article:
http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/dngrfCodeAccessSecurityInSQLServer2000ReportingServices.asp?frame=true
The bottom line is that you need to fully understand code access security to
deploy any custom assembly. It would be very difficult to troubleshoot what
your problem is without looking closely at your code.
Charles Kangai, MCT, MCDBA
"SAcanuck" wrote:
> Infrequently I get the following error message when trying to access the
> report manager.
>
> Server Error in '/Reports' Application.
> ----
> Configuration Error
> Description: An error occurred during the processing of a configuration file
> required to service this request. Please review the specific error details
> below and modify your configuration file appropriately.
> Parser Error Message: Assembly microsoft.crm.platform.types.dll security
> permission grant set is incompatible between appdomains.
> Source Error:
>
> Line 5: <assemblies>
> Line 6: <add assembly="Microsoft.Crm.Platform.ComProxy,
> Version=1.0.0000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
> Line 7: <add assembly="Microsoft.Crm.Platform.Types,
> Version=1.2.3297.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
> Line 8: </assemblies>
> Line 9: </compilation>
>
> Source File: d:\inetpub\wwwroot\web.config Line: 7
>
> ----
> Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
> Version:1.1.4322.573|||Hi Charles:
Maybe Im just not understanding you...but we are using Reporting Services as
is...with no customized security. The problem is that we have MS CRM and
Reporting Services on the same server and we occassionally get the error
message.
"Charles Kangai" wrote:
> You likely have a Code Access Security issue. This can be a complex issue to
> describe, but Reporting Services is very fussy over code security. Basically
> the default permissions of any code running in Reporting Services (RS) is
> in-memory execution. Perhaps your assembly is trying to do something beyond
> this. In that case you need to configure security in the files
> rspreviewpolicy.config and rssrvpolicy.config. I would start by debugging
> your assembly as you debug run your report from Visual Studio.
> Look at the following msdn article:
> http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/dngrfCodeAccessSecurityInSQLServer2000ReportingServices.asp?frame=true
> The bottom line is that you need to fully understand code access security to
> deploy any custom assembly. It would be very difficult to troubleshoot what
> your problem is without looking closely at your code.
> Charles Kangai, MCT, MCDBA
>
> "SAcanuck" wrote:
> > Infrequently I get the following error message when trying to access the
> > report manager.
> >
> >
> > Server Error in '/Reports' Application.
> > ----
> >
> > Configuration Error
> > Description: An error occurred during the processing of a configuration file
> > required to service this request. Please review the specific error details
> > below and modify your configuration file appropriately.
> >
> > Parser Error Message: Assembly microsoft.crm.platform.types.dll security
> > permission grant set is incompatible between appdomains.
> >
> > Source Error:
> >
> >
> > Line 5: <assemblies>
> > Line 6: <add assembly="Microsoft.Crm.Platform.ComProxy,
> > Version=1.0.0000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
> > Line 7: <add assembly="Microsoft.Crm.Platform.Types,
> > Version=1.2.3297.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
> > Line 8: </assemblies>
> > Line 9: </compilation>
> >
> >
> > Source File: d:\inetpub\wwwroot\web.config Line: 7
> >
> >
> > ----
> > Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
> > Version:1.1.4322.573|||Greetings,
I had installed the SQL Reporting Services and then I installed the
microsoft CRM. I am facing the same error which SAcanuck is also facing.
I will really appreciate if any of you guys can help us out here.
Regards
"SAcanuck" wrote:
> Hi Charles:
> Maybe Im just not understanding you...but we are using Reporting Services as
> is...with no customized security. The problem is that we have MS CRM and
> Reporting Services on the same server and we occassionally get the error
> message.
> "Charles Kangai" wrote:
> > You likely have a Code Access Security issue. This can be a complex issue to
> > describe, but Reporting Services is very fussy over code security. Basically
> > the default permissions of any code running in Reporting Services (RS) is
> > in-memory execution. Perhaps your assembly is trying to do something beyond
> > this. In that case you need to configure security in the files
> > rspreviewpolicy.config and rssrvpolicy.config. I would start by debugging
> > your assembly as you debug run your report from Visual Studio.
> >
> > Look at the following msdn article:
> > http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/dngrfCodeAccessSecurityInSQLServer2000ReportingServices.asp?frame=true
> >
> > The bottom line is that you need to fully understand code access security to
> > deploy any custom assembly. It would be very difficult to troubleshoot what
> > your problem is without looking closely at your code.
> >
> > Charles Kangai, MCT, MCDBA
> >
> >
> > "SAcanuck" wrote:
> >
> > > Infrequently I get the following error message when trying to access the
> > > report manager.
> > >
> > >
> > > Server Error in '/Reports' Application.
> > > ----
> > >
> > > Configuration Error
> > > Description: An error occurred during the processing of a configuration file
> > > required to service this request. Please review the specific error details
> > > below and modify your configuration file appropriately.
> > >
> > > Parser Error Message: Assembly microsoft.crm.platform.types.dll security
> > > permission grant set is incompatible between appdomains.
> > >
> > > Source Error:
> > >
> > >
> > > Line 5: <assemblies>
> > > Line 6: <add assembly="Microsoft.Crm.Platform.ComProxy,
> > > Version=1.0.0000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
> > > Line 7: <add assembly="Microsoft.Crm.Platform.Types,
> > > Version=1.2.3297.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
> > > Line 8: </assemblies>
> > > Line 9: </compilation>
> > >
> > >
> > > Source File: d:\inetpub\wwwroot\web.config Line: 7
> > >
> > >
> > > ----
> > > Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
> > > Version:1.1.4322.573

Monday, March 19, 2012

HELP! Incomplete data in SQL Server table.

Hi SQL Server Experts,

I really need some help ASAP.I thank you in advance.

We have an ASP/MS SQL Server Shopping cart application,developed by an
independent developer.We really have a problem where the Order_details
are not getting stored completely.

The concerned Tables are:

Table1 Order_Info
Stores Order_ID,customer data,Total_Amount,Shipping details etc.
(One Record per Order.)

Table2 Order_details
Stores Order_ID,Product_Id,Price and Quantity.
(Multiple Records per Order.Basically stores the shopping cart items,
one by one.)

Table3 Payment_Info
Stores Order_ID and Transaction Details
(One Record per Order.)

Now after a customer checks out and the payment transaction has been
approved the order details are stored this way.

Step 1: First a new record is added to Table1 (Order_Info).

Step 2: A 'For' loop adds new records - one for each item in the cart-
to Table2(Order_details).

Step 3: A new record is added to the Table3 (Payment_Info).

Recently, we have been having problems with Step 2, where only a
partial list of the item details are stored in the Database and Step 3
is not executed at all.

And we don't have the problem all the time.

What could be the problem with Step 2 where a series of record are
added to a table continuosly? does this make SQL Server "too busy" so
that subsequent Add operations are not done?
Can someone see an apparent problem?

Any solution is greatly appeciated.

Please HELP ME!

Thanks.

SriramHi Sriram

If the Step 2 and 3 are really executed but no records are stored in the
database
there should be some error codes/messages returned by sql server.
You have to modify your application to log those errors so that you can
check them.

If you can't modify your application, you can use the SQL Profiler to make a
trace so
that you can try to insert the records manually with the SQL Analyzer (cut
and paste sql text).
By doing that you may reproduce the error and see the messages displayed by
sql.

Possible errors are:
database is not auto expand
log is full
duplicate keys (application bug)
etc...

By the way, you can also have a look at the sql server log with
Enterprise Manager.

Regards

Alain

"Sriram" <sriram.santhanam@.gmail.com> a crit dans le message de
news:67039024.0409071329.427c2f23@.posting.google.c om...
> Hi SQL Server Experts,
> I really need some help ASAP.I thank you in advance.
> We have an ASP/MS SQL Server Shopping cart application,developed by an
> independent developer.We really have a problem where the Order_details
> are not getting stored completely.
> The concerned Tables are:
> Table1 Order_Info
> Stores Order_ID,customer data,Total_Amount,Shipping details etc.
> (One Record per Order.)
> Table2 Order_details
> Stores Order_ID,Product_Id,Price and Quantity.
> (Multiple Records per Order.Basically stores the shopping cart items,
> one by one.)
> Table3 Payment_Info
> Stores Order_ID and Transaction Details
> (One Record per Order.)
> Now after a customer checks out and the payment transaction has been
> approved the order details are stored this way.
> Step 1: First a new record is added to Table1 (Order_Info).
> Step 2: A 'For' loop adds new records - one for each item in the cart-
> to Table2(Order_details).
> Step 3: A new record is added to the Table3 (Payment_Info).
> Recently, we have been having problems with Step 2, where only a
> partial list of the item details are stored in the Database and Step 3
> is not executed at all.
> And we don't have the problem all the time.
> What could be the problem with Step 2 where a series of record are
> added to a table continuosly? does this make SQL Server "too busy" so
> that subsequent Add operations are not done?
> Can someone see an apparent problem?
> Any solution is greatly appeciated.
> Please HELP ME!
> Thanks.
> Sriram|||Sriram (sriram.santhanam@.gmail.com) writes:
> Recently, we have been having problems with Step 2, where only a
> partial list of the item details are stored in the Database and Step 3
> is not executed at all.
> And we don't have the problem all the time.
> What could be the problem with Step 2 where a series of record are
> added to a table continuosly? does this make SQL Server "too busy" so
> that subsequent Add operations are not done?
> Can someone see an apparent problem?

Forget about SQL Server being "too busy". This is an application error,
that I can tell from this little information. What the error is, I can
of course not tell. But likely reasons:

1) The loop is faulty and simply fails to include some rows.

2) Some of the order_details rows fails to save because of constraint
violations, and the application does not have proper error handling
to detect the error and rollback the transaction. (Or it does not
even start a transaction.)

As Alain suggested, use the Profiler to see what is being sent to SQL
Server. You can also trace for errors. Note that if you trace for both
StmtStarting and StmtCompleted and don't see Completed for a statement,
it may be because it failed.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Thanks alain and Erland for replying.

The only problem is,

The application works everytime I test it.Only when someone is placing
an order from other geographical areas problem occurs.Even, when I place
the exact same order again, it goes through without any problem. All
values are stored correctly.

I cannot find out why or when this problem occurs.That is why I am
wondering if it is something else other than an application error.

Further, duplicate keys are allowed for this Table.

I'm currently rewriting the application.Any suggestion is greatly
appreciated.

Thanks.

Sriram

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Sriram Santhanam (sriram.santhanam@.gmail.com) writes:
> The only problem is,
> The application works everytime I test it.Only when someone is placing
> an order from other geographical areas problem occurs.Even, when I place
> the exact same order again, it goes through without any problem. All
> values are stored correctly.
> I cannot find out why or when this problem occurs.That is why I am
> wondering if it is something else other than an application error.

It could be deadlocks that are not correctly handled. Do you have
deadlock tracing enabled? If not, use Enterprise Manager to add
-T1204 and -T3605 to the startup parameters, and restart SQL Server
(assuming that you can afford a restart). If you can correlated the
deadlock with the incomplete orders, you have a lead.)

Of course, it could be a problem that is related to the web server only,
in which case I have no clues at all.

> Further, duplicate keys are allowed for this Table.

Eh? That does not sound good.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||
Thanks Erland,

I would enable Deadlock Tracing and check it out.

As you had mentioned that duplicate keys are bad(I think so too but
someone had done the DB design long time back)
is there a better way to store the item details in the order
(Product_Id,Price,Qty at the minimum) than the current scenario I had
described above - Table2 where each record consists of
Order_Id,Product_Id,Price,Qty and whenever Item details are required a
query of all records by the Order_id is done.

Thanks.
Sriram

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Sriram Santhanam (sriram.santhanam@.gmail.com) writes:
> As you had mentioned that duplicate keys are bad(I think so too but
> someone had done the DB design long time back)
> is there a better way to store the item details in the order
> (Product_Id,Price,Qty at the minimum) than the current scenario I had
> described above - Table2 where each record consists of
> Order_Id,Product_Id,Price,Qty and whenever Item details are required a
> query of all records by the Order_id is done.

The obvious natural key is (Order_id, Product_id), but that presumes that
a product cannot be ordered at two prices. For instance, because there is
a limited offer, and the customer wants more. This situation could be
handled with promotion codes.

A more common way is probably to add a rowno within the Order. If this
rowno is computed in the client, there is a protection of entering the
same row twice.

In general it is difficult to be precise with detailed knowledge of the
business rules.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Monday, March 12, 2012

Help! Db-library network communications layer not loaded.

Hi,
We are using a windows application that uses MSDE 2000 on an XP Pro Machine
as a server.
Everthing was fine until last Friday. Suddenly, the XP server computer
started to give this error "Db-library network communications layer not
loaded." when we started to run application on it.
From other client computers we can succesfully connect and run the
application, but somehow the main machine does not work. I thought the
automatic update was on and it updated some MDAC drivers or may be Net
framework. I tried to install MDAC 2.7, but still no change. (I tired some
web searches but still nothing)
I really appreciate if you can give any suggestions/solutions.
Thanks.
Onur Baser
DB-Library is not part of MDAC or MSDE, so probably you had it on your other
machine because you installed the client tools or something.
Anyhow I also hope you realize that DB-Library is a dead API since the
introduction of SQL Server 7.0 in 1998 and it does not allow you to connect
to named instances for example (without using an alias or protocol prefix),
Unicode, strings longer then 255 or any of the other new data types
introduced in SQL Server 7.0 or 2000.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2004 All rights reserved.
"Onur Baser" <onur@.baserler.com> wrote in message
news:u18HnHVlEHA.596@.TK2MSFTNGP11.phx.gbl...
> Hi,
> We are using a windows application that uses MSDE 2000 on an XP Pro
> Machine as a server.
> Everthing was fine until last Friday. Suddenly, the XP server computer
> started to give this error "Db-library network communications layer not
> loaded." when we started to run application on it.
> From other client computers we can succesfully connect and run the
> application, but somehow the main machine does not work. I thought the
> automatic update was on and it updated some MDAC drivers or may be Net
> framework. I tried to install MDAC 2.7, but still no change. (I tired some
> web searches but still nothing)
> I really appreciate if you can give any suggestions/solutions.
> Thanks.
> Onur Baser
>
|||Thank you,
I will see what I can do, but is really wierd that it just happened.
Best Regards,
OnuR
"Gert E.R. Drapers" <GertD@.SQLDev.Net> wrote in message
news:uLSRUJWlEHA.3432@.TK2MSFTNGP14.phx.gbl...
> DB-Library is not part of MDAC or MSDE, so probably you had it on your
> other machine because you installed the client tools or something.
> Anyhow I also hope you realize that DB-Library is a dead API since the
> introduction of SQL Server 7.0 in 1998 and it does not allow you to
> connect to named instances for example (without using an alias or protocol
> prefix), Unicode, strings longer then 255 or any of the other new data
> types introduced in SQL Server 7.0 or 2000.
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> You assume all risk for your use.
> Copyright SQLDev.Net 1991-2004 All rights reserved.
> "Onur Baser" <onur@.baserler.com> wrote in message
> news:u18HnHVlEHA.596@.TK2MSFTNGP11.phx.gbl...
>

HELP! Database lost ALL Data!

Anyone ever heard of this?
I got a complaint form a customer. No one can log on to the application. I
took a look at the database (SQL Server 2000) it was empty. I never saw such
a sight before. Even when we ship the database brand new, it is seeded with
some metadata entries. But this database was completely blank.
The only way I can think this could conceivably happen is for a DTS package
to start a database transfer, drop and recreate all the tables and then
terminate before it begins copying data. But no one will admit to running
any DTS jobs. One of our techs was on their box today, but he swears he just
ran a batch file to copy some filesystem (not database) files.
Either someone is lying, or maybe there's another reason why this could
happen? If you can explain how this might have happened, you'll get one of
our support techs out of a lot of trouble.
Thanks!
- Joe Geretz -Hi,
By default SQL Server will not audit any activity inside database. In this
scenario you could identify the problem by veryfying scripts ran.
One more way is if your recovery model is FULL or BULK_LOGGED you could use
log explorer to read the trasnaction log file.
See the link for the details on Logexplorer.
www.lumigent.com
FYI, If you have the database in FULL recovery plus if you have full
database backup and all trasnaction log backups you
could recover the database using POINT_IN_TIME recovery.
Thanks
Hari
MCDBA
"Joseph Geretz" <jgeretz@.nospam.com> wrote in message
news:eL2gtr4bEHA.3580@.TK2MSFTNGP11.phx.gbl...
> Anyone ever heard of this?
> I got a complaint form a customer. No one can log on to the application. I
> took a look at the database (SQL Server 2000) it was empty. I never saw
such
> a sight before. Even when we ship the database brand new, it is seeded
with
> some metadata entries. But this database was completely blank.
> The only way I can think this could conceivably happen is for a DTS
package
> to start a database transfer, drop and recreate all the tables and then
> terminate before it begins copying data. But no one will admit to running
> any DTS jobs. One of our techs was on their box today, but he swears he
just
> ran a batch file to copy some filesystem (not database) files.
> Either someone is lying, or maybe there's another reason why this could
> happen? If you can explain how this might have happened, you'll get one of
> our support techs out of a lot of trouble.
> Thanks!
> - Joe Geretz -
>|||I believe I've found the cause for the database erasure and I've documented
this in my posting
Use of (local) in DTS. Dangerous!!!? of 7/25/2004.
If you have any further comments on my situation, I'd be most grateful to
hear them.
Thanks!
- Joe Geretz -
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:uSU2Xt5bEHA.996@.TK2MSFTNGP12.phx.gbl...
> Hi,
> By default SQL Server will not audit any activity inside database. In this
> scenario you could identify the problem by veryfying scripts ran.
> One more way is if your recovery model is FULL or BULK_LOGGED you could
use
> log explorer to read the trasnaction log file.
> See the link for the details on Logexplorer.
> www.lumigent.com
> FYI, If you have the database in FULL recovery plus if you have full
> database backup and all trasnaction log backups you
> could recover the database using POINT_IN_TIME recovery.
> Thanks
> Hari
> MCDBA
>
> "Joseph Geretz" <jgeretz@.nospam.com> wrote in message
> news:eL2gtr4bEHA.3580@.TK2MSFTNGP11.phx.gbl...
I[vbcol=seagreen]
> such
> with
> package
running[vbcol=seagreen]
> just
of[vbcol=seagreen]
>

HELP! Database lost ALL Data!

Anyone ever heard of this?
I got a complaint form a customer. No one can log on to the application. I
took a look at the database (SQL Server 2000) it was empty. I never saw such
a sight before. Even when we ship the database brand new, it is seeded with
some metadata entries. But this database was completely blank.
The only way I can think this could conceivably happen is for a DTS package
to start a database transfer, drop and recreate all the tables and then
terminate before it begins copying data. But no one will admit to running
any DTS jobs. One of our techs was on their box today, but he swears he just
ran a batch file to copy some filesystem (not database) files.
Either someone is lying, or maybe there's another reason why this could
happen? If you can explain how this might have happened, you'll get one of
our support techs out of a lot of trouble.
Thanks!
- Joe Geretz -Hi,
By default SQL Server will not audit any activity inside database. In this
scenario you could identify the problem by veryfying scripts ran.
One more way is if your recovery model is FULL or BULK_LOGGED you could use
log explorer to read the trasnaction log file.
See the link for the details on Logexplorer.
www.lumigent.com
FYI, If you have the database in FULL recovery plus if you have full
database backup and all trasnaction log backups you
could recover the database using POINT_IN_TIME recovery.
Thanks
Hari
MCDBA
"Joseph Geretz" <jgeretz@.nospam.com> wrote in message
news:eL2gtr4bEHA.3580@.TK2MSFTNGP11.phx.gbl...
> Anyone ever heard of this?
> I got a complaint form a customer. No one can log on to the application. I
> took a look at the database (SQL Server 2000) it was empty. I never saw
such
> a sight before. Even when we ship the database brand new, it is seeded
with
> some metadata entries. But this database was completely blank.
> The only way I can think this could conceivably happen is for a DTS
package
> to start a database transfer, drop and recreate all the tables and then
> terminate before it begins copying data. But no one will admit to running
> any DTS jobs. One of our techs was on their box today, but he swears he
just
> ran a batch file to copy some filesystem (not database) files.
> Either someone is lying, or maybe there's another reason why this could
> happen? If you can explain how this might have happened, you'll get one of
> our support techs out of a lot of trouble.
> Thanks!
> - Joe Geretz -
>|||I believe I've found the cause for the database erasure and I've documented
this in my posting
Use of (local) in DTS. Dangerous!!!? of 7/25/2004.
If you have any further comments on my situation, I'd be most grateful to
hear them.
Thanks!
- Joe Geretz -
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:uSU2Xt5bEHA.996@.TK2MSFTNGP12.phx.gbl...
> Hi,
> By default SQL Server will not audit any activity inside database. In this
> scenario you could identify the problem by veryfying scripts ran.
> One more way is if your recovery model is FULL or BULK_LOGGED you could
use
> log explorer to read the trasnaction log file.
> See the link for the details on Logexplorer.
> www.lumigent.com
> FYI, If you have the database in FULL recovery plus if you have full
> database backup and all trasnaction log backups you
> could recover the database using POINT_IN_TIME recovery.
> Thanks
> Hari
> MCDBA
>
> "Joseph Geretz" <jgeretz@.nospam.com> wrote in message
> news:eL2gtr4bEHA.3580@.TK2MSFTNGP11.phx.gbl...
> > Anyone ever heard of this?
> >
> > I got a complaint form a customer. No one can log on to the application.
I
> > took a look at the database (SQL Server 2000) it was empty. I never saw
> such
> > a sight before. Even when we ship the database brand new, it is seeded
> with
> > some metadata entries. But this database was completely blank.
> >
> > The only way I can think this could conceivably happen is for a DTS
> package
> > to start a database transfer, drop and recreate all the tables and then
> > terminate before it begins copying data. But no one will admit to
running
> > any DTS jobs. One of our techs was on their box today, but he swears he
> just
> > ran a batch file to copy some filesystem (not database) files.
> >
> > Either someone is lying, or maybe there's another reason why this could
> > happen? If you can explain how this might have happened, you'll get one
of
> > our support techs out of a lot of trouble.
> >
> > Thanks!
> >
> > - Joe Geretz -
> >
> >
>

HELP! Database lost ALL Data!

Anyone ever heard of this?
I got a complaint form a customer. No one can log on to the application. I
took a look at the database (SQL Server 2000) it was empty. I never saw such
a sight before. Even when we ship the database brand new, it is seeded with
some metadata entries. But this database was completely blank.
The only way I can think this could conceivably happen is for a DTS package
to start a database transfer, drop and recreate all the tables and then
terminate before it begins copying data. But no one will admit to running
any DTS jobs. One of our techs was on their box today, but he swears he just
ran a batch file to copy some filesystem (not database) files.
Either someone is lying, or maybe there's another reason why this could
happen? If you can explain how this might have happened, you'll get one of
our support techs out of a lot of trouble.
Thanks!
- Joe Geretz -
Hi,
By default SQL Server will not audit any activity inside database. In this
scenario you could identify the problem by veryfying scripts ran.
One more way is if your recovery model is FULL or BULK_LOGGED you could use
log explorer to read the trasnaction log file.
See the link for the details on Logexplorer.
www.lumigent.com
FYI, If you have the database in FULL recovery plus if you have full
database backup and all trasnaction log backups you
could recover the database using POINT_IN_TIME recovery.
Thanks
Hari
MCDBA
"Joseph Geretz" <jgeretz@.nospam.com> wrote in message
news:eL2gtr4bEHA.3580@.TK2MSFTNGP11.phx.gbl...
> Anyone ever heard of this?
> I got a complaint form a customer. No one can log on to the application. I
> took a look at the database (SQL Server 2000) it was empty. I never saw
such
> a sight before. Even when we ship the database brand new, it is seeded
with
> some metadata entries. But this database was completely blank.
> The only way I can think this could conceivably happen is for a DTS
package
> to start a database transfer, drop and recreate all the tables and then
> terminate before it begins copying data. But no one will admit to running
> any DTS jobs. One of our techs was on their box today, but he swears he
just
> ran a batch file to copy some filesystem (not database) files.
> Either someone is lying, or maybe there's another reason why this could
> happen? If you can explain how this might have happened, you'll get one of
> our support techs out of a lot of trouble.
> Thanks!
> - Joe Geretz -
>
|||I believe I've found the cause for the database erasure and I've documented
this in my posting
Use of (local) in DTS. Dangerous!!!? of 7/25/2004.
If you have any further comments on my situation, I'd be most grateful to
hear them.
Thanks!
- Joe Geretz -
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:uSU2Xt5bEHA.996@.TK2MSFTNGP12.phx.gbl...
> Hi,
> By default SQL Server will not audit any activity inside database. In this
> scenario you could identify the problem by veryfying scripts ran.
> One more way is if your recovery model is FULL or BULK_LOGGED you could
use[vbcol=seagreen]
> log explorer to read the trasnaction log file.
> See the link for the details on Logexplorer.
> www.lumigent.com
> FYI, If you have the database in FULL recovery plus if you have full
> database backup and all trasnaction log backups you
> could recover the database using POINT_IN_TIME recovery.
> Thanks
> Hari
> MCDBA
>
> "Joseph Geretz" <jgeretz@.nospam.com> wrote in message
> news:eL2gtr4bEHA.3580@.TK2MSFTNGP11.phx.gbl...
I[vbcol=seagreen]
> such
> with
> package
running[vbcol=seagreen]
> just
of
>

help! data connection

i am using VS05 and sql05express. After I created a new web application i want to add a database. But when I do so i got the following message:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

is anybody know what's wrong here? what should i do? thx

This error has been asked many times on the forumSmile Firstly you should ensure you have enabled remote connection of the SQL Express from 'SQL Server Surface Area Configuration'; then enable TCP/IP and Named Pipe protocol on both Server and Client side in 'SQL Server Configuraiton Manager'. After that, if you still have problem, you should check your conneciton string.|||thank you very much, now i am all set to goBig Smile

Monday, February 27, 2012

Help writing SQL

I want to select records where a column is null, is not null or is equal to a specific number. How do I do this in one sql statement. My application is an asp.net web site with a business logic layer, a data access layer and sql server. Thank you in advance.select *
from tb
where isnull(col,'*')=isnull(@.search,'*')

Friday, February 24, 2012

help with writting a trigger

Hi,
I have 2 tables ''Data' and 'LatestData' with same fields:
- ID,
- TruckNo,
- DateTime,
- Comment.
My application adds data to the Data table. I would like to have a trigger
which automatically updates or adds (if not exists) newly added records into
LatestData table. This trigger should also look at DateTime, and add records
only if they are newer then existing for a TruckNo.
So LatestData table contains only one and newest record per one TruckNo.
Thanks for help.
PrzemoHi
(untesed)
IF NOT EXISTS
(SELECT * FROM LatestData WHERE LatestData.TruckNo=inserted.TruckNo)
INSERT INTO LatestData SELECT * FROM Inserted
IF NOT EXISTS
(SELECT * FROM LatestData WHERE LatestData.ID=inserted.ID)
INSERT INTO LatestData SELECT * FROM Inserted
ELSE
UPDATE LatestData SET col=(SELECT i.col FROM inserted i JOIN deleted d
ON d.ID=i.ID)
WHERE EXISTS
(SELECT * FROM LatestData WHERE LatestData.ID=deleted.ID)
"Przemo" <Przemo@.discussions.microsoft.com> wrote in message
news:85F7771F-96E1-42FB-9B2D-F8EC02BCCED1@.microsoft.com...
> Hi,
> I have 2 tables ''Data' and 'LatestData' with same fields:
> - ID,
> - TruckNo,
> - DateTime,
> - Comment.
> My application adds data to the Data table. I would like to have a trigger
> which automatically updates or adds (if not exists) newly added records
> into
> LatestData table. This trigger should also look at DateTime, and add
> records
> only if they are newer then existing for a TruckNo.
> So LatestData table contains only one and newest record per one TruckNo.
> Thanks for help.
> Przemo|||CREATE TRIGGER [TR1] ON [dbo].[Data]
FOR INSERT, UPDATE, DELETE
AS
IF EXISTS
(SELECT * FROM LatestData,Inserted WHERE LatestData.ID=inserted.ID)
DELETE FROM LatestData WHERE ID IN( SELECT INSERTED.ID FROM
LatestData,Inserted WHERE LatestData.ID=inserted.ID)
INSERT INTO LatestData SELECT * FROM Inserted
---
Hi Uri,
I used your logic only, thanks for that but thought not to mess up with
update. I tested your code but it failed the update part and tehre was few
syntax error also.
The above logic delete updated record from LatestData so we consider it as a
new Insert and not to mess with update.
Thanks,
Sree
"Uri Dimant" wrote:

> Hi
>
> (untesed)
>
> IF NOT EXISTS
> (SELECT * FROM LatestData WHERE LatestData.TruckNo=inserted.TruckNo)
> INSERT INTO LatestData SELECT * FROM Inserted
>
> IF NOT EXISTS
> (SELECT * FROM LatestData WHERE LatestData.ID=inserted.ID)
> INSERT INTO LatestData SELECT * FROM Inserted
> ELSE
> UPDATE LatestData SET col=(SELECT i.col FROM inserted i JOIN deleted d
> ON d.ID=i.ID)
> WHERE EXISTS
> (SELECT * FROM LatestData WHERE LatestData.ID=deleted.ID)
>
>
> "Przemo" <Przemo@.discussions.microsoft.com> wrote in message
> news:85F7771F-96E1-42FB-9B2D-F8EC02BCCED1@.microsoft.com...
>
>

Help With Where Clause

I am creating a food database application where I allow the user to search
for food names. For this example, lets supposed that my database has the
following food names on the table.
Salt with water
Chips and salsa
Fried Chicken
Guacamole
If the user types 'sa' on the search textbox I would like to retrieve the
following records:
Salt with water
Chips and salsa
This is because Salt starts with 'sa' and salsa also starts with 'sa'. If
the user typed 'sa ch' (this is the string 'sa' then a space and then the
string 'ch'). I would like to retrieve the records
Salt with water
Chips and salsa
Fried Chicken
I get the same records as before because I included the string 'sa' and I
get the record 'Fried Chicken' because Chicken starts with 'ch'. The problem
is that the user can have as many words as he or she pleases. It even gets
more complicated because I would like to use a store procedure on Microsoft
SQL server.
Could someone help me creating this store procedure, PLEASE! Thank you.Rene
See if this helps
CREATE TABLE #Test
(
col VARCHAR(50)
)
INSERT INTO #Test VALUES ('Salt with water')
INSERT INTO #Test VALUES ('Chips and salsa')
INSERT INTO #Test VALUES ('Fried Chicken')
INSERT INTO #Test VALUES ('Guacamole')
SELECT * FROM #Test WHERE col LIKE '%sa%'
"Rene" <nospam@.nospam.com> wrote in message
news:uI8eG$kaFHA.3120@.TK2MSFTNGP12.phx.gbl...
> I am creating a food database application where I allow the user to search
> for food names. For this example, lets supposed that my database has the
> following food names on the table.
> Salt with water
> Chips and salsa
> Fried Chicken
> Guacamole
> If the user types 'sa' on the search textbox I would like to retrieve the
> following records:
> Salt with water
> Chips and salsa
> This is because Salt starts with 'sa' and salsa also starts with 'sa'. If
> the user typed 'sa ch' (this is the string 'sa' then a space and then the
> string 'ch'). I would like to retrieve the records
> Salt with water
> Chips and salsa
> Fried Chicken
> I get the same records as before because I included the string 'sa' and I
> get the record 'Fried Chicken' because Chicken starts with 'ch'. The
problem
> is that the user can have as many words as he or she pleases. It even gets
> more complicated because I would like to use a store procedure on
Microsoft
> SQL server.
> Could someone help me creating this store procedure, PLEASE! Thank you.
>|||> SELECT * FROM #Test WHERE col LIKE '%sa%'
This won't work. Aquery like this will also return food name such as 'Carne
Aa' because 'Aa' has 'sa' inside its text, I am only interested on
food that has any of its words *start* with the string 'sa'.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23OXdQmlaFHA.3364@.TK2MSFTNGP09.phx.gbl...
> Rene
> See if this helps
> CREATE TABLE #Test
> (
> col VARCHAR(50)
> )
> INSERT INTO #Test VALUES ('Salt with water')
> INSERT INTO #Test VALUES ('Chips and salsa')
> INSERT INTO #Test VALUES ('Fried Chicken')
> INSERT INTO #Test VALUES ('Guacamole')
> SELECT * FROM #Test WHERE col LIKE '%sa%'
>
> "Rene" <nospam@.nospam.com> wrote in message
> news:uI8eG$kaFHA.3120@.TK2MSFTNGP12.phx.gbl...
> problem
> Microsoft
>|||WHERE col LIKE '% sa%' or col like LIKE '%,sa%' or col like LIKE '%.sa%' or
left(col, 2) = 'sa'
You know where I'm going with this, right.
I have seen a script (stored procedure or function) that extracts words from
a string and converts it to a table, one word per column
This may help you with this problem. Maybe someone here could point you to
the script. I can't seem to be able to find it right now.
"Rene" <nospam@.nospam.com> wrote in message
news:ONj7qTqaFHA.2736@.TK2MSFTNGP12.phx.gbl...
> This won't work. Aquery like this will also return food name such as
> 'Carne Aa' because 'Aa' has 'sa' inside its text, I am only
> interested on food that has any of its words *start* with the string 'sa'.
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:%23OXdQmlaFHA.3364@.TK2MSFTNGP09.phx.gbl...
>