Database Page Counter

Aug 6, 2004

Hi All,





I need some comments regarding my Hit Counter that I have created for my sites. Here is my case:





I have developed several websites which I host along with MS SQL server. I created a class that calls a stored procedure to add a count to the database field. The way that I am using it is that every page in the page_load event will call the class indicating which counter to use (i.e. LoginPage, HomePage, ProductPage, etc.). The class in turn will perform the database route to increment the counter. In the Store procedure before incrementing the counter, I first check to see if a record for the current date has been created, if not I add the record with a date stamp with all the different counter values as zero. I then will add 1 to the desired counter for the date.





Is this a good solution?





What I now want to do is create a page that allows the different website owners to access a page with the relevant page counters.





Any ideas will be greatly appreciated.





Thanks

View 2 Replies


ADVERTISEMENT

SQL Database - Hit Counter - Using Visual Basic In VWD

Apr 21, 2008

Let me get VERY specific.
This site has 40+ pages Using VWD 2008 (Studio 2008)
I have created in local IIS7 (129.0.0.2) http://cumc.lcl
Navigation.master, Web.config and Web.sitemap alll are structured
And all 40+ pages have been built.
NOW I added (using VWD) a sql server database named pagedata.mdf
With a table named: pages
and fields:
PageID - Primary Key (auto numbered)
pagename - nchar(30) exmp Default
hitcount - numeric(18,0)
createdate - nchar(15) exmp 04/18/2008
updated - nchar(15) similar to createdate
hitdate - nchar(15) similar to createdate
bottom of each page is to show 99999 visitors
and under that is to be Updated on mm/dd/yyyy
On pageload should accomplish the following increment the hitcount
field and save it and display it in HitLabel.text
Set UpdateLabel.text to updated field
Save the date the page was hit in hitdate field. (will only show when last hit)

The "tester.aspx" page now has:


<%@ Page Language="VB" MasterPageFile="~/Navigation.master" Title="tester" %>

<script runat="server">

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

End Sub
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<p align="center">This page is for various tests<br />and will NOT be site mapped.</p>
<p align="center"></p>
<p align="center">

Can this SqlDataSource be moved into Sub Page_load above?
How do I extract, process and save the Hit and Date data
for each individual page referenced by pagename field?
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStringsageConnect %>"
SelectCommand="SELECT * FROM [main] WHERE ([pagename] = @pagename)">
<SelectParameters>
<asp:QueryStringParameter Name="pagename" QueryStringField="thispage"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</p>
<p align="center">
<asp:Label ID="HitLabel" runat="server"></asp:Label>
&nbsp; Visitors<br />
Updated on&nbsp; <asp:Label ID="UpdateLabel" runat="server"></asp:Label>
</p>
</asp:Content>

View 2 Replies View Related

SQL Mobile Counter Problems When Creating Database

Jan 14, 2008

We are building a small utility tool application for clients who sometimes may not access the company central database. The application use the merge replication to implement the Web Synchronization of the SQL server database and SQL server compact edition database at the client machine.

After the installation of the application, we use the following code to create a sql server compact edition .sdf file.


SqlCeReplication repl = new SqlCeReplication();

repl.AddSubscription(AddOption.CreateDatabase );

repl.Synchronize();


Some machines run the process successfully, and the database .sdf was created and replicated successfully. However, some machines failed, the error message got is "SQL mobile encountered problems when creating database". All the client machines are Windows XP. We did some research and found someone commented SQL Server compact edition file (.sdf) is a medium integrity level resources file, in some windows system, IE runs in protected mode and is a €ślow integrity€? process, which caused the Access Denied.

Can anyone here know any solution to this issue? Any help is highly appreciated.

View 3 Replies View Related

Counter For Max Tickets - Refer To A Database Table Row/column Etc

Feb 7, 2008

I posted a thread in the Getting Started forum about how to make a counter for maximum tickets : http://forums.asp.net/t/1215258.aspx
but maybe this is a more appropriate forum for this subject.
In a school project, we are making a website for a fictional concert/festival (using Visual Studio 2005, C#). On that site users can register and order tickets.
We have access to an SQL-database, by the way, where we can create tables etc. 
We want the maximum amount of tickets to be 10000 per day. The festival is supposed to last from friday to sunday.
What would be the best way to do this programatically? The counter should maybe be in an own database table?

View 3 Replies View Related

Reporting Services :: All Record Are Displaying On One Page - How To Display Page By Page

Nov 11, 2015

I have created one reports but all the records are displaying on one page.find a solution to display the records page by page. I created the same report without group so the records are displaying in page by page.

View 3 Replies View Related

I Need To Pass Data Entered /created On The First Page To The Next Page And Populate The Next Page With Some Data From The Fir

Nov 28, 2006

Hello I have a project that uses a large number of MS Data access pages created in Access 2003 and runs on MS SQL2005.

When I am on lets say my client, (first page in a series) data access page and I have completed the fields in the (DAP), I am directing my users to the next step of the registration process by means of a hyperlink to another Data access page in the same web but in a linked or sometimes different table.


I need to pass data entered /created on the first page to the next page and populate the next page with some data from the first page / table. (like staying on the client name and ID when i go to the next page)


I also need the first data access page to open and display a blank or new record. Not an existing record. I will also be looking to creata a drop down box as a record selector.


Any pointers in the right direction would be appreciated.
I am some what new to data access pages so a walk through would be nice but anything you got is welcome. Thanks Peter€¦

View 2 Replies View Related

Connecting Asp.net Page To Sql Database

Apr 22, 2005

i am trying to connect to a sql database called abc but am not sure what goes in the connection string below in red.

please help


SqlCommand myCommand = null;
SqlDataReader myReader = null;
SqlConnection mycon = null;
mycon = new SqlConnection(what should go here)
mycon.Open();
myCommand = new SqlCommand("select count(*) from tbl_chkAdmin",mycon);
int count=(int)myCommand.ExecuteScalar();
//SQLDataReader myread=mycomand.ExecuteReader();
if(count>0)
{

View 3 Replies View Related

Getting Value From Database Onto HTML Page

Nov 24, 2013

I am trying to display a price from a table I created in MySQL to a web page. I have created a php form to open and select the home. The data base is simple with a table called homes fields home - size and 4 price fields one being mobile which I am showing here. How to get the information to show up on my index.php page.

php for opening database and file. data2.php
<?php
require('mysqli_connect.php');
$q = "SELECT * FROM homes WHERE home='solera'";
$result = @mysqli_query ($dbcon, $q);
echo '$result.$row['mobile']';

[code]...

View 2 Replies View Related

SQL Counter In Statement

Jul 5, 2006

Hi
I'm using a gridview to show a list of high scores in a c#.net page. The position of the score is not stored in the database, just the score, name and id.
In the gridview however I would like to indicate the position of the scores, the SQL statement sorts the records by ascending scores so the are already in the correct order.
Does anybody know how to include a counter in the SQL statement that I can refer to vai the gridview so that it is able to display it as the position?
Thanks in advance for any help!

View 2 Replies View Related

Multipage Hit Counter

Jun 21, 2004

SQL Databased Multipage Hit Counter

# 1 - You want a Multipage Hit Counter to keep track of the number of Hits each individual webpage gets in your website.
# 2 - You also want to store the Webpage Hit Count Values into a SQL Database, using Stored Procedures.

Using 2 Webpages as an example:

--------------------------------------------------------------------------------

Inside webpage #1 put insert the following:


<%@ Page Language="VB" Debug="true" %>

<%@ import Namespace="System.Data" %>

<%@ import Namespace="System.Data.SQLClient" %>

<script runat="server">

Sub Page_Load(Source as Object, E as EventArgs)

Dim objCon As New SQLConnection("server=yourServerName;User id=idName;password=yourPassword;database=HitsCounter")

Dim cmd As SQLCommand = New SQLCommand("EXEC dbo.webcounter1", objCon)

objCon.Open()

Dim r as SQLDataReader

r = cmd.ExecuteReader()

r.read()

strcounter3.text = "Hits : " & r.item(0)

end sub

</script>



Also insert the following inside the body tags of webpage #1
<asp:Label id="strcounter3" font-size="X-Large" font-bold="True" bordercolor="Silver" width="300px" borderstyle="Inset" forecolor="Lime" visible="True" runat="server"></asp:Label>

Marked in Red webcounter1 is the Stored Procedures Name.
ALso marked in<B> Red counter3 is the name of the Database.
This is where you would make your changes inside the Webpages.

--------------------------------------------------------------------------------

Use the following Stored Procedure with Webpage #1

CREATE PROCEDURE dbo.webcounter1
WITH RECOMPILE
AS
BEGIN
SET NOCOUNT ON
DECLARE @hits INT
SELECT Hit FROM counter3
WHERE
ID = 1
update counter3 set hit = hit + 1
EXEC sp_recompile counter3
END
GO


--------------------------------------------------------------------------------

The Database Table has 2 columns which consists of an ---ID & Hit Column -- The Table Name is (counter3)
The best way to explain is by showing so posted below are Webpages 1 & 2 along with there Stored Procedures.


--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

Inside webpage #2 put insert the following:


<%@ Page Language="VB" Debug="true" %>

<%@ import Namespace="System.Data" %>

<%@ import Namespace="System.Data.SQLClient" %>

<script runat="server">

Sub Page_Load(Source as Object, E as EventArgs)

Dim objCon As New SQLConnection("server=yourServerName;User id=idName;password=yourPassword;database=HitsCounter")

Dim cmd As SQLCommand = New SQLCommand("EXEC dbo.webcounter2", objCon)

objCon.Open()

Dim r as SQLDataReader

r = cmd.ExecuteReader()

r.read()

strcounter3.text = "Hits : " & r.item(0)

end sub

</script>



Also insert the following inside the body tags of webpage #2
<asp:Label id="strcounter3" font-size="X-Large" font-bold="True" bordercolor="Silver" width="300px" borderstyle="Inset" forecolor="Lime" visible="True" runat="server"></asp:Label>

--------------------------------------------------------------------------------

Use the following Stored Procedure with Webpage #2

CREATE PROCEDURE dbo.webcounter2
WITH RECOMPILE
AS
BEGIN
SET NOCOUNT ON
DECLARE @hits INT
SELECT Hit FROM counter3
WHERE
ID = 2
update counter3 set hit = hit + 1
EXEC sp_recompile counter3
END
GO


--------------------------------------------------------------------------------

Now this type of Hit Counter works fine to a point.
Visiting Webpage #1 accumilates 1 Hit & Visiting Webpage #2 Accumilates 2 Hits.
And each time there 's a revisit to these pages they acquire 2 Hits each.
I'm Guessing the problem is in the Stored Procedure storing there values in Memory.
If Someone can Help Figure Out how to fix this. This could be a nice Website Multipage Hit Counter. I can use some help Guys feel free to advise.

View 3 Replies View Related

Record Counter

Nov 7, 2000

I'm trying to write a select that returns a result set with a counter added on. I want to do it without using an identity column or cursor. Something along the lines of select col1, max(col2)+1 from tab1.
I get (as expected)

col1 col2
------- ------
a 25
b 25
c 25

I want

col1 col2
------- ------
a 25
b 26
c 27

Thanks,

Jim

View 2 Replies View Related

Thread Counter

Oct 23, 2003

Hi Everyone,

The sqlserv.exe takes too much CPU utilization on my SQL 2000 on W2K production machine. I am tring to use System Monitor to monitor the Thread/%process time with all Sqlservr instances, and then match the sqlservr instance number to the KPID in sysprocesses table to find out which user is causing the problem. but I can only see the instance number from Sqlservr0 to sqlservr99. From the table sysprocesses table, the KPID is all 3 or 4 digits number. Any one has any idea about this?

Thanks in Advance.

Jason

View 2 Replies View Related

Record Counter

Oct 11, 2006

I need to add a ClaimCount column to a table. I am having a bit of trouble with the SQL to make sure it populates correctly.

Current Table

claim#namePaid
123George Washington50
123 George W Washingon50
124Sam Adams100
126George Washington75
128Rich Cheney69
128Dick Cheney69
128Richard CHeney69



Want to add a column (ClaimCount) as follows

Claim#namePaidClaimCount
123George Washington501
123 George W Washingon502
124Sam Adams1001
126George Washington751
128Rich Cheney691
128Dick Cheney692
128Richard CHeney693

Rules for ClaimCount.
1) there is no order by, It doesn't matter which record with the same Claim# is 1 or 2 or 3...

Appreciate the help.

Ray

View 10 Replies View Related

Incremental Counter

Nov 16, 2007

I am looking to create a incremental value based on the resulting insert that I am using. There already is another field being used as an identity field. I have a beginning value that I just want to add the row number to for the insert.

insert into lineitem select substring(group_id,4,len(ltrim(rtrim(group_id)))-3) as co_code,
0,0,(case when enddate < cast(month(getdate()) as varchar(10))+cast(day(getdate()) as varchar(10))
then 'Prior' else 'Current' end ),
left(acct_type,2) as bene_type, convert(smalldatetime,left(ltrim(rtrim(eff_date)), 8)),
0,trans_amt,0,0,convert(smalldatetime,left(ltrim(r trim(sett_date)),8)),
ltrim(rtrim(b.fname)) + ' ' + ltrim(rtrim(b.lname)) as payee,0,0,a.ssn,'Y',999+count(*),
(case when isnull(b.location,'') = '' then '' else b.location end) as location
from mbi_tran_temp a
left join enrollees b on a.ssn = b.ssn and
ltrim(rtrim(a.group_id)) = ltrim(rtrim(b.mbicode))

The '999+count(*)' is where I would like to have the incremental value.

View 13 Replies View Related

Simple Row Counter

Mar 9, 2004

It sound like a simple task to perform but I just can't seem to get it. I've built a search function on the site and after each search request, a log is kept of the search word and the date, so the table looks a little like this:

ID&nbsp;&nbsp;SearchTerm DateSearched
============================
1&nbsp;&nbsp;&nbsp;home&nbsp;&nbsp;&nbsp;2004/03/09
2&nbsp;&nbsp;&nbsp;fred&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2004/03/08
3&nbsp;&nbsp;&nbsp;cup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2004/03/08
4&nbsp;&nbsp;&nbsp;home&nbsp;&nbsp;&nbsp;2004/03/08
5&nbsp;&nbsp;&nbsp;home&nbsp;&nbsp;&nbsp;2004/03/08
6&nbsp;&nbsp;&nbsp;fred&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2004/03/07

I want to pull out each of the search terms as well as how many times they've been searched on so I could display it in the format like so:

Word&nbsp;&nbsp;&nbsp;Qty
============================
home&nbsp;&nbsp;&nbsp;&nbsp;3
fred&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2
cup &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1

Any help would be appreciated. Thanks.

Goran (GoMo)

View 4 Replies View Related

T-SQL (SS2K8) :: Way To Add A Counter At End Of Each Row

Aug 18, 2015

My client wants IN_PUNCH to be the first in punch of the day and the OUT_PUNCH to be the last out punch of the day based on the TransactionDate as it is showing in the desired results table for 07/29 and 07/30 (Changes are highlighted in Bold).

I tried using MIN and MAX at different areas but to no avail.Also, is there a way to add a counter at the end of each row so in case if there were two shifts in a day then it be a '1' for row 1 and a '2' for row 2?

WITH SampleData (PERSON,TRANSACTDATE, STARTDATE, END_DATE, IN_PUNCH,OUT_PUNCH,HOURS,PAYCODE,SHIFT_LABEL,DOW) AS
(
SELECT 1234,'07/27/2015','07/27/2015','07/27/2015', '12:00','12:00','8', 'Hol', 'NULL', 'Monday' UNION ALL
SELECT 1234,'07/28/2015','07/28/2015','07/28/2015', '08:00','','4.00', 'Absent', 'Batax 1st','Tuesday' UNION ALL
SELECT 1234,'07/28/2015','07/28/2015','07/28/2015', '12:15','14:00','3.75', 'Regular', 'Batax 1st','Tuesday' UNION ALL

[code]...

View 2 Replies View Related

Getdate Day Counter

Dec 13, 2006

Hello,

I need to count the days (24 hours)from the (GETDATE()),returning an integer in a table column, automatically, all the time , under the scene until after a specified number of days (usually 20 for example), the relevant table row is be automatically deleted, replaced by another insert (row) to start again and the process repeated many times.

I have a database which works automatically. The data need not to be queried or manipulated until the row is deleted automatically.
I use SQL Server 2000.

Any ideas of doing this in a simple way ?
Regards and thanks in advance.Yves.

View 12 Replies View Related

Sequence Counter

Nov 5, 2007

I'm looking for a query that will look at an Id field and if it occurs more than once then returns the count of the times it occurs. For Example,

ID Code GetSequence
4 239 1
4 241 2
4 3243 3

View 5 Replies View Related

RESET COUNTER

Nov 9, 2007

Hello everyone:

this procedure resets the business day to one for every month. It works fine except for the month of October. any idea or suggestions?

DECLARE @i INT
SET @i = 1
DECLARE @DateID INT,
@DtTimeD DATETIME,
@LASTDAY DATETIME
DECLARE c CURSOR
FOR
--
-- LASTDAY is the last day of the month
-- the counter will reset to 1 on the first of each month
--
SELECT DateID, DtTimeD, DATEADD(dd, -DAY(DATEADD(m,1,DtTimeD)), DATEADD(m,1,DtTimeD)) 'LASTDAY'
FROM D_DATE
WHERE WkDayIn = 'Yes' AND HolidIn = 'No'
OPEN c
FETCH NEXT FROM c INTO @DateID, @DtTimeD, @LASTDAY
WHILE @@FETCH_STATUS = 0
--
-- update the business day in D_DATE
--
BEGIN
UPDATE D_DATE
SET BusDay = @i
WHERE DateID = @DateID
--
-- reset the counter to 1 if it's the last day of the month
--
IF @DtTimeD = @LASTDAY
SET @i = 1
ELSE
SET @i = @i + 1
--
IF @@ROWCOUNT = 500
COMMIT
--
FETCH NEXT FROM c INTO @DateID, @DtTimeD, @LASTDAY
END
CLOSE c
DEALLOCATE c
GO

View 10 Replies View Related

Record Counter

Feb 15, 2006

I have a form that I turned off the nav buttons. I then create my own.The reason I do is that I cna then move the nav buttons any where I needto on the form.The only thing I can not figure out is on the default ones, it shows thetotal records. I can not figure out how to do this. The form is based ona table and when I add a record or delete a record I want to make ssurethe total displayed is correct.How can I display the total records, for the table, on the form on thefly?Does that make sense?Michael Charneym charney at dunlap hospital dot org*** Sent via Developersdex http://www.developersdex.com ***

View 1 Replies View Related

How To Use Variables As A Counter?

Aug 8, 2006

While inserting data into a target table, I'm trying to populate a primary key ID field sequentially. For each record, the value of the primary key field needs to be incremented by one (a counter).

I've tried to use the RowCount transformation to store the values in a variable. I'm able to successfully do that; however, I don't know how to read or update the variable incrementally.

If someone knows how to perform this task, please let me know. I would greatly appreciate it.

View 3 Replies View Related

Counter By Group

Jul 18, 2007

How can I create a counter (line#) by group were it resets = 1 whenever a new group starts.



Customer Line#

A 1

A 2

A 3



B 1



C 1

C 2

View 3 Replies View Related

Insert Counter

Apr 8, 2006

when a new record is inserted in to table, i want to increment the variable called counter by 1

how can i implement this?

what is the IDENTITY field in a table? is it something like a counter variable

pls let me know

View 4 Replies View Related

Updating An SQL Server Database From An ASP.NET Page

Dec 14, 2006

Hello again!I think what I need to do should be simple, but it is proving difficult.I am displaying a page with data drawn from three different SQL Server tables. Most of the fields on the page correspond to fields in one of the three tables, and these fields can be updated by the user. I then want to propagate these updates to SQL Server, refill the DataSet, and rebind.What I'm currently doing is basically this. I've set up a separate SqlCommand for this update. I have a ParameterCollection defined for this SqlCommand that includes the key field to be used in my WHERE clause and all the fields I want to update.When the user clicks on the [Save Customer Review] button, I (1) set the values of the parameters to the values of the corresponding screen fields, in most instances using one of the Convert methods so the data being assigned to the parameter has the correct type; (2) open an SqlConnection; (3) do SqlCommand1.ExecuteNonQuery(); (4) close the SqlConnection; (5) fill the DataSet; (6) bind.I've experienced multiple kinds of failure in this process, but the primary kinds of failure I've experienced are these:- The one value I'm actually updating (a text field) doesn't get updated on the database. No other fields are touched.- Two fields with Int values (SQL Server shows them as length 4; does that correspond to Int32?) are set to NULL.- The ExecuteNonQuery complains that I'm not supplying a value for the one field that is type DateTime. (In the SQL Server database, this field is permitted to be NULL, and in the record I'm playing with, it is in fact NULL. However, since TextBox.Value is of type String, I'm having to set it to Nothing [Visual Basic] if the text box is blank.)One thing I don't like about this is that I can't see what values the parameters are taking on as I do my processing, even in the debugger. At least I don't know of any way to examine or watch them. One reason this bothers me is that I have a rather strong suspicion that there's something wrong with the way I've set up the parameters, but I can't tell what's happening to them to confirm that, and I also can't see the SQL that's being generated (or can I?).Any thoughts?Thanks,TimPS Be gentle, please -- this is my first Web application. :-)

View 10 Replies View Related

Update Page When Data In Database Changes.

Jan 4, 2006

Hi,
Can someone help me.  I need to update a page on my site when the data in a database table is changed (by someone else). 
I would like to poll the database every 5 secs or so to see if it has changed.  I am using asp.net v1.1.
Any help would be appreciated.
Jon

View 1 Replies View Related

Locate Database Object Given The Page

Mar 8, 2005

Hi Folks,

Getting the following error after a DBCC CHECKDB

Server: Msg 8906, Level 16, State 1, Line 1
Page (3:15010) in database ID 9 is allocated in the SGAM (3:3) and PFS (3:8088), but was not allocated in any IAM. PFS flags 'MIXED_EXT ALLOCATED 0_PCT_FULL'.

Trying to located the object that the allocation has gone to pot over.

Any quick way to resolve a datbase object using a page ID?

Thank In Advance

View 2 Replies View Related

Could Not Allocate New Page For Database 'TEMPDB'?

May 9, 2004

"Could not allocate new page for database 'TEMPDB'. There are no more pages available in filegroup DEFAULT. Space can be created by dropping objects, adding additional files, or allowing file growth."

I get this error when running a query on another database. But why?

Both data and transaction files on TEMPDB are set to "automatically grow file" and "unrestricted file growth" and there is 70GB of free space on the disk drive. Shouldn't the files just grow? Why would this happen?

View 7 Replies View Related

Could Not Allocate New Page For Database 'TEMPDB'

May 22, 2004

I get the following error when doing a variety of basic queries on other databases:

"Could not allocate new page for database 'TEMPDB'. There are no more pages available in filegroup DEFAULT. Space can be created by dropping objects, adding additional files, or allowing file growth."

This doesn't make any sense since they are set to auto grow and there is plenty of disk space to do so.


Both data and transaction files of tempdb are set to:
"Automatically grow file" is checked
"Maximum file size" is set to "Unrestricted file growth"
Growth rate of 10%

Both tempdb data file and transaction file are on D: but all drives have ample space:
c:25 GB free
D:69 GB free
E:175 GB free

sp_spaceused returns the following for tempdb:

namesizeunallocated space
tempdb4.00 MB1.45 MB

reserveddataindex_sizeunused
568 KB176 KB304 KB88 KB

sp_helpdb returned for tempdb:

tempdb
4.00 MBsa2Apr 23 2004Status=ONLINE, Updateability=READ_WRITE, UserAccess=MULTI_USER, Recovery=SIMPLE, Version=539, Collation=SQL_Latin1_General_CP1_CI_AS, SQLSortOrder=52, IsAutoCreateStatistics, IsAutoUpdateStatistics80

This is with SQL Server 2000 (Personal Edition)
Product Version: 8.00.760 (SP3)

Is this some strange limitation of Personal Edition? Is it worth upgrading to Standard Edition?

View 2 Replies View Related

Could Not Allocate New Page For Database 'TEMPDB' Help

Oct 18, 2007



Hello, I have an issue with a process that blows up because of the following error.

Executed as user: batchloader. Updated 0 existing Company records [SQLSTATE 01000] (Message 0) Inserted 0 new Company records [SQLSTATE 01000] (Message 0) Inserted 0 new EntityIdXref records [SQLSTATE 01000] (Message 0) Updated 977 existing CompanyCustomerAttr records [SQLSTATE 01000] (Message 0) Inserted 0 new CompanyCustomerAttr records [SQLSTATE 01000] (Message 0) Could not allocate new page for database 'TEMPDB'. There are no more pages available in filegroup DEFAULT. Space can be created by dropping objects, adding additional files, or allowing file growth. [SQLSTATE 42000] (Error 1101). The step failed.

Ok I am going to be typeing some really bad practices(I just started here 3 weeks ago.)

There is 23.6 gig free on my log drive. The disk is not running out of space and there are no disk errors in event viewer. The process in question calles 2 procs. These 2 proces load files from the filesystem and bulk load them into #temp tables. Then select's from these tables are issued using criteria from a static table. There are around 700000 rows being inserted into the #temp tables and no indexes are being created so very large table scans going on. Also there are some cursors being called to row by row minipulate the records and in the cursor it calles fucntions using cursors. There are thousands of files being processes everyday by several different jobs. All of the processes are written the same way. We have the tempdb set to auto grow by 10 % and the initial size is 3.5 gig. There are 3 to 4000 tables in the database and 90 % of them are being created on the fly to be used by this process and yes once again there are no indexes created on the on the fly tables. We have only one Filegroup on the server default.

I believe that takeing some of the objects and moving them to there own filegroup will help this issue. Every month we take on up to 800000 new records to process on top of what we allready do. So we use cursors cursors cursors temp objects with no indexes and massive recordsets and doing sorts on massive records sets. I am working with development to show them how and where to index but this will take time. I need a quick solution. Any thoughts any questions? The box has 4 gig of ram.

View 3 Replies View Related

Can't Start Performance Log Counter

Jul 22, 2005

I'm a local admin on a SQL Server with dba permissions. I can view that SQL Server in System Monitor and I can create a performance log counter. When I try to start the counter, I get an error: ---------------------------
Performance Logs and Alerts
---------------------------
The SQLSever log or alert has not started. Refresh the log or alert list to view current status, or see the application event log for any errors. Some logs and alerts might require a few minutes to start, especially if they include many counters.
---------------------------
OK
---------------------------

Does anyone have ideas why this isn't working?

View 14 Replies View Related

How To Delete A Counter In A Field ?

Aug 28, 2006

I want to delete a counter using an SQL query (alter, drop...)

What could be the SQL query

View 3 Replies View Related

Line Count Counter

Jun 13, 2008

CREATE TABLE#Info
(
DbName SYSNAME,
ROUTINE_TYPE SYSNAME,
ROUTINE_NAME SYSNAME,
Lines INT
)

EXECsp_msforeachdb'
INSERT#Info
(
DbName,
ROUTINE_TYPE,
ROUTINE_NAME,
Lines
)
SELECT''?'',
d.ROUTINE_TYPE,
d.ROUTINE_NAME,
SUM(CASE WHEN d.c10 < d.c13 THEN d.c13 ELSE d.c10 END)
FROM(
SELECTROUTINE_TYPE,
ROUTINE_NAME,
1 + LEN(ROUTINE_DEFINITION) - LEN(REPLACE(ROUTINE_DEFINITION, CHAR(13), '''')) AS c13,
1 + LEN(ROUTINE_DEFINITION) - LEN(REPLACE(ROUTINE_DEFINITION, CHAR(10), '''')) AS c10
FROM.INFORMATION_SCHEMA.ROUTINES
) AS d
GROUP BYd.ROUTINE_TYPE,
d.ROUTINE_NAME
'
SELECTDbName,
ROUTINE_TYPE,
ROUTINE_NAME,
Lines
FROM#Info
ORDER BYDbName,
ROUTINE_TYPE,
ROUTINE_NAME

DROP TABLE#Info

E 12°55'05.25"
N 56°04'39.16"

View 15 Replies View Related

How To Get Sum Of Counter With Time Difference

Dec 9, 2013

Table

DateField--------------CNT-1 CNT-2 CNT-3
2013-12-09 09:00:00.000 8 1 2
2013-12-09 09:01:00.000 3 7 1
2013-12-09 09:02:00.000 1 2 3
2013-12-09 09:03:00.000 2 5 2
2013-12-09 09:04:00.000 1 1 7
2013-12-09 09:05:00.000 2 3 2

My requirement is to get the output in the following format if i take the time with 2 minutes difference

DateField ------------------ Sum-CNT-1 Sum-CNT-2 Sum-CNT-3
09:00:00.000 - 09:02:00.000 12 10 6
09:02:00.000 - 09:04:00.000 3 6 9

Is there anyway i can write down a query to get the sum of the counter with 2 minutes difference. I may take time slot between 9 AM to 10 AM so i should get the sum of the counter with 2 minutes gap in a single query.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved