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

Tuesday, March 27, 2012

Datasource cannot be found after report redeployment

We have an application using the winforms report viewer, and it displays all our reports perfectly untill I need to redeploy a report.

As soon as a report is re-deployed a refresh of the report in the viewer shows the following error message:

An error has occured during report processing. The data souce 'mydatasource' cannot be found.

This error occurs irrespective of electing to re-deploy ot not re-deploy the datasource, and the only solution seems to be to close the report viewer down and restart it.

I can reproduce the same problem hosting the reports in a web browser as well, with a slightly different error message

An error has occurred during report processing. (rsProcessingAborted). The data source 'mydatasource' cannot be found. (rsDataSourceNotFound)

Under RS2000 any changes that were made to a report, would automatically be shown to the user if the report was refreshed, without having to close the browser/application down and restart it.

Can I configure RS2005 to prevent this error occuring ? I have read that RS2005 seems to work a lot more within the IIS session for the user and cache things it thinks are usefull, so can I turn this behaviour off, or make it run like RS 2000 did, which provided me with a stable reporting platform?

If I cannot do this from the RS end of the system, is there any advice on using the winforms control to get around this issue - i've only just started using the control so I am not familiar with all its aspects !

Thanks

Andy

Hi Andy, did you ever resolve this? (I'm experiencing the same problem)

Cheers,

George

Sunday, March 25, 2012

Datasource cannot be found after report redeployment

We have an application using the winforms report viewer, and it displays all our reports perfectly untill I need to redeploy a report.

As soon as a report is re-deployed a refresh of the report in the viewer shows the following error message:

An error has occured during report processing. The data souce 'mydatasource' cannot be found.

This error occurs irrespective of electing to re-deploy ot not re-deploy the datasource, and the only solution seems to be to close the report viewer down and restart it.

I can reproduce the same problem hosting the reports in a web browser as well, with a slightly different error message

An error has occurred during report processing. (rsProcessingAborted). The data source 'mydatasource' cannot be found. (rsDataSourceNotFound)

Under RS2000 any changes that were made to a report, would automatically be shown to the user if the report was refreshed, without having to close the browser/application down and restart it.

Can I configure RS2005 to prevent this error occuring ? I have read that RS2005 seems to work a lot more within the IIS session for the user and cache things it thinks are usefull, so can I turn this behaviour off, or make it run like RS 2000 did, which provided me with a stable reporting platform?

If I cannot do this from the RS end of the system, is there any advice on using the winforms control to get around this issue - i've only just started using the control so I am not familiar with all its aspects !

Thanks

Andy

Hi Andy, did you ever resolve this? (I'm experiencing the same problem)

Cheers,

George

Dataset.Clear() doesn't mark rows as deleted

Ok, I've spent a good amount on time on debugging an unupdating scenario in my application. Finally I knew the reason which is very annoying. Either I'm missing something really obvious (I hope so,) or this is a bug.

to reproduce what I'm talking about:
1- create a new win forms application using VS2005 sp1
2- add some SQL Compact Edition data file that have some records from the data menu, you'll get the designer to generate the dataset and everything..
3- drag a table from the data sources window, you'll get the data grid and the navigator on the form
4- add a button and have this in the click event handler:
datasetname.Clear();
TableAdapterName.Update(datasetname);

launch the program, click the button, you'll see the grid get wiped out as it supposed to do. close the program and relaunch. the data is there again (this has nothing to do with the copy always, copy if newer infamous stupidity)

now:
5- edit the click event handler and change it so something like this:
foreach (datasetname.TableRow row in datasetname.Table)
{
row.Delete();
}
TableAdapterName.Update(datasetname);

Launch the program, hit the button, grid wiped out. exit and relaunch. You'll see no data (i.e. the update on table adapter worked alright)

You can also try the GetChanges method on the dataset rightafter you use the clear method and you'd get no deleted records at all.

So, in 100,000+ records dataset, if i need to wipe the thing out and add some new records do i have to loop over every record and call delete (which will take LOTS of time).
I do hope that I'm missing something obvious.

Any help would be highly appreciated.

Thanks.

Yes, that's because Clear() is not supposed to mark rows as deleted, it suppose to clear tables of all row regardless of the row states.

Besides there’s no magic way to mark all rows as deleted except by looping through them, so should Clear() actually do that it would take a while anyway.

If you need to delete all the rows and then add some here’s how to do that efficiently:

1. Execute SQL query(ies) to delete rows strait from the database.

2. Create new empty DataSet with the same schema and use it instead of existing one (which would be collected).

3. Add rows you need.

4. Execute update using new DataSet.

Thursday, March 22, 2012

Dataset update method error?

I have a gridview and a dataset. When I start my application I see the results in my gridview. When I clic on edit and chanche some value and click on update it wil give me this error:

ObjectDataSource 'ObjectDataSourcePersoon' could not find a non-generic method 'Update' that has parameters: naam, tussenvoegsel, achternaam, adres, woonplaats, telefoonnummer, original_id, Original_naam, Original_tussenvoegsel, Original_achternaam, Original_adres, Original_woonplaats, Original_telefoonnummer.

Does someone know whats the problem??

Can we see your code for both the GridView and the ObjectDataSource on your ASPX page?

|||

<asp:GridView ID="GridView3" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" BackColor="LightGoldenrodYellow" BorderColor="Tan"
BorderWidth="1px" CellPadding="2" DataKeyNames="id" DataSourceID="ObjectDataSourcePersoon"
ForeColor="Black" GridLines="None">
<FooterStyle BackColor="Tan" />
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
<asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" SortExpression="id" />
<asp:BoundField DataField="naam" HeaderText="naam" SortExpression="naam" />
<asp:BoundField DataField="tussenvoegsel" HeaderText="tussenvoegsel" SortExpression="tussenvoegsel" />
<asp:BoundField DataField="achternaam" HeaderText="achternaam" SortExpression="achternaam" />
<asp:BoundField DataField="adres" HeaderText="adres" SortExpression="adres" />
<asp:BoundField DataField="woonplaats" HeaderText="woonplaats" SortExpression="woonplaats" />
<asp:BoundField DataField="telefoonnummer" HeaderText="telefoonnummer" SortExpression="telefoonnummer" />
</Columns>
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<AlternatingRowStyle BackColor="PaleGoldenrod" />
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSourcePersoon" runat="server" DeleteMethod="Delete"
InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="DataSetRoosterTableAdapters.PersoonTableAdapter" UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="Original_id" Type="Int32" />
<asp:Parameter Name="Original_naam" Type="String" />
<asp:Parameter Name="Original_tussenvoegsel" Type="String" />
<asp:Parameter Name="Original_achternaam" Type="String" />
<asp:Parameter Name="Original_adres" Type="String" />
<asp:Parameter Name="Original_woonplaats" Type="String" />
<asp:Parameter Name="Original_telefoonnummer" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="naam" Type="String" />
<asp:Parameter Name="tussenvoegsel" Type="String" />
<asp:Parameter Name="achternaam" Type="String" />
<asp:Parameter Name="adres" Type="String" />
<asp:Parameter Name="woonplaats" Type="String" />
<asp:Parameter Name="telefoonnummer" Type="String" />
<asp:Parameter Name="Original_id" Type="Int32" />
<asp:Parameter Name="Original_naam" Type="String" />
<asp:Parameter Name="Original_tussenvoegsel" Type="String" />
<asp:Parameter Name="Original_achternaam" Type="String" />
<asp:Parameter Name="Original_adres" Type="String" />
<asp:Parameter Name="Original_woonplaats" Type="String" />
<asp:Parameter Name="Original_telefoonnummer" Type="String" />
<asp:Parameter Name="id" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="naam" Type="String" />
<asp:Parameter Name="tussenvoegsel" Type="String" />
<asp:Parameter Name="achternaam" Type="String" />
<asp:Parameter Name="adres" Type="String" />
<asp:Parameter Name="woonplaats" Type="String" />
<asp:Parameter Name="telefoonnummer" Type="String" />
</InsertParameters>
</asp:ObjectDataSource>

|||

khalidelmeknesi:

<UpdateParameters>
<asp:Parameter Name="naam" Type="String" />
<asp:Parameter Name="tussenvoegsel" Type="String" />
<asp:Parameter Name="achternaam" Type="String" />
<asp:Parameter Name="adres" Type="String" />
<asp:Parameter Name="woonplaats" Type="String" />
<asp:Parameter Name="telefoonnummer" Type="String" />
<asp:Parameter Name="Original_id" Type="Int32" />
<asp:Parameter Name="Original_naam" Type="String" />
<asp:Parameter Name="Original_tussenvoegsel" Type="String" />
<asp:Parameter Name="Original_achternaam" Type="String" />
<asp:Parameter Name="Original_adres" Type="String" />
<asp:Parameter Name="Original_woonplaats" Type="String" />
<asp:Parameter Name="Original_telefoonnummer" Type="String" />
<asp:Parameter Name="id" Type="Int32" />
</UpdateParameters>

Look at your UpdateParameters above, if the signature of your Update method does not accept the "Original_" parameters, then remove them from the declaration. You should only have the Parameters needed for your Update method.

|||I have removed them in the deafault.aspx page en it gives me now this error:

ObjectDataSource 'ObjectDataSourcePersoon' could not find a non-generic method 'Update' that has parameters: naam, tussenvoegsel, achternaam, adres, woonplaats, telefoonnummer, original_id.


|||

The "id" parameter should be sent instead of the "original_id" parameter. Remove

OldValuesParameterFormatString="original_{0}"

from your ObjectDataSource collection and see if this works. The whole idea, is that the Parameters sent match the signature of your business class method.

|||

Ik have do it again..remove all parameters with the prefix:

This is the error:

ObjectDataSource 'ObjectDataSourceTester' could not find a non-generic method 'Update' that has parameters: naam, tussenvoegsel, achternaam, adres, woonplaats, telefoonnummer, id.

En this is the asp code:

<asp:ObjectDataSource ID="ObjectDataSourceTester" runat="server" DeleteMethod="Delete"
InsertMethod="Insert" SelectMethod="GetData"
TypeName="DataSetRoosterTableAdapters.PersoonTableAdapter" UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="Original_id" Type="Int32" />
<asp:Parameter Name="Original_naam" Type="String" />
<asp:Parameter Name="Original_tussenvoegsel" Type="String" />
<asp:Parameter Name="Original_achternaam" Type="String" />
<asp:Parameter Name="Original_adres" Type="String" />
<asp:Parameter Name="Original_woonplaats" Type="String" />
<asp:Parameter Name="Original_telefoonnummer" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="naam" Type="String" />
<asp:Parameter Name="tussenvoegsel" Type="String" />
<asp:Parameter Name="achternaam" Type="String" />
<asp:Parameter Name="adres" Type="String" />
<asp:Parameter Name="woonplaats" Type="String" />
<asp:Parameter Name="telefoonnummer" Type="String" />
<asp:Parameter Name="id" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="naam" Type="String" />
<asp:Parameter Name="tussenvoegsel" Type="String" />
<asp:Parameter Name="achternaam" Type="String" />
<asp:Parameter Name="adres" Type="String" />
<asp:Parameter Name="woonplaats" Type="String" />
<asp:Parameter Name="telefoonnummer" Type="String" />
</InsertParameters>
</asp:ObjectDataSource
I dont know what the problem is!

|||

Show us your Update method as well.

|||

Here it is:

<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="False">
<CommandText>UPDATE [dbo].[Persoon] SET [naam] = @.naam, [tussenvoegsel] = @.tussenvoegsel, [achternaam] = @.achternaam, [adres] = @.adres, [woonplaats] = @.woonplaats, [telefoonnummer] = @.telefoonnummer WHERE (([id] = @.Original_id) AND ((@.IsNull_naam = 1 AND [naam] IS NULL) OR ([naam] = @.Original_naam)) AND ((@.IsNull_tussenvoegsel = 1 AND [tussenvoegsel] IS NULL) OR ([tussenvoegsel] = @.Original_tussenvoegsel)) AND ((@.IsNull_achternaam = 1 AND [achternaam] IS NULL) OR ([achternaam] = @.Original_achternaam)) AND ((@.IsNull_adres = 1 AND [adres] IS NULL) OR ([adres] = @.Original_adres)) AND ((@.IsNull_woonplaats = 1 AND [woonplaats] IS NULL) OR ([woonplaats] = @.Original_woonplaats)) AND ((@.IsNull_telefoonnummer = 1 AND [telefoonnummer] IS NULL) OR ([telefoonnummer] = @.Original_telefoonnummer)));
SELECT id, naam, tussenvoegsel, achternaam, adres, woonplaats, telefoonnummer FROM Persoon WHERE (id = @.id)</CommandText>
<Parameters>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@.naam" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="naam" SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@.tussenvoegsel" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="tussenvoegsel" SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@.achternaam" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="achternaam" SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@.adres" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="adres" SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@.woonplaats" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="woonplaats" SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@.telefoonnummer" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="telefoonnummer" SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@.Original_id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id" SourceColumnNullMapping="False" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@.IsNull_naam" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="naam" SourceColumnNullMapping="True" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@.Original_naam" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="naam" SourceColumnNullMapping="False" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@.IsNull_tussenvoegsel" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="tussenvoegsel" SourceColumnNullMapping="True" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@.Original_tussenvoegsel" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="tussenvoegsel" SourceColumnNullMapping="False" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@.IsNull_achternaam" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="achternaam" SourceColumnNullMapping="True" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@.Original_achternaam" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="achternaam" SourceColumnNullMapping="False" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@.IsNull_adres" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="adres" SourceColumnNullMapping="True" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@.Original_adres" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="adres" SourceColumnNullMapping="False" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@.IsNull_woonplaats" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="woonplaats" SourceColumnNullMapping="True" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@.Original_woonplaats" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="woonplaats" SourceColumnNullMapping="False" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@.IsNull_telefoonnummer" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="telefoonnummer" SourceColumnNullMapping="True" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@.Original_telefoonnummer" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="telefoonnummer" SourceColumnNullMapping="False" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="False" AutogeneratedName="id" ColumnName="id" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@.id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id" SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
</Parameters>
</DbCommand>
</UpdateCommand
And here is a picture of my dataset:

|||

I've had this happen before. I'm assuming this is the Update method which was automatically generated by your TableAdapter. If so, I end up just adding my own Update method to the TableAdpater with the signature you want. Therefore, don't include any of the extra "Original_" Parameters.

|||

I have made my own update and delete methods and now it works..Thank you for your good and fast support..

Dataset Merge and @@IDENTITY

I have an application that contains a dataset of product data that is stored in SQL Server 2000. The original table in SQL Server has an nteger primary key that is an Identity field.

The application allows users to add new records to the dataset and then update the datasource. The update datasource call writes the new rows to SQL Server with no problems. However, quite oftern when the update datasource happens the identity field creatred in the dataset has already been allocated (someone else added a record at same time).

Now, things are still OK as SQL Server will happily add the record, but now the identity field allocated by sql Server is different to the one in my original dataset.

How do I get my original dataset to show the revised identity field generated by SQL Server?

I know you can get the value using @.@.IDENTITY but how do I get that back into the dataset?Try using the SCOPE_IDENTITY function instead of @.@.IDENTITY. It has a narrower scope, so you should get back the value you want.

Don|||Getting the revised value isnt the problem.

The isssue is how do I reflect that back into the orignal dataset.

The only way I can see to do this is process additions to the datasource separately from updates and after each insert, fetch the revised IDENTITY field and then write a load of code to examine the new datasource generated value, compare it with the value originally created by the dataset and if it differs, then change the dataset value.

That make sense?

Wednesday, March 21, 2012

dataset and xml problem

Hello all,
I'm tring to coordinate between a database and a my application throw a
dataset object and a group of dataAdapters, one for each table. to
display data, I use the xml driven from the method DataSet.WriteXml().
to store data I want to receive xml based on the dataset structure and
let the data set store and update everything through the method
DataSet.ReadXML(). this I have difficultes to perform and I cant find
any good examples.
I'd appreciate your help.First, I think you need to reexplain what youre trying to do.
I've read it 3 times, and still don't know exactly.
..
Second...If you're interested in passing dataset xml to a stored
procedure...
go here:
http://www.sqlservercentral.com/col...lem.as
p
Its not ~exactly what you're looking for.. but will give you a place to
start.
Create an xsd/dataset.
It could look something like this:
<ParametersDS>
<Customer>
<CustomerID>CENTC</CustomerID>
</Customer>
<Customer>
<CustomerID>GROSR</CustomerID>
</Customer>
</ParametersDS>
...
If that's not what you're looking for... (after you go thru the URL I
provide), then repost what you're trying to do, and explain it a little
slower and greater detail.
<taleran58@.gmail.com> wrote in message
news:1150107036.031001.242910@.j55g2000cwa.googlegroups.com...
> Hello all,
> I'm tring to coordinate between a database and a my application throw a
> dataset object and a group of dataAdapters, one for each table. to
> display data, I use the xml driven from the method DataSet.WriteXml().
> to store data I want to receive xml based on the dataset structure and
> let the data set store and update everything through the method
> DataSet.ReadXML(). this I have difficultes to perform and I cant find
> any good examples.
> I'd appreciate your help.
>

Thursday, March 8, 2012

DataEnviornment Connection to SQL Server 200

I have a VB 6.0 application that uses MS DataEnviornment in order to connection to an MSQ SQL 7.0 database.
This database was just converted into an SQL Server 2000 database.
After the conversion, that VB application is no longer able to connect to the DB.
Are there any permission or user issues that might be affecting the connection?
(The problem occurs when I try to open a recordset of a command of the connection to the DB).
What error message do you get?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

DataEnviornment Connection to SQL Server 200

I have a VB 6.0 application that uses MS DataEnviornment in order to connect
ion to an MSQ SQL 7.0 database.
This database was just converted into an SQL Server 2000 database.
After the conversion, that VB application is no longer able to connect to th
e DB.
Are there any permission or user issues that might be affecting the connecti
on?
(The problem occurs when I try to open a recordset of a command of the conne
ction to the DB).What error message do you get?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Sunday, February 26, 2012

Databases Starting Repeatedly

I have four databases that show up in the database log as
starting over and over again. While this activity is
going on the web based application is unable to connect.
I have checked all available log files for errors but have
not received the first one as of yet.
I need to call on the experts in the field. Have any of
you ever seen this before? If so, what did you do to
correct the problem?
This is SQL Server 2000 Sp3 running on Windows 2000 Sp3
with 2GB of ram and two 2.4 GHZ processors.
I would appreciate anyone's help as this is a show stopper
for me. Thanks in advance.
A portion of log follows.
**********************************************
2003-09-29 09:53:38.42 server Microsoft SQL Server
2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.0 (Build 2195:
Service Pack 3)
2003-09-29 09:53:38.42 server Copyright (C) 1988-2002
Microsoft Corporation.
2003-09-29 09:53:38.42 server All rights reserved.
2003-09-29 09:53:38.42 server Server Process ID is 996.
2003-09-29 09:53:38.42 server Logging SQL Server
messages in file 'e:\Program Files\Microsoft SQL
Server\MSSQL\log\ERRORLOG'.
2003-09-29 09:53:38.42 server SQL Server is starting at
priority class 'normal'(4 CPUs detected).
2003-09-29 09:53:38.67 server SQL Server configured for
thread mode processing.
2003-09-29 09:53:38.67 server Using dynamic lock
allocation. [2500] Lock Blocks, [5000] Lock Owner Blocks.
2003-09-29 09:53:38.79 server Attempting to initialize
Distributed Transaction Coordinator.
2003-09-29 09:53:40.29 spid3 Starting up
database 'master'.
2003-09-29 09:53:40.74 spid3 Server name is 'HSMDB'.
2003-09-29 09:53:40.74 spid3 Skipping startup of clean
database id 5
2003-09-29 09:53:40.78 spid3 Skipping startup of clean
database id 6
2003-09-29 09:53:40.78 spid3 Skipping startup of clean
database id 7
2003-09-29 09:53:40.78 spid5 Starting up
database 'msdb'.
2003-09-29 09:53:40.78 spid6 Starting up
database 'hsmqa'.
2003-09-29 09:53:40.78 spid7 Starting up
database 'WebTrend'.
2003-09-29 09:53:40.78 server Using 'SSNETLIB.DLL'
version '8.0.760'.
2003-09-29 09:53:40.78 spid8 Starting up
database 'model'.
2003-09-29 09:53:40.78 spid9 Starting up
database 'WebData'.
2003-09-29 09:53:40.78 spid12 Starting up
database 'WebCache'.
2003-09-29 09:53:40.81 spid7 Analysis of
database 'WebTrend' (10) is 100% complete (approximately 0
more seconds)
2003-09-29 09:53:40.85 spid12 Analysis of
database 'WebCache' (12) is 100% complete (approximately 0
more seconds)
2003-09-29 09:53:40.92 server SQL server listening on
TCP, Shared Memory, Named Pipes.
2003-09-29 09:53:40.92 server SQL Server is ready for
client connections
2003-09-29 09:53:40.92 spid8 Clearing tempdb database.
2003-09-29 09:53:41.10 spid8 Starting up
database 'tempdb'.
2003-09-29 09:53:41.21 spid3 Recovery complete.
2003-09-29 09:53:41.21 spid3 SQL global counter
collection task is created.
2003-09-29 09:53:42.45 spid3 Launched startup
procedure 'hbi_unlock_objects'
2003-09-29 09:53:43.40 spid52 Using 'xpsqlbot.dll'
version '2000.80.194' to execute extended stored
procedure 'xp_qv'.
2003-09-29 09:54:26.79 spid53 Using 'xpstar.dll'
version '2000.80.760' to execute extended stored
procedure 'sp_MSgetversion'.
2003-09-29 09:54:30.64 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:54:30.75 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:54:30.84 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:44.43 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:44.53 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:44.62 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:45.98 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:46.07 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:46.17 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:46.26 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:46.36 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:46.45 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:46.57 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:46.67 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:46.76 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:46.86 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:46.95 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:47.04 spid53 Starting up
database 'hsmtest'.
2003-09-29 09:55:47.14 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:47.23 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:47.32 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:47.42 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:47.53 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:47.62 spid53 Starting up
database 'hsmtrain'.
2003-09-29 09:55:47.76 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:47.86 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:47.95 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:50.21 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:50.31 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:50.40 spid53 Starting up
database 'hsmprod'.
2003-09-29 09:55:50.93 spid53 Starting up
database 'hsmprod'.
2003-09-29 10:00:01.78 spid86 Starting up
database 'hsmtest'.
2003-09-29 10:00:01.87 spid86 Starting up
database 'hsmtrain'.
2003-09-29 10:00:01.98 spid86 Starting up
database 'hsmtest'.
2003-09-29 10:00:02.07 spid86 Starting up
database 'hsmtrain'.
2003-09-29 10:00:02.40 spid87 Starting up
database 'hsmtest'.
2003-09-29 10:00:02.51 spid87 Starting up
database 'hsmtrain'.Hi Thomas,
Such issues tend to be complex and require extensive research. I'd like to
set the right expectations and let you know that it may take a while for us
to help you narrow down the problem.
Please check to see if the "Auto close" is checked in the Option tab in the
property dialog of the database. If so, make sure this option is unchecked
and try to connect to SQL Server again. Does this resolve the problem?
If not, I would like you to provide me with more information regarding this
issue so that I can narrow down it.
Please make sure that the MSSQLServer service, for the SQL Server you are
trying to connect to, is started and running before doing any further
troubleshooting.
1. What do you mean by "the web based application is unable to connect"?
How do you connect SQL Server? Please describe it in detail. Do any error
messages occur?
2. Ping the server using the server name and IP address. See if the request
completes successfully or times out.
3. Can you connect to SQL Server using Query Analyzer? If not, does any
error message occur?
4. What is the MDAC version on the client machine? For more information
regarding how to check the MDAC version, please refer to the following
article:
301202 HOW TO: Check for MDAC Version
http://support.microsoft.com/?id=301202
5. Please provide the complete error log, you can send it at
v-yshao@.microsoft.com
I am standing by for your response.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.|||Most probably the autoclose database option turned on.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Thomas Rhodes" <thomas.rhodes@.nghs.com> wrote in message
news:1c7601c386a0$fb9485d0$a001280a@.phx.gbl...
> I have four databases that show up in the database log as
> starting over and over again. While this activity is
> going on the web based application is unable to connect.
> I have checked all available log files for errors but have
> not received the first one as of yet.
> I need to call on the experts in the field. Have any of
> you ever seen this before? If so, what did you do to
> correct the problem?
> This is SQL Server 2000 Sp3 running on Windows 2000 Sp3
> with 2GB of ram and two 2.4 GHZ processors.
> I would appreciate anyone's help as this is a show stopper
> for me. Thanks in advance.
> A portion of log follows.
> **********************************************
> 2003-09-29 09:53:38.42 server Microsoft SQL Server
> 2000 - 8.00.760 (Intel X86)
> Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation
> Enterprise Edition on Windows NT 5.0 (Build 2195:
> Service Pack 3)
> 2003-09-29 09:53:38.42 server Copyright (C) 1988-2002
> Microsoft Corporation.
> 2003-09-29 09:53:38.42 server All rights reserved.
> 2003-09-29 09:53:38.42 server Server Process ID is 996.
> 2003-09-29 09:53:38.42 server Logging SQL Server
> messages in file 'e:\Program Files\Microsoft SQL
> Server\MSSQL\log\ERRORLOG'.
> 2003-09-29 09:53:38.42 server SQL Server is starting at
> priority class 'normal'(4 CPUs detected).
> 2003-09-29 09:53:38.67 server SQL Server configured for
> thread mode processing.
> 2003-09-29 09:53:38.67 server Using dynamic lock
> allocation. [2500] Lock Blocks, [5000] Lock Owner Blocks.
> 2003-09-29 09:53:38.79 server Attempting to initialize
> Distributed Transaction Coordinator.
> 2003-09-29 09:53:40.29 spid3 Starting up
> database 'master'.
> 2003-09-29 09:53:40.74 spid3 Server name is 'HSMDB'.
> 2003-09-29 09:53:40.74 spid3 Skipping startup of clean
> database id 5
> 2003-09-29 09:53:40.78 spid3 Skipping startup of clean
> database id 6
> 2003-09-29 09:53:40.78 spid3 Skipping startup of clean
> database id 7
> 2003-09-29 09:53:40.78 spid5 Starting up
> database 'msdb'.
> 2003-09-29 09:53:40.78 spid6 Starting up
> database 'hsmqa'.
> 2003-09-29 09:53:40.78 spid7 Starting up
> database 'WebTrend'.
> 2003-09-29 09:53:40.78 server Using 'SSNETLIB.DLL'
> version '8.0.760'.
> 2003-09-29 09:53:40.78 spid8 Starting up
> database 'model'.
> 2003-09-29 09:53:40.78 spid9 Starting up
> database 'WebData'.
> 2003-09-29 09:53:40.78 spid12 Starting up
> database 'WebCache'.
> 2003-09-29 09:53:40.81 spid7 Analysis of
> database 'WebTrend' (10) is 100% complete (approximately 0
> more seconds)
> 2003-09-29 09:53:40.85 spid12 Analysis of
> database 'WebCache' (12) is 100% complete (approximately 0
> more seconds)
> 2003-09-29 09:53:40.92 server SQL server listening on
> TCP, Shared Memory, Named Pipes.
> 2003-09-29 09:53:40.92 server SQL Server is ready for
> client connections
> 2003-09-29 09:53:40.92 spid8 Clearing tempdb database.
> 2003-09-29 09:53:41.10 spid8 Starting up
> database 'tempdb'.
> 2003-09-29 09:53:41.21 spid3 Recovery complete.
> 2003-09-29 09:53:41.21 spid3 SQL global counter
> collection task is created.
> 2003-09-29 09:53:42.45 spid3 Launched startup
> procedure 'hbi_unlock_objects'
> 2003-09-29 09:53:43.40 spid52 Using 'xpsqlbot.dll'
> version '2000.80.194' to execute extended stored
> procedure 'xp_qv'.
> 2003-09-29 09:54:26.79 spid53 Using 'xpstar.dll'
> version '2000.80.760' to execute extended stored
> procedure 'sp_MSgetversion'.
> 2003-09-29 09:54:30.64 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:54:30.75 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:54:30.84 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:44.43 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:44.53 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:44.62 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:45.98 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:46.07 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:46.17 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:46.26 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:46.36 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:46.45 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:46.57 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:46.67 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:46.76 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:46.86 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:46.95 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:47.04 spid53 Starting up
> database 'hsmtest'.
> 2003-09-29 09:55:47.14 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:47.23 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:47.32 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:47.42 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:47.53 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:47.62 spid53 Starting up
> database 'hsmtrain'.
> 2003-09-29 09:55:47.76 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:47.86 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:47.95 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:50.21 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:50.31 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:50.40 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 09:55:50.93 spid53 Starting up
> database 'hsmprod'.
> 2003-09-29 10:00:01.78 spid86 Starting up
> database 'hsmtest'.
> 2003-09-29 10:00:01.87 spid86 Starting up
> database 'hsmtrain'.
> 2003-09-29 10:00:01.98 spid86 Starting up
> database 'hsmtest'.
> 2003-09-29 10:00:02.07 spid86 Starting up
> database 'hsmtrain'.
> 2003-09-29 10:00:02.40 spid87 Starting up
> database 'hsmtest'.
> 2003-09-29 10:00:02.51 spid87 Starting up
> database 'hsmtrain'.|||Michael:
First, Thank you for your reply. I appreciate the
professional level and degree of your response.
Second, yes the Auto Close was set. I have since removed
the check mark. I have several other databases running on
this server in support of the web based application I
mentioned. These other databases started normally and
remained so after I had restarted the server. If I had
given more thought to situation I could have compared the
properties between the problem databases and those that
functioned as expected. The problem ceased yesterday
morning around 10:00am even with the auto close still
set. I suspect the web application connection succeeded
and maintain its connection thereafter.
Just quickly, should others have interest, I'll respond to
your questions.
1. The web application could not connect from the web
application server. This is a separate server from the
database. I am not exactly sure how the vendor connects
to the database in the code behind the pages. No errors
reported back to Internet Explorer except that the page
could not be found. Basically the weblogic web server
could not start without the connection to the database.
2. I did ping all the servers associated with this
application. I receive successful results on all counts.
3. Yes I was able to connect to the database server using
Query Analyzer and was able to query tables and data from
the affected databases.
4. I have the latest MDAC installation that comes with
SQL SP3a.
Again, I thank you for your help.
Thomas
>--Original Message--
>Hi Thomas,
>Such issues tend to be complex and require extensive
research. I'd like to
>set the right expectations and let you know that it may
take a while for us
>to help you narrow down the problem.
>Please check to see if the "Auto close" is checked in the
Option tab in the
>property dialog of the database. If so, make sure this
option is unchecked
>and try to connect to SQL Server again. Does this resolve
the problem?
>If not, I would like you to provide me with more
information regarding this
>issue so that I can narrow down it.
>Please make sure that the MSSQLServer service, for the
SQL Server you are
>trying to connect to, is started and running before doing
any further
>troubleshooting.
>1. What do you mean by "the web based application is
unable to connect"?
>How do you connect SQL Server? Please describe it in
detail. Do any error
>messages occur?
>2. Ping the server using the server name and IP address.
See if the request
>completes successfully or times out.
>3. Can you connect to SQL Server using Query Analyzer? If
not, does any
>error message occur?
>4. What is the MDAC version on the client machine? For
more information
>regarding how to check the MDAC version, please refer to
the following
>article:
>301202 HOW TO: Check for MDAC Version
>http://support.microsoft.com/?id=301202
>5. Please provide the complete error log, you can send it
at
>v-yshao@.microsoft.com
>I am standing by for your response.
>Regards,
>Michael Shao
>Microsoft Online Partner Support
>Get Secure! - www.microsoft.com/security
>This posting is provided "as is" with no warranties and
confers no rights.
>.
>|||Hi Thomas,
Thank you for taking time to write in your experience so that it may help
other customers who may encounter similar issues. As per your previous
post, I am going consider this issue as Resolved. However, should you have
any further questions or concerns, please feel free to send your post here.
I will continue to work with you.
Thanks for using MSDN newsgroup again.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Databases show in EM but not in sysdatabases?

I'm managing the back end SQL 2000 instance for a vendors application. The
application allows users to create databases on the fly for testing, etc.
I opened the instance in Enterprise Manager, and noted that the number of
databases had grown to about a dozen (other than the system databases). Hmm,
so being concerned about drive space, etc, I executed a sp_helpdb.
Yikes..only one of the dozen user databases showed in the listing for
sp_helpdb. Checked sysdatabases and sure enough only one user db shows.
But in EM I can open any of the other 11 DB's, open tables from them, view
options, etc etc. So I'm just curious, how can I view them in EM but they
don't show in sysdatabases?
TIA
<*blush*>..Sigh..one of those days. I did a 'Romo'. Time for a brewski.
"Tibor Karaszi" wrote:

> My guess is that you are connecting to different SQL Server instances.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "bill_the_cat" <billthecat@.discussions.microsoft.com> wrote in message
> news:AF04CEDA-BF16-415C-A652-CB7693F2F16D@.microsoft.com...
>

Databases show in EM but not in sysdatabases?

I'm managing the back end SQL 2000 instance for a vendors application. The
application allows users to create databases on the fly for testing, etc.
I opened the instance in Enterprise Manager, and noted that the number of
databases had grown to about a dozen (other than the system databases). Hmm
,
so being concerned about drive space, etc, I executed a sp_helpdb.
Yikes..only one of the dozen user databases showed in the listing for
sp_helpdb. Checked sysdatabases and sure enough only one user db shows.
But in EM I can open any of the other 11 DB's, open tables from them, view
options, etc etc. So I'm just curious, how can I view them in EM but they
don't show in sysdatabases?
TIAMy guess is that you are connecting to different SQL Server instances.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"bill_the_cat" <billthecat@.discussions.microsoft.com> wrote in message
news:AF04CEDA-BF16-415C-A652-CB7693F2F16D@.microsoft.com...
> I'm managing the back end SQL 2000 instance for a vendors application. Th
e
> application allows users to create databases on the fly for testing, etc.
> I opened the instance in Enterprise Manager, and noted that the number of
> databases had grown to about a dozen (other than the system databases). H
mm,
> so being concerned about drive space, etc, I executed a sp_helpdb.
> Yikes..only one of the dozen user databases showed in the listing for
> sp_helpdb. Checked sysdatabases and sure enough only one user db shows.
> But in EM I can open any of the other 11 DB's, open tables from them, view
> options, etc etc. So I'm just curious, how can I view them in EM but they
> don't show in sysdatabases?
> TIA|||<*blush*>..Sigh..one of those days. I did a 'Romo'. Time for a brewski.
"Tibor Karaszi" wrote:

> My guess is that you are connecting to different SQL Server instances.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "bill_the_cat" <billthecat@.discussions.microsoft.com> wrote in message
> news:AF04CEDA-BF16-415C-A652-CB7693F2F16D@.microsoft.com...
>|||Happens to all of us... :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"bill_the_cat" <billthecat@.discussions.microsoft.com> wrote in message
news:DBD746A2-59BE-49C8-90A9-757086DA9412@.microsoft.com...[vbcol=seagreen]
> <*blush*>..Sigh..one of those days. I did a 'Romo'. Time for a brewski.
> "Tibor Karaszi" wrote:
>

Friday, February 24, 2012

Databases can only be backed up locally?

Dear all,
I have two windows 2003 servers, one is running arcserve 11.1 with sp2,
the
other is running MSSQL 2000 with SP4 with SAP application.
I have already installed the client agnet and sql agnet 11.1 sp2 to the
SQL
server.
However whenever I backup the SQL database arcserve will give me the
Error 1
326 saying that the username/password is incorrect.
I can browse thru the tree in arcserve manager and I can backup other
file o
n the sql server with no problem.
Then I tried to install the arcserve manager to the sql server and
tried to
backup the sql database with exactly the same username and password, it
work
s!
I confirm that there is no blocking for any network traffic between two
serv
er.
Would anyone help me on this to allow backup thru network from the sql
serve
r to the backup server?
Thanks a lot!
--
kevinling1
---
Posted via http://www.webservertalk.com
---
View this thread: http://www.webservertalk.com/message1564670.htmlkevinling1 wrote:
> Dear all,
> Would anyone help me on this to allow backup thru network from the sql
> serve
> r to the backup server?
> Thanks a lot!
>
I can't help you with the Arcserve problem, but I'd like to suggest
STRONGLY that you not perform your database backups using an agent like
this. Do your database backups using the native SQL BACKUP command,
backing up your data to a file on disk. Use Arcserve to backup that
disk file. These agent-based database backups tend to be not the most
reliable things.

Databases can only be backed up locally?

Dear all,
I have two windows 2003 servers, one is running arcserve 11.1 with sp2, the
other is running MSSQL 2000 with SP4 with SAP application.
I have already installed the client agnet and sql agnet 11.1 sp2 to the SQL
server.
However whenever I backup the SQL database arcserve will give me the Error 1
326 saying that the username/password is incorrect.
I can browse thru the tree in arcserve manager and I can backup other file o
n the sql server with no problem.
Then I tried to install the arcserve manager to the sql server and tried to
backup the sql database with exactly the same username and password, it work
s!
I confirm that there is no blocking for any network traffic between two serv
er.
Would anyone help me on this to allow backup thru network from the sql serve
r to the backup server?
Thanks a lot!kevinling1 wrote:
> Dear all,
> Would anyone help me on this to allow backup thru network from the sql
> serve
> r to the backup server?
> Thanks a lot!
>
I can't help you with the Arcserve problem, but I'd like to suggest
STRONGLY that you not perform your database backups using an agent like
this. Do your database backups using the native SQL BACKUP command,
backing up your data to a file on disk. Use Arcserve to backup that
disk file. These agent-based database backups tend to be not the most
reliable things.|||kevinling1 wrote:
> Dear all,
> Would anyone help me on this to allow backup thru network from the sql
> serve
> r to the backup server?
> Thanks a lot!
>
I can't help you with the Arcserve problem, but I'd like to suggest
STRONGLY that you not perform your database backups using an agent like
this. Do your database backups using the native SQL BACKUP command,
backing up your data to a file on disk. Use Arcserve to backup that
disk file. These agent-based database backups tend to be not the most
reliable things.

Sunday, February 19, 2012

Database/Application Documentation

Just general thoughts...
It seems to me that there is a lack of compile time binding between a .NET
application and the a SQL server database.
Can someone suggest the best way to do things like
-identify stored procedures that are no longer being used by an application
-genrerate a call tree of .NET classes and modules which flows all the way
to database SPs.
Is using strongly typed classes, something i am not very familiar with,
helpful?
I've looked at Project Anayzer by Avisio and the output is confusing.
Does Rational have something to help document an application that spans
tiers by analyzing the code?
Is the output quality or quantity?You could run a trace on the server and analyze the output for missing
procedures
http://sqlservercode.blogspot.com/
"Chad" wrote:

> Just general thoughts...
> It seems to me that there is a lack of compile time binding between a .NET
> application and the a SQL server database.
> Can someone suggest the best way to do things like
> -identify stored procedures that are no longer being used by an applicatio
n
> -genrerate a call tree of .NET classes and modules which flows all the way
> to database SPs.
> Is using strongly typed classes, something i am not very familiar with,
> helpful?
> I've looked at Project Anayzer by Avisio and the output is confusing.
> Does Rational have something to help document an application that spans
> tiers by analyzing the code?
> Is the output quality or quantity?
>
>
>|||That is correct. When you compile a .NET application, it only compiles
the managed code. SQL Server objects are considered to be external
resources, and are not compiled or checked in any way. Only the
provider syntax is checked, embedded strings, parameters and SQL
statements are not. There are other Microsoft partners who provide
third-party tools, which you may like better than the one you tried. I
used FMS analyzer a long time ago, which I liked at the time, but I've
not kept up with the available tools. See
http://www.microsoft.com/sql/partners/dbtools.asp for a complete list.
--Mary
On Fri, 30 Sep 2005 23:47:54 -0400, "Chad"
<chad.dokmanovich@.unisys.com> wrote:

>Just general thoughts...
>It seems to me that there is a lack of compile time binding between a .NET
>application and the a SQL server database.
>Can someone suggest the best way to do things like
>-identify stored procedures that are no longer being used by an application
>-genrerate a call tree of .NET classes and modules which flows all the way
>to database SPs.
>Is using strongly typed classes, something i am not very familiar with,
>helpful?
>I've looked at Project Anayzer by Avisio and the output is confusing.
>Does Rational have something to help document an application that spans
>tiers by analyzing the code?
>Is the output quality or quantity?
>
>

Friday, February 17, 2012

Database Version Logging

Hi i just planning to creating a database version logging, where the
idea is this application running every night give me detail about table
schema change , new sproc , alter/drop sproc and other database
schema changes.
One of difficulty that i facing right now is how to get the username
that change the database schema ( alter sproc , etc ) , do anyone have
any recommendation how i able to get this information ? ThanksWhat version of SQL Server are you using? (2000/2005)
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"kwangsa" <SareCrow@.gmail.com> wrote in message
news:1152843749.295919.186540@.35g2000cwc.googlegroups.com...
> Hi i just planning to creating a database version logging, where the
> idea is this application running every night give me detail about table
> schema change , new sproc , alter/drop sproc and other database
> schema changes.
> One of difficulty that i facing right now is how to get the username
> that change the database schema ( alter sproc , etc ) , do anyone have
> any recommendation how i able to get this information ? Thanks
>|||If you are using SQL Server 2005 you can easily accomplish this by using DDL
Triggers.
There is not easy solution for SQL Server 2000.
Ben Nevarez, MCDBA, OCP
Database Administrator
"kwangsa" wrote:
> Hi i just planning to creating a database version logging, where the
> idea is this application running every night give me detail about table
> schema change , new sproc , alter/drop sproc and other database
> schema changes.
> One of difficulty that i facing right now is how to get the username
> that change the database schema ( alter sproc , etc ) , do anyone have
> any recommendation how i able to get this information ? Thanks
>|||Hi i m using sql server 2000 , hmm for the "not easy solution" , any
recommendation '
I thinking of using DBCC Log but which field that showing the userid.
Thanks.
Ben Nevarez wrote:
> If you are using SQL Server 2005 you can easily accomplish this by using DDL
> Triggers.
> There is not easy solution for SQL Server 2000.
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "kwangsa" wrote:
> > Hi i just planning to creating a database version logging, where the
> > idea is this application running every night give me detail about table
> > schema change , new sproc , alter/drop sproc and other database
> > schema changes.
> >
> > One of difficulty that i facing right now is how to get the username
> > that change the database schema ( alter sproc , etc ) , do anyone have
> > any recommendation how i able to get this information ? Thanks
> >
> >|||Before you spend much time trying to code a solution, look at the various
third party tools used for SarBox and HIPPA compliance logging. It may be
less expensive to get something that is made for the job and taking the time
to kludge something together.
Check out Quest, Idera, Lumigent, SQL AuditPro, and many more I'm sure.
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"kwangsa" <SareCrow@.gmail.com> wrote in message
news:1152857175.914841.230840@.b28g2000cwb.googlegroups.com...
> Hi i m using sql server 2000 , hmm for the "not easy solution" , any
> recommendation '
> I thinking of using DBCC Log but which field that showing the userid.
> Thanks.
> Ben Nevarez wrote:
>> If you are using SQL Server 2005 you can easily accomplish this by using
>> DDL
>> Triggers.
>> There is not easy solution for SQL Server 2000.
>> Ben Nevarez, MCDBA, OCP
>> Database Administrator
>>
>> "kwangsa" wrote:
>> > Hi i just planning to creating a database version logging, where the
>> > idea is this application running every night give me detail about table
>> > schema change , new sproc , alter/drop sproc and other database
>> > schema changes.
>> >
>> > One of difficulty that i facing right now is how to get the username
>> > that change the database schema ( alter sproc , etc ) , do anyone have
>> > any recommendation how i able to get this information ? Thanks
>> >
>> >
>|||hi,
checkout this tools for auditing
http://www.lumigent.com/Downloads
Amol Lembhe
MCDBA
"Arnie Rowland" wrote:
> What version of SQL Server are you using? (2000/2005)
> --
> Arnie Rowland*
> "To be successful, your heart must accompany your knowledge."
>
> "kwangsa" <SareCrow@.gmail.com> wrote in message
> news:1152843749.295919.186540@.35g2000cwc.googlegroups.com...
> > Hi i just planning to creating a database version logging, where the
> > idea is this application running every night give me detail about table
> > schema change , new sproc , alter/drop sproc and other database
> > schema changes.
> >
> > One of difficulty that i facing right now is how to get the username
> > that change the database schema ( alter sproc , etc ) , do anyone have
> > any recommendation how i able to get this information ? Thanks
> >
>
>|||Hi thx for the sugestion to using 3rd party tools but what i planning
to do is only a simple database logging , and this is just personal
project so i really interested to make a tools like that.
Do anyone know any DBCC log result mean , i mean any documentation
would be really helfpul. THx
Amol Lembhe wrote:
> hi,
> checkout this tools for auditing
> http://www.lumigent.com/Downloads
> Amol Lembhe
> MCDBA
> "Arnie Rowland" wrote:
> > What version of SQL Server are you using? (2000/2005)
> >
> > --
> > Arnie Rowland*
> > "To be successful, your heart must accompany your knowledge."
> >
> >
> >
> > "kwangsa" <SareCrow@.gmail.com> wrote in message
> > news:1152843749.295919.186540@.35g2000cwc.googlegroups.com...
> > > Hi i just planning to creating a database version logging, where the
> > > idea is this application running every night give me detail about table
> > > schema change , new sproc , alter/drop sproc and other database
> > > schema changes.
> > >
> > > One of difficulty that i facing right now is how to get the username
> > > that change the database schema ( alter sproc , etc ) , do anyone have
> > > any recommendation how i able to get this information ? Thanks
> > >
> >
> >
> >|||You could have a Profiler trace running (from a second server) , restricted
to DDL activities only, and then have sprocs that harvest the information
you seek from the trace table.
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"kwangsa" <SareCrow@.gmail.com> wrote in message
news:1152873932.402525.309830@.h48g2000cwc.googlegroups.com...
> Hi thx for the sugestion to using 3rd party tools but what i planning
> to do is only a simple database logging , and this is just personal
> project so i really interested to make a tools like that.
> Do anyone know any DBCC log result mean , i mean any documentation
> would be really helfpul. THx
>
> Amol Lembhe wrote:
>> hi,
>> checkout this tools for auditing
>> http://www.lumigent.com/Downloads
>> Amol Lembhe
>> MCDBA
>> "Arnie Rowland" wrote:
>> > What version of SQL Server are you using? (2000/2005)
>> >
>> > --
>> > Arnie Rowland*
>> > "To be successful, your heart must accompany your knowledge."
>> >
>> >
>> >
>> > "kwangsa" <SareCrow@.gmail.com> wrote in message
>> > news:1152843749.295919.186540@.35g2000cwc.googlegroups.com...
>> > > Hi i just planning to creating a database version logging, where the
>> > > idea is this application running every night give me detail about
>> > > table
>> > > schema change , new sproc , alter/drop sproc and other database
>> > > schema changes.
>> > >
>> > > One of difficulty that i facing right now is how to get the username
>> > > that change the database schema ( alter sproc , etc ) , do anyone
>> > > have
>> > > any recommendation how i able to get this information ? Thanks
>> > >
>> >
>> >
>> >
>

Database Version Logging

Hi i just planning to creating a database version logging, where the
idea is this application running every night give me detail about table
schema change , new sproc , alter/drop sproc and other database
schema changes.
One of difficulty that i facing right now is how to get the username
that change the database schema ( alter sproc , etc ) , do anyone have
any recommendation how i able to get this information ? ThanksWhat version of SQL Server are you using? (2000/2005)
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"kwangsa" <SareCrow@.gmail.com> wrote in message
news:1152843749.295919.186540@.35g2000cwc.googlegroups.com...
> Hi i just planning to creating a database version logging, where the
> idea is this application running every night give me detail about table
> schema change , new sproc , alter/drop sproc and other database
> schema changes.
> One of difficulty that i facing right now is how to get the username
> that change the database schema ( alter sproc , etc ) , do anyone have
> any recommendation how i able to get this information ? Thanks
>|||If you are using SQL Server 2005 you can easily accomplish this by using DDL
Triggers.
There is not easy solution for SQL Server 2000.
Ben Nevarez, MCDBA, OCP
Database Administrator
"kwangsa" wrote:

> Hi i just planning to creating a database version logging, where the
> idea is this application running every night give me detail about table
> schema change , new sproc , alter/drop sproc and other database
> schema changes.
> One of difficulty that i facing right now is how to get the username
> that change the database schema ( alter sproc , etc ) , do anyone have
> any recommendation how i able to get this information ? Thanks
>|||Hi i m using sql server 2000 , hmm for the "not easy solution" , any
recommendation '
I thinking of using DBCC Log but which field that showing the userid.
Thanks.
Ben Nevarez wrote:[vbcol=seagreen]
> If you are using SQL Server 2005 you can easily accomplish this by using D
DL
> Triggers.
> There is not easy solution for SQL Server 2000.
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "kwangsa" wrote:
>|||Before you spend much time trying to code a solution, look at the various
third party tools used for SarBox and HIPPA compliance logging. It may be
less expensive to get something that is made for the job and taking the time
to kludge something together.
Check out Quest, Idera, Lumigent, SQL AuditPro, and many more I'm sure.
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"kwangsa" <SareCrow@.gmail.com> wrote in message
news:1152857175.914841.230840@.b28g2000cwb.googlegroups.com...
> Hi i m using sql server 2000 , hmm for the "not easy solution" , any
> recommendation '
> I thinking of using DBCC Log but which field that showing the userid.
> Thanks.
> Ben Nevarez wrote:
>|||hi,
checkout this tools for auditing
http://www.lumigent.com/Downloads
Amol Lembhe
MCDBA
"Arnie Rowland" wrote:

> What version of SQL Server are you using? (2000/2005)
> --
> Arnie Rowland*
> "To be successful, your heart must accompany your knowledge."
>
> "kwangsa" <SareCrow@.gmail.com> wrote in message
> news:1152843749.295919.186540@.35g2000cwc.googlegroups.com...
>
>|||Hi thx for the sugestion to using 3rd party tools but what i planning
to do is only a simple database logging , and this is just personal
project so i really interested to make a tools like that.
Do anyone know any DBCC log result mean , i mean any documentation
would be really helfpul. THx
Amol Lembhe wrote:[vbcol=seagreen]
> hi,
> checkout this tools for auditing
> http://www.lumigent.com/Downloads
> Amol Lembhe
> MCDBA
> "Arnie Rowland" wrote:
>|||You could have a Profiler trace running (from a second server) , restricted
to DDL activities only, and then have sprocs that harvest the information
you seek from the trace table.
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"kwangsa" <SareCrow@.gmail.com> wrote in message
news:1152873932.402525.309830@.h48g2000cwc.googlegroups.com...
> Hi thx for the sugestion to using 3rd party tools but what i planning
> to do is only a simple database logging , and this is just personal
> project so i really interested to make a tools like that.
> Do anyone know any DBCC log result mean , i mean any documentation
> would be really helfpul. THx
>
> Amol Lembhe wrote:
>

Database Version 539 vs. 611 (using SMO)

I am using SMO in my .NET application to determine the version of a database
(2000 or 2005). When I get the version of a SQL 2000 database, it returns
539. When I get the version of a SQL 2005 database, it returns 611.
My question is this. Can I safely assume that a value of 539 always means
the database is a SQL 2000 database, and can I safely assume that a value of
611 always means a SQL 2005 database?
Also, does anyone know what '539' and '611' refer to?
Thanks, Amos.Hi
The number you are referring to is the internal version number of the
internal database schema. It generally gets updated between major releases.
To see this in action, attach or restore a SQL Server 2000 DB in 2005 using
T-SQL code in Management Studio. You will notice towards the end of the
operation, multiple messages showing the DB being upgraded one revision at a
time to the latest release.
There is no guarantee that between hotfixes or service packs the DB is not
upgraded. 611 is SQL Server 2005 RTM.
Querying the server for it's version number is more reliable.
Regards
--
Mike
This posting is provided "AS IS" with no warranties, and confers no rights.
"Amos Soma" <amos_j_soma@.yahoo.com> wrote in message
news:eH3R7kXlGHA.3816@.TK2MSFTNGP02.phx.gbl...
>I am using SMO in my .NET application to determine the version of a
>database (2000 or 2005). When I get the version of a SQL 2000 database, it
>returns 539. When I get the version of a SQL 2005 database, it returns 611.
> My question is this. Can I safely assume that a value of 539 always means
> the database is a SQL 2000 database, and can I safely assume that a value
> of 611 always means a SQL 2005 database?
> Also, does anyone know what '539' and '611' refer to?
> Thanks, Amos.
>|||Hi,
wait a minute, you queried for the wrong property. Guess you queried
for something like the Build Number. Use the following peroperty on SMO
to get the information:
Server.Information.Version.Major --whereas 8 is SQL 2000 and 9 is
SQL2k5
HTH, jens Suessmeyer.
--
http://www.sqlserver2005.de
--|||Jens,
Fantastic! Thanks very much.
Amos.
"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1150928369.273988.134490@.g10g2000cwb.googlegroups.com...
> Hi,
> wait a minute, you queried for the wrong property. Guess you queried
> for something like the Build Number. Use the following peroperty on SMO
> to get the information:
> Server.Information.Version.Major --whereas 8 is SQL 2000 and 9 is
> SQL2k5
> HTH, jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>

Tuesday, February 14, 2012

database usage

I have an application which uses a special login credential (username and
password) to access several sql databases.
Its installed on several clients. what's the best possible way to determine
what all databases the application connected to, at the end of the day from
SQL Server Side. ?
thxskg,
You did not tell us which interface are you using to connect to sql server.
In case you are using ADO or ADO.NET, you can setup the property "Applicatio
n
Name" in the connection string. Then you will be able to use sp_who2 or
sysprocesses and look for that value.
AMB
"skg" wrote:

> I have an application which uses a special login credential (username and
> password) to access several sql databases.
> Its installed on several clients. what's the best possible way to determin
e
> what all databases the application connected to, at the end of the day fro
m
> SQL Server Side. ?
> thx
>
>|||Thanks!!. I am using ado.net. The clients can close the application at the
end of the day.
In that case i will not be able to find out, which database.
What iam looking for is whethere there is a record whether a user logged in
a particular database today?
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:ED55575B-B66A-489A-8B3B-B2770446B696@.microsoft.com...
> skg,
> You did not tell us which interface are you using to connect to sql
> server.
> In case you are using ADO or ADO.NET, you can setup the property
> "Application
> Name" in the connection string. Then you will be able to use sp_who2 or
> sysprocesses and look for that value.
>
> AMB
> "skg" wrote:
>

database update problem

hey guys. My database doesnt update until my application is exited. I need it to update at run time. Could anybody tell me how to fix this problem?

Your application IS using the server in 'run-time'.

Sounds like you may have an issue with how the application is holding data remotely, and then flushing its data changes to the server upon exit or close. That is a application design issue and not a SQL Server issue.

Perhaps I'm not understanding your plight. Care to go into more detail?

|||it updates when I run it from visual, just not the published version

Database trigger to run managed C# code

Hi there,

Values in my database need to updated periodically. The code, upon starting the application, queries the database and stores the values in the Application collection. This is to avoid making a database call everytime the values are needed (increases performance). The drawback is that changes to the database values are not updated in the code.

How can I create a database trigger that will update the C# Application colllection whenever a table value is updated?

The following article gave me some good insight on how to integrate the .NET CLR with SQL Server 2005.

http://msdn2.microsoft.com/en-us/library/ms345136.aspx

I can now create triggers to run managed C# code. However, the CLR is limited because I cannot reference the System.Web.HttpApplicationState object or anything to do with HTTP requests; so I can't update my Application collection.

However, the CLR does let me access System.Web.Services. So I should be able to make a web service call to update the variables. More to come on this....

|||

I solved my issue. Seems like I was going down the wrong path. The SqlCacheDependency class is what I needed. I can set up a cache dependency on a SQL table so that when values in that table change the associated cache value will be invalid.

Here's a good article on SqlCacheDependency ->http://www.ondotnet.com/pub/a/dotnet/2005/01/17/sqlcachedependency.html?page=last

This increases performance significantly! Awesome!