Confusing Data Error

Mar 29, 2007

I have a gridview that is very basic and list name, address, ......., and a URL.

If I have this url in the database I have no problem http://www.lubbockisd.org/earlychildhood/

yet when I place this URL http://www.lubbockisd.org/erlychildhood/stubbs.htm

It triggers this error on my localhost server and my production server.
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

I've made changes to datatypes with no success, made sure my length of data type was set long enough with no success.

Which datatype is best for a URL in sql express? 

Any ideas why this happens with such a minor change?

 

Thanks

 

Tony

View 13 Replies


ADVERTISEMENT

SP's Confusing Me!

Oct 26, 2004

Argh, I'm really stuck with my SP! I'm not really used to them yet.

I have an advertiser who has multiple advertisements. I need to return a list of adverts with thier first advert.

CREATE PROCEDURE selectAdvertiserByCat
(
@category nvarchar(100)
)

AS

select
distinct advert.advertiser_id,
advert.advert_id,
advertiser.fullname
from
advert
join advertiser on advert.advertiser_id = advertiser.advertiser_id
where
category = @category
GO

I can't figure it out!

View 3 Replies View Related

Log Backups Confusing Me

Jul 20, 2004

Please help me out on log backups.


What happens when 2 log backups of the same db happen simultaneously?

Hypothetically:
One Backup Log job run by SQL Server agent(xp_SQLmaint) every 60 minutes & one Log backup run by Backup Exec every 59 minutes.

Is this a dumb idea and will it cause restore problems based on LSN's contained in the 2 separate backup sets?

Thanks
G

View 4 Replies View Related

Should My Where Clause Be Confusing Or NOT???

Oct 19, 2005

heh,heh,heh...cute title, eh? I kill me...

Anyway, The following two select statements return exactly the same results, and utilize exactly the same server resources to run (according to the generated explain execution plans).

The where clause(s) in each are designed to exclude rows that are "empty" according to the designer of the db (don't ask...*rolleyes*).

My question is this...which way would y'all code the select. I have always been "trained" to NOT use negative logic (heh,heh,heh), so originally wrote the select (which, in effect, translates to "get me everything but the empty rows") as:SELECTOSID AS OSID,
[Year] AS QtrYear,
1 AS QuarterNo,
QEPS4 AS EPS,
QSales4 AS Sales,
QInc4 AS Income,
CONVERT(varchar(10), QDate4, 101) AS EarningsReportDate
FROM dbo.RSMsi
WHERE ((QEPS4 <> 0.001 AND QEPS4 <> 0.0)
OR QSales4 <> 0.0
OR QInc4 <> 0.0
OR QDate4 <> '01/01/1900')but in retrospect, I think that's an ugly where clause, and think folks will look at it and think "WTF??? what does THAT mean?". So, I re-wrote the select as if it was looking for the empty rows, then slapped a "NOT" in front of the where clause to negate it in order to STILL say "Get me everything, but NOT the empty rows", as follows:SELECTOSID AS OSID,
[Year] AS QtrYear,
1 AS QuarterNo,
QEPS4 AS EPS,
QSales4 AS Sales,
QInc4 AS Income,
CONVERT(varchar(10), QDate4, 101) AS EarningsReportDate
FROM dbo.RSMsi
WHERE NOT ((QEPS4 = 0.001 OR QEPS4 = 0.0)
AND QSales4 = 0.0
AND QInc4 = 0.0
AND QDate4 = '01/01/1900')whatcha think y'all? It's a style issue, I know...just curious for consensus' sake. Thanks!

View 9 Replies View Related

A Confusing Join (for Me)

Jul 10, 2006

I have 5 tables, the first 4 are responsible for getting wines with all their associated info:

Areas - Regions - Wineries - Wines

The last table is an artwork table, and both wineries and wines can have artwork associated with them. How do I integrate a join on the 'Artwork' table for both wineries and wines, taking into account that sometimes (for a single record) there is art for both winery and wine, sometimes for one, sometimes there is none?

I think I understand the 'ON' statement, for instance:

Wineries LEFT JOIN Artwork
ON Wineries.winery_id = Artwork.artwork_winery_id

'and'

Wines LEFT JOIN Artwork
ON Wines.wine_id = artwork_wine_id

But how do I integrate that into the following SELECT statement?

SELECT
area_id, area_name,
region_id, region_area_id, region_name,
winery_id, winery_region_id, winery_name,
wine_id, wine_winery_id, wine_name,
artwork_id, artwork_name, artwork_wine_id, artwork_winery_id

FROM Areas INNER JOIN
Regions ON Areas.area_id = Regions.region_area_id

INNER JOIN Wineries ON
Regions.region_id = Wineries.winery_region_id

INNER JOIN Wines ON
Wineries.winery_id = Wines.wine_winery_id

ORDER BY winery_name ASC;

- ompadme

View 6 Replies View Related

Confusing Join

Jul 26, 2007

I'm stuck trying to pull together what is for me a complex join statement. I have 8 tables following, and would like to figure out how to extract all users and roles (if they have any associated)
when given a company and division. I have given a couple examples the way they should be output.


RoleTbl
----------------
RoleID|RoleName
----------------
1|Admin
2|User
3|Guest


RoleDivisionTbl
---------------
RoleID|DivisionID
-----------------
1|1
2|1
3|1
2|2

DivisionTbl
----------------
DivisionID|DivisionName
----------------
1|Accounting
2|Marketing
3|Sales

CompanyDivisionTbl
----------------
CompanyID|DivisionID
----------------
1|1
1|2
1|3
2|2

CompanyTbl
----------------
CompanyID|CompanyName
----------------
1|Gap
2|MayCo
3|Sears

UserRoleTbl
----------------
UserID|RoleID
----------------
1|1
2|3
3|2
6|2

UserTbl
----------------
UserID|UserName
1|Jim
2|Frank
3|Kelly
4|Al
5|James
6|Tom
7|George

CompanyUserTbl
----------------
CompanyID|UserID
----------------
1|1
1|2
1|3
1|4
1|5
2|6
2|7

Ex1:
If Company=1 and Division=1
Output:
UserID|UserName|RoleID|RoleName
1|Jim|1|Admin
2|Frank|3|Guest
3|Kelly|2|User
4|Al|Null|Null
5|James|Null|Null

Ex2:
If Company=2 and Division=2
Output:
UserID|UserName|RoleID|RoleName
6|Tom|2|User
7|George|Null|Null


Please help!!! Thanks!!!
Boybles

View 7 Replies View Related

Roles Confusing -Need Help

Jul 20, 2007

I have the following scenerio configured in sqlserver -

Windows group Login User Role

domainAuditConfig domainAuditConfig domainAuditConfigUser AuditConfigRole

domainLookupConfig domainLookupConfg domainLookupConfigUser LookupConfigRole



domainuser belongs to both domainAuditConfig and domainLookupConifg windows groups.

When domainuser logs in, he will have both AuditConfigRole and LookupConfigRole roles.



If I reconfigure the above using loginless user, how can the user takes on both roles at the same time?

It seems to me that the user needs to know what role he needs at the time and run the appropriate EXECUTE AS command. Is this true? I can see the benefits of using EXECUTE AS when we are testing our code. But in a production environment, how can the end user know who to EXECUTE AS?

Does it only make sense to use EXECUTE AS from within an application?



Thanks

View 8 Replies View Related

Sth Confusing About Table Structure

Oct 27, 2007

Hi,I have a table for storing my picture albums here it is:CREATE TABLE [UserAlbum] ( [ID] [int] IDENTITY (1, 1)    NOT NULL , [UserID] [int] default(0) , [AlbumName] [nvarchar] (100) NULL , [Audience] [int] default(0) , [Date_added] [smalldatetime] NULL , CONSTRAINT PK_CmmNet_userAlbum_ID PRIMARY KEY CLUSTERED ( ID )) ON [PRIMARY]GO
it has a field called "audience" as the name defines i want to choose who will see my albumsit is integer and as follows:0 value=everyone1=friends only2=private
as i started to write a query for it i came into this problem:  for exampleif i write SELECT * FROM UserAlbum where   audience=1 then only friends can see the infowhat happens to everyone with value of 0?when i set it to 0, friends should also be able to see the info because it is set for everybody
i noticed i should use "in cluase" like thisSELECT * FROM UserAlbum where   audience in ('0','1') > so in this way both everyone and also friends can see the info
or maybe i should add 3 different fields for private,public,friends
it seems to be simple but at the same time harddoes anyone have a  suggestion?

View 1 Replies View Related

I Am Really Confusing Please Help Me About A Single Query

Sep 1, 2005

Hi Guys,This is my Problem.A table contain following desing for handling different level of categories, bu it is dynamic int_categoryid,int_parent_categoryid,int_categorylevel,str_categoryname,bit_activethatall.I want to list data from table as following ordercategorry_parent11               category_child12                        category_child13                        category_child23               category_child22categorry_parent21.............................................................................................like this..ie we can insert parent category and sub category to n level dynamically without adding a new tableplease mail me for another clarification....please help meregardsAbdul

View 2 Replies View Related

Problem 1/2 DataBind, 1/2 T-SQL -- So Confusing

Jun 14, 2006

Hey everyone,I've got a problem and I can't tell if it's in the stored procedure I'm calling, or it's with the Binding it to the datalist.The error is Syntax error converting datetime from character string.The code it crashes on is:Line 100: //Bind data
Line 101: dg_details.DataSource = reader;
Line 102: dg_details.DataBind();
Line 103: dg_details.Visible = true;
and my store procedure I'm calling is: ALTER PROCEDURE coglej.GetEventsForDate
@eventdate datetime,
@eventowner varchar (50)

AS

IF DATEDIFF(ww,GetDate(),@eventdate ) > 2
BEGIN
PRINT 'Getting EB event price.'
SELECT dbo.events.event_date, dbo.locations.city, dbo.locations.state, dbo.locations.name, dbo.locations.address1, dbo.locations.address2, dbo.locations.zip,
dbo.skus.sku_id, dbo.skus.event_type, dbo.skus.price, dbo.skus.slots_available
FROM dbo.events INNER JOIN
dbo.locations ON dbo.events.location_id = dbo.locations.location_id INNER JOIN
dbo.skus ON dbo.events.sku_id = dbo.skus.sku_id
WHERE (dbo.events.event_date = CONVERT(datetime, '@eventdate')) AND (dbo.skus.owner = @eventowner) AND (dbo.skus.price_type = 'Early')

END
ELSE
BEGIN
PRINT 'Getting regular event price.'
SELECT dbo.events.event_date, dbo.locations.city, dbo.locations.state, dbo.locations.name, dbo.locations.address1, dbo.locations.address2, dbo.locations.zip,
dbo.skus.sku_id, dbo.skus.event_type, dbo.skus.price, dbo.skus.slots_available
FROM dbo.events INNER JOIN
dbo.locations ON dbo.events.location_id = dbo.locations.location_id INNER JOIN
dbo.skus ON dbo.events.sku_id = dbo.skus.sku_id
WHERE (dbo.events.event_date = CONVERT(datetime, '@eventdate')) AND (dbo.skus.owner = '@eventowner') AND (dbo.skus.price_type = 'Regular')

ENDWhat's cause the crash are the quotes around @eventdate.  However, without them, it doesn't return all the rows (if any) and if I have them in, I get this error.  The odd thing is that when I copy and paste one of the SELECT statements into the VWD sql window and replace the variables with the same values I'm using at runtime, everything runs fine.Anyone have any ideas?Thanks in advance,--Joel 

View 7 Replies View Related

Confusing Starting Up Database ....

Jul 7, 2003

Hi,
I have a SQL2k STD with SP3 installed.
Currently, only one database db_XYZ is there. The server has been started up since 07/03/2003 16:00 pm. But in the sql server current log: "Starting up database 'db_XYZ'." info is spreading from that time (16:00 pm) to this morning 10:00am at an interval from every 1 minute to 4 minutes.

Why need to 'Starting up' this database so much times?
This reminds me that this 'Starting up' is kind of 'abused' in many other servers. Any idea?

thanks
David

View 9 Replies View Related

ActiveX, DTS, And Other Confusing Instructions

Feb 15, 2005

Hi everybody.

I've been looking on-line for about a day now and can't find what I'm looking for. I don't know much about ActiveX and even less about using it in a DTS package. If you guys could help me out be telling me what to use/give a few minimal examples I can figure the rest out. I just can't find enough info on the web to do what I want.

I'll describe what I've got, what I'm trying to do with it, and we'll see what you guys think.

What I've got:
A table that stores To, Subject, MsgText, MsgHTML, and FileAttachment locations.

What I'd Like to do:
Write out the info in the table into a text file and then copy it to the Pickup folder to be sent. Now, I know DTS has an e-mail task, but the Dynaprops/e-mail task are being flaky. The information in the E-Mail doesn't always seem to update like I'd like it.

How I was planning on doing it:
Write an ActiveX script to Create the E-mail, store it in the DB, and then Write it out to the txt file to be sent.

I think this'd be a good way to do it, but then again I could be wrong. Maybe use something else? Please help. I could use it.

Your help is more than appreciated.

Thanks!
-Me

View 2 Replies View Related

Really Confusing Server Problem!

Aug 25, 2004

Ok, i have been trying to restore the company helpdesk server since our move at the start of the year and after it was sitting doing nothing for a good six months or so.

I finally got the server going (after extensive messing about on our test box), but i'll set out the scenario for you:

Test Server: XW4000 (win2k Advanced Server + SQL Server 2k)
Main Helpdesk Server :BK_MAN5_INV (NT4 SP6 + SQL Server 2k)
Client Machines: BK_CI_03006 and BK_CI_03010

Now for the problem. Both the test server and the main helpdesk server have been configured in the exact same way, and BK_CI_03006 has no problems connecting to either server. However, BK_CI_03010 can only connect to the test server and not the main helpdesk server.

We are planning on removing the test server as soon as this is sorted, but i have no idea why there is this problem with the machine.

If anyone can provide any input on this at all, i would be really grateful.

Cheers

Alan

View 10 Replies View Related

Excel Field Is Confusing Me!

Apr 28, 2008

I have a spreadheet that has a column that is formatted by default to General and contains alpha numeric data.

1008
1008G
1008H

etc.

When I open the spreadsheet any field in the coumn that is purely numeric is right justified by default and the alpha numeric ones are left justified.

When I import the data the fields containing numeric only data come thru as NULL? But the alpha numeric comes thru OK.

The destination field in my table in varchar(20)

I have tried various formats including Text in the spreadsheet but I still get the numeric fields coming thru as NULL.

Any points please?

Thanks

View 12 Replies View Related

Confusing Query Problem

Jun 11, 2008

I am looking to query one table where the matching information in the related table needs to be a subset of the data - but not always a complete set (and there may be added information in the related table). For example, if I have a table of Albums and I want to match songs to albums as follows:

Albums

Name CHAR_TYPE CHAR
Rock guitarists Genre Rock
Rock guitarists Instrument Guitar
Great Guitar Instrument Guitar
Rock and Blues Genre Rock
Rock and Blues Genre Blues

Songs

Name CHAR_TYPE CHAR
Purple Haze Genre Rock
Purple Haze Instrument Guitar
Purple Haze Artist Hendrix
Red House Genre Blues
Red House Instrument Guitar
Red House Artist Hendrix
Stairway to heaven Genre Rock
Stairway to heaven Instrument Guitar

For this query, the results should be

Album Song
Rock guitarists Purple Haze & Staiway to Heaven
Great Guitar All 3
Rock and Blues All 3

Everything I've tried either incudes extra songs (Rock Guitar includes Red House) OR Eliminates entire albums (everything else works, but rock and Blues produces no results

Thanks in advance for any sugestions.

View 1 Replies View Related

Confusing SQL Date Coding

Jun 22, 2007

I am new to MS SQL coding and I am having a problem with date conversions. In PL/SQL, I could convert numeric months into character months in their own columns by using the DECODE function. An example would be:

DECODE(to_char(M.My_Table, 'MM'),
'04', 'Apr', '05', 'May', '06', 'Jun', '07',
'Jul', '08', 'Aug', '09', 'Sep', '10', 'Oct',
'11', 'Nov', '12', 'Dec', '01', 'Jan', '02',
'Feb', '03', 'Mar'),
DECODE(to_char(M.My_Table, 'MM'),
'04', 'Q1', '05', 'Q1', '06', 'Q1',
'07', 'Q2', '08', 'Q2', '09', 'Q2',
'10', 'Q3', '11', 'Q3', '12', 'Q3',
'01', 'Q4', '02', 'Q4', '03', 'Q4'),

How does one convert something like this in MS SQL?

View 15 Replies View Related

Help With A Confusing And Advanced Query - If Exsists?

Nov 14, 2003

Ok,

I need to select a list of products based on a complex criteria. First off, here is a list of the tables I am using and their function.


Dbo.Products – This table holds product names and information.

Dbo.Products_Attributes – This table holds a list of attributes for each product. It has a many to 1 relationship with Products. This table holds only 2 fields – ProductID and AttributeID

Dbo.Customers – This table holds basic customer information and some of the needed criteria for the product search.

Dbo.Customers_Attributes – This table contains a list of attributes that the customer needs in his/her products. This table has a many to 1 relationship with Customers and only has 2 fields, CustomerNum and AttributeID

Dbo.Attributes – This table contains all of the different attributes possible for our products to have. Each can be used by a customer when choosing criteria.

Background: Each attribute is a True / False. Either they want that attribute, or they do not care if they get it or not. This is where the hard part comes in. If a particular attribute is listed as needed in dbo.Customers_Attributes, then I do not want any records pulled from Products that DOES NOT have this attribute. On the other hand, if the attribute is NO listed in the customers_attributes list, it is assumed that the customer wants it. In other words, if there were NO attributes in the customers_attributes list, ALL products would be returned. Attributes listed in the customers_attributes table are “required� (no product will be returned that does not have what is in the list).

I hope I was clear enough… I had to change the table names a functions slightly because of some stupid policy about giving out too much proprietary information here.

If any of you know how to do the above with a subquery of some kind, please let me know.

Dave Larson

View 1 Replies View Related

Add A Login To A Database Role (was Very Confusing)

Apr 4, 2006

This stuff makes no sense what so ever,

In the Books on Line of MSSQL2000
In "Adding a Member to a SQL Server Database Role"

There is this
"Note : When you add a Windows NT 4.0 or Windows 2000 login without a user account in the database to a SQL Server database role, SQL Server creates a user account in the database automatically, even if that Windows NT 4.0 or Windows 2000 login cannot otherwise access the database."

I mean how can anyone add a login to a database role without making the login a user of the database.:shocked:
Also if it worked, a new fancy feature to add new logins??:eek:
Plz help:S

View 9 Replies View Related

Access Synchronizer Confusing And Sketchy

Jan 14, 2007

After downloading and installing this tool, I'm confused.  The documentation refers to a wizard, which I can't find in the Start menu. 

Development team:  Where is this wizard?  This is a great idea that I'm certain many people can benefit from--- please make some better documentation, and give us a product that does what the documentation says.

Michael Reinhart

View 3 Replies View Related

Confusing About Connection String Meaning

May 29, 2008

I have some basic skill in SQL Server Management Studio Express already .

But , I still can't understand the exact meaning of ConnectionString.

connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Database1.mdf;Integrated Security=True;User Instance=True"


code above is copied from a machine-generated app.config.

Questions are:
1.what do [[ | ]] and [[ ]]mean in AttachDbFilename=|DataDirectory|Database1.mdf ??

2.what does User Instance mean? And if this it false, what will happen in my computer.

3.Some string I saw before contains InitialCatalog= Northwood. What are the differences between initialcatelog and attachdbfilename ?

Very thanks

View 4 Replies View Related

Virtualization Licensing: Confusing And Inconsistent

May 30, 2007

Hi, I'm researching the possibility of housing permanent virtual SQL Server instances. Part of the research includes licensing and costs:



I have to say I am confused by two sources of material related to SQL Server virtualization licensing on Microsoft's website...



Source 1: http://www.microsoft.com/sql/howtobuy/faq.mspx , quote below:



Q. How do I license SQL Server 2005 for my virtual environments?

A. For Standard, Workgroup, and Enterprise, if you decide to license on a per processor basis, you must buy a SQL Server license for each virtual processor. For Enterprise Edition, you can also choose to license all physical processors in a box. This gives you rights to run SQL Server on unlimited number of virtual processors running on the same machine. For Server/CAL mode, for Standard and Workgroup, you must obtain SQL Server licenses for each Virtual Operating System Environment on which you run instances of SQL Server. However, for Enterprise, if you have a Server license for the physical Server, you may run unlimited instances of SQL Server in any Virtual Operating System Environment that you run on that same machine.

If you are using hardware partitioning on a multi-processor server, you get unlimited virtualization for SQL Server Enterprise Edition as long as all processors in that hardware partition are licensed. For example, if you have a hard partition of 10 physical processors on a 32-processor superdome server, 10 processor licenses of SQL Server 2005 give you rights to run free unlimited virtual machines with SQL Server on those 10 physical processors.



I came up with the following table-format explanation to make sense of it all:








Licensing Mode

Applies to

Number of licenses needed

To get this many standalone instances


Per processor per virtual

Standard, Workgroup, Enterprise

#virtual OSs *
#virtual CPUs

Standard, Workgroup:
#virtual OSs * up to 16 instances
Enterprise:
#virtual OSs * up to 50 instances


Per processor per physical

Enterprise

#physical CPUs

¥ virtual OSs * up to 50 instances


Per seat (aka Server + CAL) per virtual


Standard, Workgroup, Enterprise

#virtual OSs + S(users)

Standard, Workgroup:
#virtual OSs * up to 16 instances, among S(users)
Enterprise:
#virtual OSs * up to 50 instances, among S(users)


Per seat (aka Server + CAL) per physical

Enterprise

1 physical OS + S(users)

¥ virtual OSs * up to 50 instances, among S(users)

Where:
€œCPU€? is the number of CPUs as physically-recognized by the virtual OS or physical OS. CPUs enumerated by hyperthreading or dual-core processing and its corresponding host CPU are considered together one CPU. Refer to the Intel CPUCount utility for more information.
€œ¥ virtual OSs€? represents the theoretical maximum number of virtual machines supported on hardware of physical host.
€œS(users)€? represents the sum of unique users or devices that may or may not be concurrently connected at any time



Source 2: http://www.microsoft.com/licensing/userights , select "SQL Server", "-->", quotes below:



"Per Processor" page:

To run instances of the server software in virtual operating system environments on a server, you need a software license for each virtual processor that each of those virtual operating system environments uses. If a virtual operating system environment uses a fraction of a virtual processor, the fraction counts as a full virtual processor.



"Per Server/CAL" page:

For each server software license you assign, you may run, at any one time, one instance of the server software in one physical or virtual operating system environment on the licensed server.



Which I feel equates to this:






Licensing Mode

Applies to

Number of licenses needed

To get this many standalone instances


Per processor per virtual

Standard, Workgroup, Enterprise

#virtual OSs * #virtual instances * #virtual CPUs

Standard, Workgroup, Enterprise:
#virtual OSs * #virtual instances



Per seat (aka Server + CAL) per virtual


Standard, Workgroup, Enterprise

#virtual OSs + S(users)

Standard, Workgroup:
#virtual OSs * #virtual instances, among S(users)
Enterprise:
#virtual OSs * #virtual instances, among S(users)



Can a Microsoft representative clear this up for me, please?



I want to present the information accurately and objectively short-term, as well as legally in the long-term.

Thanks in advance for any information.

View 9 Replies View Related

Confusing Cross-Database Permissions Issue

Jul 25, 2007

We're trying to follow the principle of least privilege here in setting up a user account for our website to use to access SQL Server 2005, but we're having a nightmarish time getting it to work.

The issue seems to be trying to get a limited access user account the ability to cross databases.

Here's the situation:

We have a User [WebUser] that we want to grant access to the database. This account has a login [WebUser] that has username=WebUser and password=ALongPassword.

This user only calls stored procedures in the database [WebData].

However, some of the stored procedures in [WebData] call stored procedures in the database [dbutil].

One of the stored procedures in [dbutil] inserts records into a table in a third database [dbutil_temp].[DebugLog].

This all works out great from my development account using Windows Authentication.

But as you might guess, if I do something like "EXECUTE AS [WebUser]" and run the same procedure on [WebData] things fall apart quickly. I've looked online regarding cross-database ownership chaining, but quite frankly, the whole users/logins/roles/schemas security model is confusing, and I'm getting nowhere fast on my own.

We really only want [WebUser] to have CONNECT and EXECUTE permissions on the primary [WebData] database, but it seems like we've got to do a lot more than that to get this to work.

I'd appreciate any help...

View 5 Replies View Related

Confusing Timeout; Bug In Deleting Cubes And Dimensions?

Sep 10, 2006

Hi,

I got this error when I deploy a mining model.

--
Error 1 OLE DB error: OLE DB or ODBC error: The query has been canceled because the estimated cost of this query (628) exceeds the configured threshold of 300. Contact the system administrator.; 42000. 0 0

Error 2 Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Revenue Labeled Prod ~MC-LPROD', Name of 'Revenue Labeled Prod ~MC-LPROD' was being processed. 0 0
--

I don't understand why this happens. Previously I've created one cube and 4 dimensions. I got
the same error before. I think the cube was the culprit so I removed the cube and dimensions.
After removing them, I build the project. Successful. But fail again when processing the
mining model. The mining model was fairly simple, only 3 columns (one key time, one key,
one input as well as predicted column, using Microsoft Time Series algorithm).

Why the estimated cost is even higher when I created another project using only one table (Revenue, the same fact table)?

Error 1 OLE DB error: OLE DB or ODBC error: The query has been canceled because the estimated cost of this query (1493) exceeds the configured threshold of 300. Contact the system administrator.; 42000. 0 0

I worked in local machine, there should be no network-related issue when querying. The
machine is 2-processor Xeon 2.4 GHz with 3 GB memory.

How to solve this problem? I have checked the Properties of Analysis Service. I have set higher value for timeout in ODBC Administrator.

Thank you,

Bernaridho

View 5 Replies View Related

Confusing Layout In SSIS With Regard To Execute SQL Task.

Feb 22, 2007

I hope someone can help.

I'm trying to read rows from a SQL Server Table and for each row use a few columns as parameters into a query to be run against oracle which will delete oracle rows.

I add OLDEB connections for Oracle and SQL and then I try to add a "Execute SQL Task". I've also tried a "OLE Command" but I can't get the mapping of the columns to the parameters to work.

There is lots of articles on the web that talk in general around parameterized queries but no clear examples.

I also find the difference between the Control Flow and Data Flow tabs confusing as its not intuitive where to place things. It also appears to force me to re-define things that it should already know (this is no doubt because I'm interpreting what I've done / acheived wrongly).

I have my source and destination on the "Data Flow" tab along with a "Execute SQL Task" object in the middle.

I'm setting its "connection manager" the Oracle (i.e. the destination where I want the deletes to be executed). I don't follow why this also has a "connection property, surely this it set when I drag the output of the SQL Server OLEDB Source to the input of the "Execute SQL Task".

Perhaps I'm expected too much from the wizards / dialogs and I have to create "variables" and "parameters" myself?

Any help or suggestions would be very much appreciated.

Thanks in advance

Craig

Scotland

View 3 Replies View Related

Error Source : Microsoft Data Transformation Services (DTS) Package Error Description : Error Accessing Windows Event Log

Dec 13, 2007



Hi,

I am running dts in Sql Server 2005 management studio from Management, Legacy and data Transformation Services.

Once the dts has run, I get this error message "Error Source : Microsoft Data Transformation Services (DTS) Package Error Description : Error accessing Windows Event Log."

Please help me

thanks in advance

Srinivas



View 1 Replies View Related

Error = Arithmetic Overflow Error Converting Expression To Data Type Smalldatetim

Mar 22, 2007

  $exception {"Arithmetic overflow error converting expression to data type smalldatetime.
The statement has been terminated."} System.Exception {System.Data.SqlClient.SqlException}
occurs
here is my code
protected void EmailSubmitBtn_Click(object sender, EventArgs e)
{
SqlDataSource NewsletterSqlDataSource = new SqlDataSource();
NewsletterSqlDataSource.ConnectionString = ConfigurationManager.ConnectionStrings["NewsletterConnectionString"].ToString();
 
//Text version
NewsletterSqlDataSource.InsertCommandType = SqlDataSourceCommandType.Text;
NewsletterSqlDataSource.InsertCommand = "INSERT INTO NewsLetter (EmailAddress, IPAddress, DateTimeStamp) VALUES (@EmailAddress, @IPAddress, @DateTimeStamp)";
 
//storeprocedure version
//NewsletterSqlDataSource.InsertCommandType = SqlDataSourceCommandType.StoredProcedure;
//NewsletterSqlDataSource.InsertCommand = "EmailInsert";
NewsletterSqlDataSource.InsertParameters.Add("EmailAddress", EmailTb.Text);
NewsletterSqlDataSource.InsertParameters.Add("IPAddress", Request.UserHostAddress.ToString());
NewsletterSqlDataSource.InsertParameters.Add("DateTimeStamp", DateTime.Now.ToString());
int rowsAffected = 0;
try
{
rowsAffected = NewsletterSqlDataSource.Insert();
}
catch (Exception ex)
{
Server.Transfer("NewsletterProblem.aspx");
}
finally
{
NewsletterSqlDataSource = null;
}
if (rowsAffected != 1)
{
Server.Transfer("NewsletterProblem.aspx");
}
else
{
Server.Transfer("NewsletterSuccess.aspx");
}
 

View 3 Replies View Related

Error: 26 Error Locating The Server/instance Specified (.NET SQLClient Data Provider)

Jun 8, 2007

All,



One of our developers decided to load 2K5 client tools on to their laptop. They cannot connect getting the following error:



....Error: 26 Error Locating the Server/instance specified (.NET SQLClient Data Provider)....



1.) Allowing remote connections IS enabled.

2.) SQL Browser Service is ON

3.) Windows Firewall is NOT running

4.) All protocols (except VIA) are enabled



Others at this office, including myself, can connect fine in Management Studio. Only this one developer cannot.



Any thoughts and/or help would be much appreciated. I think that the problem has something to do with the first sentance above but I am not positive.



Thanks in advance,

DBA Ben

View 4 Replies View Related

Getting Server Error Syntax Error Converting The Nvarchar Value 'Sonoma' To A Column Of Data Type Int.

Apr 20, 2007

Hi, all
I'm getting this error at runtime when my page tries to populate a datagrid. Here's the relevant code.
First, the user selects his choice from a dropdownlist, populated with a sqldatasource control on the aspx side:<asp:SqlDataSource ID="sqlDataSourceCompany" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [PayrollCompanyID], [DisplayName] FROM [rsrc_PayrollCompany] ORDER BY [DisplayName]">
</asp:SqlDataSource>
 And the dropdown list's code:<asp:DropDownList ID="ddlPayrollCompany" runat="server" AutoPostBack="True" DataSourceID="sqlDataSourcePayrollCompany"
DataTextField="DisplayName" DataValueField="PayrollCompanyID">
</asp:DropDownList>
Then, I use the selectedindexchanged event to bind the data to the datagrid. Here's that code:
 1 Sub BindData()
2
3 Dim ds As New DataSet
4 Dim sda As SqlClient.SqlDataAdapter
5 Dim strSQL As String
6 Dim strCon As String
7
8 strSQL = "SELECT [SocialSecurityNumber], [Prefix], [FirstName], [LastName], [HireDate], [PayrollCostPercent], " & _
9 "[Phone], [BadgeNumber], [IsSupervisor], [SupervisorID], [IsUser], [IsScout] FROM [rsrc_Personnel] " & _
10 "WHERE ([PayrollCompanyID] = @PayrollCompanyID)"
11
12 strCon = "Data Source=DATASOURCE;Initial Catalog=DATABASE;User ID=USERID;Password=PASSWORD"
13
14 sda = New SqlClient.SqlDataAdapter(strSQL, strCon)
15
16 sda.SelectCommand.Parameters.Add(New SqlClient.SqlParameter("@PayrollCompanyID", Me.ddlPayrollCompany.SelectedItem.ToString()))
17
18 sda.Fill(ds, "rsrc_Personnel")
19
20 dgPersonnel.DataSource = ds.Tables("rsrc_Personnel")
21 dgPersonnel.DataBind()
22
23 End Sub
24

 
I'm assuming my problem lies in line 16 of the above code. I've tried SelectedItemIndex, SelectedItemValue too and get errors for those, as well.
What am I missing?
Thanks for anyone's help!
Cappela07

View 2 Replies View Related

Stored Proc Error: Error Converting Character String To Smalldatetime Data Type

Feb 12, 2005

I am trying to create a page that adds users to a MS SQL database. In doing so, I have run into a couple errors that I can't seem to get past. I am hoping that I could get some assistance with them.

Error from SQL Debug:
---
Server: Msg 295, Level 16, State 3, Procedure AdminAddUser, Line 65
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting character string to smalldatetime data type.
---

Error from page execution:
---
Exception Details: System.Data.OleDb.OleDbException: Error converting data type varchar to numeric.

Source Error:

Line 77: cmd.Parameters.Add( "@zip", OleDbType.VarChar, 100 ).Value = Request.Form("userZip")
Line 78:
Line 79: cmd.ExecuteNonQuery()
---


Below is what I currently have for my stored procedure and the pertinent code from the page itself.

Stored Procedure:
---
CREATE PROCEDURE dbo.AdminAddUser( @username varchar(100),
@password varchar(100),
@email varchar(100),
@acct_type varchar(100),
@realname varchar(100),
@billname varchar(100),
@addr1 varchar(100),
@addr2 varchar(100),
@city varchar(100),
@state varchar(100),
@country varchar(100),
@zip varchar(100),
@memo varchar(100) )
AS
BEGIN TRAN

--
-- Returns 1 if successful
-- 2 if username already exists
-- 0 if there was an error adding the user
--

SET NOCOUNT ON
DECLARE @error int, @rowcount int

--
-- Make sure that there isn't already a user with this username
--

SELECT userID
FROM users
WHERE username=@username

SELECT @error = @@ERROR, @rowcount = @@ROWCOUNT

IF @error <> 0 OR @rowcount > 0 BEGIN
ROLLBACK TRAN
RETURN 2
END

--
-- Set expiration date
--

DECLARE @expDate AS smalldatetime

IF @acct_type = "new_1yr" BEGIN
SET @expDate = DATEADD( yyyy, 1, GETDATE() )
END

IF @acct_type = "new_life" BEGIN
SET @expDate = DATEADD( yyyy, 40, GETDATE() )
END

DECLARE @paidCopies AS decimal
SET @paidCopies = 5


--
-- Add this user to the database
--

IF @acct_type <> "new" BEGIN

INSERT INTO users (userName, userPassword, userEmail, userJoinDate,
userPaidCopies, userExpirationDate, userLastPaidDate,
userBname, userRealName, userAddr1, userAddr2, userCity,
userState, userCountry, userZip, userMemo )
VALUES (@username, @password, @email, GETDATE(), @realname, @billname,
@paidCopies, @expDate, GETDATE(), @addr1, @addr2, @city, @state, @country, @zip, @memo )

SELECT @error = @@ERROR, @rowcount = @@ROWCOUNT

IF @error <> 0 OR @rowcount < 1 BEGIN
ROLLBACK TRAN
RETURN 0
END

END

IF @acct_type = "new" BEGIN

INSERT INTO users (userName, userPassword, userEmail, userJoinDate,
userBname, userRealName, userAddr1, userAddr2, userCity,
userState, userCountry, userZip, userMemo )
VALUES (@username, @password, @email, GETDATE(), @realname, @billname,
@addr1, @addr2, @city, @state, @country, @zip, @memo )

SELECT @error = @@ERROR, @rowcount = @@ROWCOUNT

IF @error <> 0 OR @rowcount < 1 BEGIN
ROLLBACK TRAN
RETURN 0
END

END



COMMIT TRAN
RETURN 1
GO
---


Page Code:
---
Sub AddUser(Sender as Object, e as EventArgs)

Dim db_conn_str As String
Dim db_conn As OleDbConnection
Dim resultAs Int32
Dim cmdAs OleDbCommand


db_conn_str = "Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=xxxxx; User ID=xxxxx; PWD=xxxxx;"
db_conn = New OleDbConnection( db_conn_str )
db_conn.Open()

cmd = new OleDbCommand( "AdminAddUser", db_conn )
cmd.CommandType = CommandType.StoredProcedure

cmd.Parameters.Add( "result", OleDbType.Integer ).Direction = ParameterDirection.ReturnValue

cmd.Parameters.Add( "@username", OleDbType.VarChar, 100 ).Value = Request.Form("userName")
cmd.Parameters.Add( "@password", OleDbType.VarChar, 100 ).Value = Request.Form("userPass")
cmd.Parameters.Add( "@email", OleDbType.VarChar, 100 ).Value = Request.Form("userEmail")
cmd.Parameters.Add( "@acct_type", OleDbType.VarChar, 100 ).Value = Request.Form("userEmail")
cmd.Parameters.Add( "@realname", OleDbType.VarChar, 100 ).Value = Request.Form("userRealName")
cmd.Parameters.Add( "@billname", OleDbType.VarChar, 100 ).Value = Request.Form("userBname")
cmd.Parameters.Add( "@addr1", OleDbType.VarChar, 100 ).Value = Request.Form("userAddr1")
cmd.Parameters.Add( "@addr2", OleDbType.VarChar, 100 ).Value = Request.Form("userAddr2")
cmd.Parameters.Add( "@city", OleDbType.VarChar, 100 ).Value = Request.Form("userCity")
cmd.Parameters.Add( "@state", OleDbType.VarChar, 100 ).Value = Request.Form("userState")
cmd.Parameters.Add( "@country", OleDbType.VarChar, 100 ).Value = Request.Form("userCountry")
cmd.Parameters.Add( "@memo", OleDbType.VarChar, 100 ).Value = Request.Form("userMemo")
cmd.Parameters.Add( "@zip", OleDbType.VarChar, 100 ).Value = Request.Form("userZip")

cmd.ExecuteNonQuery()

(...)

---

View 1 Replies View Related

Mysterious An Error Occurred While Receiving Data: '64(error Not Found)'

Nov 20, 2007

Hi.
I am stuck with error: An error occurred while receiving data: '64(error not found)'.
My Service Broker configuration:
Server A initiator,
Server B target.
Server A sends message to Server B, Server B sends back reply.
On this stage I receive problem. Server B message does not come to server A.
It stays on sys.transmission_queue on server B.
This problem occurs only during initial setup. During initial setup, on Server B messages, queues, services, contracts, routes, bindings are created. On Server A: routes and bindings. As a last step, a message is sent to Server B.
So, reply on this message never comes. Initial setup is run using procedure with execute as €˜owner€™, owner=€™dbo€™.
But, whenever I send messages after that, everything works fine.

Any suggestions?

Please :-)

View 7 Replies View Related

An Error Occurred While Receiving Data: '10054(error Not Found)'.???

Oct 31, 2007



Hi,

I have set up SB between 2 databases, and I keep geting a variety of error messages in the queue on both sides. The first is:
An error occurred while receiving data: '10054(error not found)'.

And on the other side its
Service Broker received an error message on this conversation. Service Broker will not transmit the message; it will be held until the application ends the conversation.

The only difference between this and the tutorials is that the TCP port have been moved to 4321 instead of 4022, and this has been done both sides, because something else was blocking the 4022 port. This one is definately free on both sides. I have recreated the certificates, the users, the end points, the queues and the services multiple times, and checked them all in the sys.routes etc and they all seem fine.

I do also get a message in the queue that I can receive sometimes that tells me I don't have rights to the service on the other machine. I can send a message to itself and it doesn't complain.

Both machines are on the same domain, and I have also tried to grant rights to public to no avail.

Help!

TIA

Ian.

View 2 Replies View Related

An Error Occurred While Receiving Data: '64(error Not Found)'

Aug 23, 2007

We are using Service Broker to synchronise two databases using async triggers (using a middle server to preform data mapping processing). We are re-using dialogs as we want to ensure order when sending messages which contain the data to be synced. A dialog is created between each intiator and target service (there are 3 of each) which is kept open indefinately (we are only ending conversation upon receiving an end conversation message or error message).

We seem to get it working for a period then after about 1 hour it seems to stop sending and we see the following error in SQL Profiler:

An error occurred while receiving data: '64(error not found)'

Any ideas what could be causing this? We do not see any errors or end conversations. It seems to happen at irregular points.

View 2 Replies View Related

Pipeline Error-excel Source-data Reader Does Not Read In Meta Data

Apr 16, 2008

Hi all, i got this error:


[DTS.Pipeline] Error: "component "Excel Source" (1)" failed validation and returned validation status "VS_NEEDSNEWMETADATA".

and also this:

[Excel Source [1]] Warning: The external metadata column collection is out of synchronization with the data source columns. The column "Fiscal Week" needs to be updated in the external metadata column collection. The column "Fiscal Year" needs to be updated in the external metadata column collection. The column "1st level" needs to be added to the external metadata column collection. The column "2nd level" needs to be added to the external metadata column collection. The column "3rd level" needs to be added to the external metadata column collection. The "external metadata column "1st Level" (16745)" needs to be removed from the external metadata column collection. The "external metadata column "3rd Level" (16609)" needs to be removed from the external metadata column collection. The "external metadata column "2nd Level" (16272)" needs to be removed from the external metadata column collection.


I tried going data flow->excel connection->advanced editor for excel source-> input and output properties and tried to refresh the columns affected.
It seems that somehow the 3 columns are not read in from the source file?
ans alslo fiscal year, fiscal week is not set up up properly in my data destination?
anyone faced such errors before?

Thanks

View 13 Replies View Related







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