Adventure Works DW Script

Aug 27, 2005

The Data Mining Tutorial accompanying the June CTP includes mention of a table DimProspect. Despite the csv file existing in the Program FilesMicrosoft SQL Server90ToolsSamplesAdventureWorks Data Warehouse path containing the data for the table, the instawdwdb script doesn't include any reference. Can someone supply me with the necessary script for this table?

View 6 Replies


ADVERTISEMENT

Trouble With Adventure Works

Jan 3, 2007

Hey All,

I'm new to the whole DB thing so I wanted to start off easy and download SQL Express. That part worked fine so I tried to install the Adventure Works DB to get some practice using the SQL commands. The problem is every time I click on a table in Adventure Works and choose Open Table I get a Microsoft SQL Server Management Studio box that pops up. The error says: Class Not Registered (Exception from HRESULT: 0x80040154 REGDB_E_CLASSNOTREG))

(Microsoft.SqlServer.SqlTools.VSIntegration)

Help!! Any ideas out there how to get the Adventure Works DB working? Thx much.

View 1 Replies View Related

Can't Open Adventure Works Example

May 15, 2006

after running msi, can't open this solution

C:Program FilesMicrosoft SQL Server90ToolsSamplesAdventureWorks
Analysis Services ProjectStandard, select the file Adventure Works
DW.sln


---------------------------error msg
Microsoft Visual Studio

The application for project 'C:Program FilesMicrosoft SQL Server90ToolsSamplesAdventureWorks Analysis Services ProjectstandardAdventure Works DW Standard Edition.dwproj' is not installed.

Make sure the application for the project type (.dwproj) is installed.

---------------------------error msg

View 6 Replies View Related

Adventure Works DW.sln Error

May 6, 2007

When I am trying to process the dimension "Clustered Customers"



I get an error of the following words, ...



OLE DB error: OLE DB or ODBC error: The following system error occurred: The token supplied to the function is invalid .; File system error: The following error occurred while reading from the file 'Compressed stream'..



SELECT 1 AS [dbo_FactInternetSalesReason0_0],[SalesReasonKey] AS [dbo_FactInternetSalesReasonSalesReasonKey0_1]
FROM [dbo].[FactInternetSalesReason]
)
AS [dbo_FactInternetSalesReason]
Processing Mining Structure 'Customer Mining'.
Start time 5/6/2007 1:45:40 AM
Processing Cube 'Customer Clusters ~MC'.
Start time 5/6/2007 1:45:40 AM
Processing Measure Group '~CaseDetail ~MG'.
Start time 5/6/2007 1:45:41 AM
Processing Partition '~CaseDetail ~MG'.
Start time 5/6/2007 1:45:41 AM
Processing Measure Group 'Internet ~1 ~MG'.
Start time 5/6/2007 1:45:41 AM
Processing Partition 'Internet ~1 ~MG'.
Start time 5/6/2007 1:45:41 AM
SQL queries 1
SELECT DATAID ( [Adventure Works].[Internet Sales].[$Customer.Customer] )
AS [Sales0_0], AGGREGATE ( [Adventure Works].[Internet Sales].[Internet Sales Amount] )
AS [Sales0_1], DATAID ( [Adventure Works].[Internet Sales].[$Product.Subcategory] )
AS [Sales0_2]
FROM [Adventure Works].[Internet Sales]
GROUP BY [Sales0_0],[Sales0_0],[Sales0_2]
ORDER BY DATAID ( [Adventure Works].[Internet Sales].[$Customer.Customer] )

ASC
Error Messages 1
OLE DB error: OLE DB or ODBC error: The following system error occurred: The token supplied to the function is invalid .; File system error: The following error occurred while reading from the file 'Compressed stream'..



Any ideas what could be causing this error occurred while reading from the file 'Compressed stream'.. problem?



Thanks.

AIMDBA

Andre_Mikulec

View 11 Replies View Related

Error When Attaching Adventure Works Database

Oct 14, 2006

Hello Everyone,

I am very new to SQL and just completed an install of SQL 2005 Express. After install, I downloaded the Adventure Works database and attempted to attach through both the Object Browser (right-click 'Databases'--->'Attach') and by running the script that is located on the SQL download page where I got the Adventure Works db.

Here's the error that I get:

"Could not find row in sysindexes for database ID 8, object ID 1, Index ID 1. Run DBCC CHECKTABLE on sysindexes."

I have attempted to go through the help files, but unfortunately the above message is too cryptic for me and I have no idea what it's telling me.

Can someone help?

Thanks!!

View 6 Replies View Related

DB Design :: Row Guid In Adventure Works Database?

May 19, 2015

I was studying the Adventure Works database because I read it contains good examples of best practices.

It has an ID column for each table that is auto-incrementing Primary Key. There is also a row guid which seems redundant since the ID PKs are identity columns that increment automatically and should be unique in a given table.

What is the purpose of the row guid being used in conjunction with the ID which should be unique in a given table?

View 2 Replies View Related

Where Are The Solution File For Adventure Works DW Saved?

Jun 12, 2006

Hi, all here,

I am trying to locate the solution file for the Adventure works DW included as part of the installation of SQL Server 2005 to be opened in Business Intelligence Development Studio, But where is the solution file saved? I can see its database from Management studio but I need to know its solution file to locate it in Business intelligence studio. Please could anyone here give me some idea about that. Thanks a lot in advance for any help and guidance for that.

View 3 Replies View Related

DB Design :: Cannot Attach Adventure Works Script 2014

Jul 21, 2015

I have got sql server developer 2014 64 bit, but i cannot attach the adventure works 2014 or 2012, keeps giving me errors. so is their an exe file or another way to install this to the database.

Using windows 8.1 64 bit enterprise, jaws 16, and sql server 2014 developer 64 bit.

[URL] ....

View 10 Replies View Related

Newbie Trying To Connect To Adventure Works Db On Local Desktop

Jan 22, 2007

All,

I'm running Windows Xp Pro With SQL 2005 Dev edition with Adventure Works sample db installed. I am the local administrator on my desktop, the services are up and running and I specified local connections only since this is the DEV edition of SQL05.

When I try either one of these connection strings: Data source=(SQLDEV05); initial catalog=AdventureWorks or Data source=(local); initial catalog=AdventureWorks.

I receive this error message:



TITLE: Microsoft Report Designer
-----------------------------

A connection cannot be made to the database.
Set and test the connection string.

----------------------------
ADDITIONAL INFORMATION:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

================================

Thanks in advance!

>Scott

View 3 Replies View Related

How To Connect SQL Server Mangement Console To Adventure Works

Dec 12, 2005

This may not be correct request but I have SQL Server Management Studio Express.  How do I connect the Adventure Work Database to the console?

View 14 Replies View Related

Adventure Works DB Samples With Express 2005 SQL Server

May 15, 2006

Downloaded the file for the Adventure Works DB Sample. Which folder do I need to install it in to have show up in SQL Server Express 2005??

View 5 Replies View Related

Analysis :: Processing / Deploying Adventure Works Tabular Cube

Sep 14, 2015

I am trying to create a Adventure Works Tabular cube in my developing machine and im having problems deploying the tabular cube (the DW database was firstly attached without problems)

So I'm having problems processing Adventure Works Tabular Cube, the problems are somewhere between SSAS project configuration and running privileges, i think. I'll describe exactly where i am:

- in SSMS 2012, connections, tables and roles and roles are empty, i only have the full name of the database when I try to process i get an error "the table with id of "product category 92583829......", Name of Product Category refereced by the model Cube, does not exist. An error ocurred when loading the model cube, '?c:program filesmicrosoft
sql serverMSAS11.MSSQLSERVEROLAPDataAdventureWorks Tabular model SQL 2012.0.dbModel.21.cub.xml'. (Microsoft AnalysisServices.)"

- in SQL Server configuration Manager, I have
Sql Server (MSSQLSERVER) running with account NT ServiceMSSQLSERVER
Sql Server Analysis Services (MSSQLSERVER) running with account .L.ABCDE , which is my account, i've changed because i've read somewhere that i could have problems with privileges.

(Note: it's strange because SSAS is tabular, i can see a blue rectangle (sort of) in SSMS but in configurator manager seems to be a cube.)

- in SSAS Project i unzip a clean copy of the project and the first error is that BIM file can't be found, it try's to find server TOSHIBA_S50_BTAB, but as i have only tabular SSAS running, i replace for TOSHIBA_S50... And some time ago it worked, now it doesn't even found TOSHIBA_S50_B?!!!!

View 3 Replies View Related

Datamining Veiwer Client And Chang Ing Taht And Savning The Result Of Prediction Query In Adventure Works Dw Without Wizard

Jan 24, 2008


Hi
I have three questions about several topics.
In this code:
public string ConnectionString
{
get
{
return "Provider=MSOLAP.3;Data Source=localhost;Initial Catalog=Adventure Works DW";
}
}

What is data source and initial catalog and what does this code do? And if I want to use other database how can change this code? (This code is for data mining viewer client project)
And in this code:
SqlConnection cn = new SqlConnection("Data Source=localhost;Initial Catalog=AdventureWorks;Integrated Security=True");
SqlCommand cm = new SqlCommand("Select AddressID,AddressLine1 from Person.Address", cn);
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cm;
DataTable dt = new DataTable();
da.Fill(dt);
this.comboBox1.DisplayMember = "AddressLine1";
this.comboBox1.ValueMember = "AddressID";
this.comboBox1.DataSource = dt;

what is comboBox1.DisplayMember and comboBox1.ValueMember ,and what is difference between those ?
and other question:
in adventure works dw project for data mining predicting ,in forecasting model ,if I want to show the result of this query in the combobox in c# how can I show that?
SELECT
PredictTimeSeries(amount)
From
[Forecasting]
And again in this code ,it has a result which has two culomns ,on of them is for amount and other column is for time ,in sql I can save this result in exsiting table or neew table with wizard,but I want to
Do this work in c#,that€™s mean with a adomdconnection I connect to forecasting model and write this query then in a datagridviwe ,Iwant to see the values of prediction in adventure works dw database.
Other question:
In €œdataminingviwerclient€? project I change this code and you can see it,for this code I have a form that give servername and catlogname in that and then with clcking on a button I want to show the chart of model in a child form ,but I can€™t.

public Form1 form1 = new Form1();
public string m_ServerName;
public string m_CatalogName;
public Form3()
{
m_ServerName = "";
m_CatalogName = "";
InitializeComponent();
}


public string ConnectionString
{
get
{
return "Provider=MSOLAP.3;Data Source=localhost;Initial Catalog=Adventure Works DW";
}
}


public void button1_Click(object sender, EventArgs e)
{
connectingtoserver();
AdomdConnection conn = new AdomdConnection();
try
{
this.Cursor = Cursors.WaitCursor;
conn.ConnectionString = this.ConnectionString;
conn.Open();
}
catch (System.Exception ex)
{
MessageBox.Show(ex.Message, "Connection Failed");
}
this.Cursor = Cursors.Default;
conn.Close();
ShowModel(panel1, form1.comboBox1.Text);
}


public void connectingtoserver()
{
LoadCatalog();

}
private void LoadCatalog()
{
AdomdConnection conn = null;
try
{
conn = new AdomdConnection(this.ConnectionString);
this.Cursor = Cursors.WaitCursor;
conn.Open();
DataSet ds = conn.GetSchemaDataSet(AdomdSchemaGuid.Catalogs, null);
foreach (DataRow row in ds.Tables[0].Rows)
form1.comboBox1.Items.Add(row[0].ToString());
}
catch (System.Exception)
{
/**/
}
this.Cursor = Cursors.Default;
if (conn != null)
conn.Close();
}

private void ShowModel(Panel panel, string modelName)
{
AdomdConnection conn = new AdomdConnection();
try
{
MiningModelViewerControl viewer = null;
MiningModel model = null;
MiningService service = null;

// Clear any existing controls from the panel
if (panel.HasChildren)
panel.Controls.Clear();

// Connect to server
conn.ConnectionString = ConnectionString;
conn.Open();

// Determine the viewer type based on the model service and
// instantiate the correct viewer
model = conn.MiningModels[modelName];
service = conn.MiningServices[model.Algorithm];
if (service.ViewerType == "Microsoft_TimeSeries_Viewer")
viewer = new TimeSeriesViewer();
else throw new System.Exception("Custom Viewers not supported");

// Set up and load the viewer
viewer.ConnectionString = ConnectionString;
viewer.MiningModelName = modelName;
viewer.Dock = DockStyle.Fill;
panel.Controls.Add(viewer);
viewer.LoadViewerData(null);
}
catch (System.Exception ex)
{
MessageBox.Show(ex.Message, "Model Load");
}
conn.Close();
when I run this code ,I have one error that say: the €œ object not found parametr name:index
Please see this code and answer my question.
If you just can answer one of my qestions ,please say.
Thanks a lot for your answers.With best wishes for you

View 3 Replies View Related

Data Mining :: Deleting Old Data From Adventure Works 2012 With Powershell

May 3, 2015

I am trying to delete tables from data where the ModifiedDates older than 9 years in AdventureWorks2012 database . I get console notified that foreign keys are dropped but the delete statement is throwing errors. I am sure that somewhere the key constraints are not getting altered, but i'm not able to figure it out as i'm a relative beginner to T-SQL. The error and code:

The DELETE statement conflicted with the REFERENCE constraint "FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID". The conflict
occurred in database "AdventureWorks2012", table "Sales.SalesOrderHeader
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null
$option_drop = new-object Microsoft.SqlServer.Management.Smo.ScriptingOptions;
$option_drop.ScriptDrops = $true;

[Code] ....

View 3 Replies View Related

Adventure Works Database, I Can't Connect To The Database

Jul 16, 2006

Database not found !

My web.config file has this bit of code:

<connectionStrings>

<add name="AppConnectionString1" connectionString="Data Source=&quot;.SQLEXPRESS&quot;;AttachDbFilename=&quot;C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataAdventureWorks_Data.mdf&quot;;Integrated Security=True"

providerName="System.Data.SqlClient" />

</connectionStrings>

But........................... the is no "AdventureWorks_Data.mdf" in that folder ?

And the database is installed in the right place !

help !

View 6 Replies View Related

Installing Sample Adventure Database

Nov 7, 2006

I am having trouble installing the sample Adventure database. I went to the following location:

http://www.microsoft.com/downloads/details.aspx?FamilyId=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en

to download AdventureWorksDB.msi. Once I save that to my local machine I run the install and it completes with no errors. Unfortunately, I can't see any of the data in SQL Server Management Studio Express. I'm new to SQL Server Express so maybe its me, but I get the feeling that it was never added to the database. I'm still looking for SQLServerExpressSamplesOverview.htm to see if I am missing a step but I can't find it anywhere.

The install seems to have extracted database files but if I need to run some scripts by hand to create the database I don't know which order to run them in.

Any help would be greatly appreciated.

View 4 Replies View Related

Adventure Work Database Error

Jan 11, 2007

i followed all the instruction to add the database of the adventure works to the database server. but when i attach the database from the managment sql server this error comes

Couldnt find row in sysindexes for database ID 8, object ID1 ..........etc

and couldnt open new database 'adventureworks'. create database is aborted.

please i need a qucik help. cuz i tried the msdn and i failed.

thanks

View 1 Replies View Related

SQL SERVER ACCESS DENIED!! BUT Everything Works On MSDE And Works SHOWING RECORDS ON SQL SERVER!! PLEASE HELP

Jul 26, 2004

I've got a popular problem so i get a message that server acces denied! ..

But that what is different in my error.... When i use same setting same database and connection string (on MSDE server) there is no problem...

On SQL server i have got windwos authentication but i added all accounts as ASPNET and SA.... and when i try to connect by

RETTO - name of my server

server=RETTO;uid=sa;pwd=password;database=db1;
or by
Integrated Security=SSPIserver=RETTO;uid=RETTOASPNET;database=db1;

I CAN BROWSE RECORDS THERE ARE NO PROBLEMS WITH CONNECTION!!! but when i try to update or iinsert or delete something in database there becomame this error that access denied or server does not exist!!!


PLEASE HELP I'm FIGHTING WITH THAT FOR OVER 5 DAYS!!!

I MADE FOR MY ACCOUNTS (SA, ASPNET) ALL THINGS ALLOWED AS EXECUTING stored procedures.. OR ACCESING datatables with insert delete and update query WHERE IS THE PROBLEM!!!??

View 3 Replies View Related

Telnet Connection Works, Sql Cmd Connection Works, SQL Server Managment Studio 2005 Does Not

Jun 20, 2007

I'm having a strange problem with this but I know (and admit) that the problem is on my PC and nowhere else. My firewall was causing a problem because I was unable to PING the database server, switching this off gets a successful PING immediately. The most useful utility to date is running netstat -an in the command window. This illustrates all the connections that are live and ports that are being listed to. I can establish a connection both by running



telnet sql5.hostinguk.net 1433 and

sqlcmd -S sql5.hostinguk.net -U username -P password



See below:



Active Connections

Proto Local Address Foreign Address State

TCP 0.0.0.0:25 0.0.0.0:0 LISTENING

TCP 0.0.0.0:80 0.0.0.0:0 LISTENING

TCP 0.0.0.0:135 0.0.0.0:0 LISTENING

TCP 0.0.0.0:443 0.0.0.0:0 LISTENING

TCP 0.0.0.0:445 0.0.0.0:0 LISTENING

TCP 0.0.0.0:1026 0.0.0.0:0 LISTENING

TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING

TCP 81.105.102.47:1134 217.194.210.169:1433 ESTABLISHED

TCP 81.105.102.47:1135 217.194.210.169:1433 ESTABLISHED

TCP 127.0.0.1:1031 0.0.0.0:0 LISTENING

TCP 127.0.0.1:5354 0.0.0.0:0 LISTENING

TCP 127.0.0.1:51114 0.0.0.0:0 LISTENING

TCP 127.0.0.1:51201 0.0.0.0:0 LISTENING

TCP 127.0.0.1:51202 0.0.0.0:0 LISTENING

TCP 127.0.0.1:51203 0.0.0.0:0 LISTENING

TCP 127.0.0.1:51204 0.0.0.0:0 LISTENING

TCP 127.0.0.1:51206 0.0.0.0:0 LISTENING

UDP 0.0.0.0:445 *:*

UDP 0.0.0.0:500 *:*

UDP 0.0.0.0:1025 *:*

UDP 0.0.0.0:1030 *:*

UDP 0.0.0.0:3456 *:*

UDP 0.0.0.0:4500 *:*

UDP 81.105.102.47:123 *:*

UDP 81.105.102.47:1900 *:*

UDP 81.105.102.47:5353 *:*

UDP 127.0.0.1:123 *:*

UDP 127.0.0.1:1086 *:*

UDP 127.0.0.1:1900 *:*

Both these utilities show as establishing a connection in netstat so I am able to connect the database server every time, this worked throughout yesterday and has continued this morning.

The problem is when I attempt to use SQL Server Management Studio. When I attempt to connect to tcp:sql5.hostinguk.net, 1433 nothing shows in netstat at all. There is an option to encrypt the connection in the connection properties tab in management studio, when I enable this I do get an entry in netstat -an, see below:



TCP 81.105.102.47:1138 217.194.210.169:1433 TIME_WAIT

TCP 81.105.102.47:1139 217.194.210.169:1433 TIME_WAIT

TCP 81.105.102.47:1140 217.194.210.169:1433 TIME_WAIT



Amost as if it's trying the different ports but you get this time_wait thing. The error message is more meaningful and hopefull because I get:

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) (.Net SqlClient Data Provider)

I would expect this as the DNS has not been advised to encrypt the conection.

This is much better than the : Login failed for user 'COX10289'. (.Net SqlClient Data Provider) that I get, irrespective of whether I enter a password or not.


This is on a XP machine trying to connect to the remote webhosting company via the internet.

I can ping the server

I have enabled shared memory and tcp/ip in protocols, named pipes and via are disabled

I do not have any aliases set up

No I do not force encryption

I wonder if you have any further suggestions to this problem?

View 7 Replies View Related

I Don't Understand How This Works, However It Works (sometimes)

Sep 26, 2006

I use the code below for updating data from a AS400 Liked server. I dont understend how the WHERE NOT EXISTS( sections work however usualy they do, in this case it does not andt I can't seem to find out why.

Does anyone see the error?

Thanks

--=========================================
--Create a local temporary table that hold
--all the data from the source table
--=========================================

SELECT * INTO #TEMP FROM dbo.LINK_LTTSTOC

--=========================================
--Remove table entries that are no longer
--needed or that have to be updated
--=========================================

DELETE FROM LTTSTOCK

WHERE NOT EXISTS( SELECT * FROM #TEMP

WHERE LTTSTOCK.WarehouseNo = LTWHLO

AND LTTSTOCK.Location = LTWHSL

AND LTTSTOCK.ItemNo = LTITNO

AND LTTSTOCK.NumberAvail = LTAVAL

)

--=========================================

--Insert data that is missing or that

--needed to be updated and was previously

--deleted

--=========================================

INSERT INTO dbo.LTTSTOCK(WarehouseNo,Location,ItemNo,NumberAvail,rowguid)

SELECT DISTINCT LTWHLO,LTWHSL,LTITNO,LTAVAL, NEWID()

FROM #TEMP

WHERE NOT EXISTS( SELECT * FROM LTTSTOCK

WHERE WarehouseNo = LTWHLO

AND Location = LTWHSL

AND ItemNo = LTITNO

AND NumberAvail = LTAVAL

)

--========================================

--Remove local temporary table.

--========================================

DROP TABLE #TEMP

View 2 Replies View Related

DTS. Works Sometimes, Not Others

Sep 17, 2001

I'm running a DTS package that works correctly when I do "Execute Package" directly, by right clicking the package.

But, if I schedule the job, it fails.

It's trying to write data to another server, but I can't see why it doesn't work as a scheduled job. I tried changing all the parameters I can think of. I'm no Windows expert, so if you have any ideas, please feel free to explain as if you're talking to a "newbie" (since I am one)

Win 2000, SQL 2000

View 1 Replies View Related

This Works, But...

Apr 8, 2008

I am going to tangle with our ERP system for the rest of my natural life, and in so doing, will need to create new SQL queries on an almost-daily basis. Based on the handful of queries that I have created against it so far, I recognize that I need to get better at authoring them.

Towards that end, I was wondering if anyone with a little firmer grasp on the subject could take a look at this query (which works & does exactly what I need it to do) and make suggestions as to what I might have done better/differently.

I've changed the names of everything to make it more comprehensible (I hope).

The query returns one row for each unique record in DetailTable, with data from the SummaryTable and a PartDescription from ThirdTable.

SELECT SummaryTable.RecordID,
SummaryTable.Status,
SummaryTable.CustomerName,
SummaryTable.CustomerNumber,
SummaryTable.OrderNumber,
SummaryTable.AssignedTo,
SummaryTable.ResolvedBy,
SummaryTable.ResolveDate,
SummaryTable.PartNumber,
SummaryTable.PartRevision,
SummaryTable.OrderQuantity,
SummaryTable.IssueCategory,
SummaryTable.IncidentDate,
SummaryTable.InquiryDate,
SummaryTable.IssueClass,
SummaryTable.Severity,
SummaryTable.IssueNumber,
SummaryTable.AuthorizedBy,
SummaryTable.Facility,
DetailTable.AssignedTo,
DetailTable.ActionDate,
DetailTable.ActionBy,
DetailTable.JobNumber,
DetailTable.ActionTaken,
DetailTable.NextAction,
DetailTable.IncidentNotes,
ThirdTable.PartDescription

FROMtheDatabase.dbo.DetailTable
LEFT JOIN
theDatabase.dbo.SummaryTable ON DetailTable.RecordID=SummaryTable.RecordID
LEFT JOIN
theDatabase.dbo.ThirdTable on SummaryTable.PartNumber = ThirdTable.PartNumber
AND SummaryTable.PartRevision = ThirdTable.PartRevision

WHERE (SummaryTable.IssueCategory='1' OR SummaryTable.IssueCategory='2' OR SummaryTable.IssueCategory='3'
OR SummaryTable.IssueCategory='D' OR SummaryTable.IssueCategory='E' OR SummaryTable.IssueCategory='L'
OR SummaryTable.IssueCategory='O' OR SummaryTable.IssueCategory='R' OR SummaryTable.IssueCategory='S'
OR SummaryTable.IssueCategory='V' OR SummaryTable.IssueCategory='X' OR SummaryTable.IssueCategory='Z')
AND SummaryTable.Facility='Default' AND SummaryTable.Status='OPEN'

ORDER BY SummaryTable.RecordID

View 6 Replies View Related

Sometimes It Works, Sometimes Not...

Sep 12, 2007

I have a VB app that loads 9 text files for 8 different products, one product at a time. The user must select the product to import. For each product the application:

1. Copies the 9 text files from the source directory to a "process" directory.
2. Calls a stored procedure that sequentially calls a different SSIS package for each text file.
3. Performs some additional processing.

Here's the problem. For the 7th product in the sequence, at least 2 of the text files are not being loaded, and no error exceptions are being thrown. For the 8th product in the sequence at least one text file is not being loaded. If I comment out the call to the stored proc in VB and run the stored proc manually at that point in the program, all files are processed.

On the text file side, the files are being copied correctly and the read-only flag on the file is not being set. In addition, I can open the files in a text editor without any problem.

I'm totally stumped here, so any helpful advice would be appreciated.

TIA,

Mike

View 2 Replies View Related

Dts Works From SqlServer But Not From ASP.net

Apr 18, 2005

I have an asp.net page that executes a DTS. When I execute that DTS from enterprise manager it takes about 5000 rows from the as400 and insert into sql serverIt works right. but when I execute it from my asp.net page I have this error.Error al procesar DTS TransferirDatos(ExistMP) en el paso DTSStep_DTSActiveScriptTask_1System.Exception: Error al procesar DTS TransferirDatos(ExistMP) en el paso DTSStep_DTSActiveScriptTask_1 at LibreraLentos.exec.ejecuta_SP_EXISTENCIASMP() in C:Documents and SettingsluisvalenMis documentosVisual Studio ProjectsInventariosLentosLibreraLentosexec.vb:line 43 at InventariosLentos.generacionprocesomateriaprima.btnenviar_Click(Object sender, EventArgs e) in C:AplicacionesWebInventariosLentosgeneracionprocesomateriaprima.aspx.vb:line 60LibreraLentos I have this on my ASP page   Private Sub btnenviar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnenviar.Click        Try            objexecsp.ejecuta_SP_EXISTENCIASMP()            lblmensajes.Text = "Proceso generado satisfactoriamente"        Catch ex As Exception            lblmensajes.Text = ex.Message + ex.GetBaseException.ToString + ex.Source.ToString        End Try    End Subthis on my Data Classs   Public Function ejecuta_SP_EXISTENCIASMP()        ' call UpdatePrice using a parameter array of SqlParameter objects        Try            Dim ejecutardts As New cDTS            ejecutardts.EjecutarDTS("TransferirDatos(ExistMP)")        Catch ex As Exception            Throw ex        End Try    End FunctionThis is what executes the DTSImports System.Runtime.InteropServicesImports System.Configuration.ConfigurationSettingsImports DTSPublic Class cDTS    Public Sub EjecutarDTS(ByVal NombreDTS As String)        Dim pkg As New DTS.Package        Dim oStep As DTS.Step        Try            pkg = New DTS.Package            'pkg.LoadFromSQLServer(AppSettings("MED20NT"), AppSettings("user"), AppSettings("pwd"), DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "", "", "", "pruebaCdr1")            pkg.LoadFromSQLServer("MED20NT", "sa", "prueva", DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "", "", "", NombreDTS, "")            pkg.AutoCommitTransaction = True            pkg.Execute()            For Each oStep In pkg.Steps                If oStep.ExecutionResult = DTSStepExecResult.DTSStepExecResult_Failure Then                    Throw New Exception("Error al procesar DTS " & pkg.Name & " en el paso " & oStep.Name)                End If            Next        Catch ex As System.Runtime.InteropServices.COMException            Throw ex        Catch ex As Exception            Throw ex        Finally            pkg.UnInitialize()            pkg = Nothing        End Try    End SubEnd Class

View 2 Replies View Related

SMO Backup Works On One Not The Other

Jun 9, 2006

Can anyone enlighten me on sqlexpress smo?
I have compiled an exe using vbc running the folloing code
Imports SystemImports Microsoft.SqlServer.Management.SmoImports Microsoft.SqlServer.Management.CommonImports System.IO
Module SMOtest
    Sub Main()      Try        Kill(System.Environment.GetFolderPath Environment.SpecialFolder.ProgramFiles) & " estSMO_BACKUP")      Catch      End Try      Try        System.Threading.Thread.Sleep(500)        Dim bkpfileName As String = System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) & " estSMO_BACKUP"        Dim backDeviceItem As New BackupDeviceItem(bkpfileName, DeviceType.File)        Dim db As String = "test"  ' Define and set db        Dim bck As New Backup()  ' Instantiate a Backup object        bck.Action = BackupActionType.Database  ' Set Action
   bck.BackupSetName = db & "_BackupSet"  ' Set Backup
        bck.Database = db  ' Set Database name property        bck.Devices.Add(backDeviceItem)
        Dim srv As New Server()  ' Instantiate a Server object        bck.SqlBackup(srv)  ' Invoke Backup object's SqlBackup method      Catch      End Try    End SubEnd Module
This works fine on a win2k dev system though when moving to another win2k system the code will error on non system databases. If db= model,master,tempdb etc it executes fine. When I try to backup a created db (any) I get an error stating the name is not found in sysdatabases.
SELECT name FROM master..sysdatabases
where name not in ('master','tempdb')
shows all the created databases including "test" in this case
keep in mind many recompiles using different db's work fine on one system and not the other. Even restored "test" from a backup from the system with no problems only to have a 3041 error consistently on the other. System databases work fine for all attempts on the offending system.
Any ideas? (the offending system is a SAT raid which has been evil from the get go) corruption seems to be the only conclusion I can reach
 
 
 
 

View 11 Replies View Related

From Access To SQL And Now Nothing Works!

Apr 11, 2006

Help, I had my entire DB created and when i thought i was done, i upsized to SQL and now almost none of my queries work?

The below works when i remove Distinct, but then i have doubles?


Code:

SELECT DISTINCT
Equip_ProductName.ProductName, Equip_ProductName.ProductInfoID, Equip_ProductName.ProductDesc, Equip_ProductName.ProductSearchTerm,
Equip_ProductName.ProductMore, Equip_ProductName.Visible, Equip_Products.ProductID, Equip_Products.CategoryID
FROM Equip_Products INNER JOIN
Equip_ProductName ON Equip_Products.ProductInfoID = Equip_ProductName.ProductInfoID
WHERE (Equip_ProductName.Visible = 1) AND (Equip_Products.CategoryID = 1)
ORDER BY Equip_ProductName.ProductName

View 6 Replies View Related

Normalisation Vs If It Works Just Do It!

Apr 16, 2006

Hi All,

As an accomplished web devver of many years using ASP and ASP.NET in conjunction with Access and SQL Server, I am a bit pedantic on the rules of good data structures.

Specifically the two main rules of data redundancy and normalisation.

The latter dictates at the lowest level that a data table should NOT contain a field that can be gleaned from one or a combination of others.

I have a problem with this now, I am building a betting system which will take the odds given, plus the stake placed and calculate the winnings or losses accordingly.

There is an added complication in that not all profit is calculated the same way, as a horse can also be 'placed' which does the same calculation as for profit, but then quarters it, so one single select statement won't do.

I could calculate this at data entry stage on a per entry basis and simply store in a Profit/Loss field and keep the value for each bet, however I know this is not the correct thing to do!

My other alternative [and the correct method] is to do this calculation at data request time, but that would involve the use of a cursor or loop in the SP.

I am aware of the huge resources a cursor can consume and I am not sure which is worse, using a cursor or ignoring the normalisation procedures.

So the question is this, what would you do here?

Since I may not be the same SQL Server expert as I am a programmer, is there an alternative way of reading all the bets and doing these calcs on SQL server and bang them back to ASP as a self contained recordset with all the profit/losses calculated for each bet?

Each bet as a unique EntryID and there is a field called Result which stores 'Win, Place or Loss' accordingly.

Thanks in advance of any help/opinions.

:)

View 4 Replies View Related

Dts Works But Run Same Dts Via Sql Job Failed

Nov 14, 2007

hi all,
i posted this somewhere else but i think here is the right group.

i have a dts that shld write to a text file located at a mapped drive. i read somewhere that sql job does not recognise mapped drive, so i use UNC path in form \128.1.1.1dtsfile, which dtsfile folder is the shared folder name. i opened the folder permission to everyone.

thats abt the remote server. the sql server i am running is on windows NT, logon using Administrator to local. my sql is SQL 2000. i register the server using sa username. the server agent is start up using System account.

now the problem is when i run the dts interactively/manually, it runs succesfully. but when i run it thru SQL job it says "Access denied". Or full error is like this,

DTSRun: Loading... DTSRun: Executing... DTSRun OnStart: DTSStep_DTSDataPumpTask_1 DTSRun OnError: DTSStep_DTSDataPumpTask_1, Error = -2147467259 (80004005) Error string: Error opening datafile: Access is denied. Error source: Microsoft Data Transformation Services Flat File Rowset Provider Help file: DTSFFile.hlp Help context: 0 Error Detail Records: Error: 5 (5); Provider Error: 5 (5) Error string: Error opening datafile: Access is denied. Error source: Microsoft Data Transformation Services Flat File Rowset Provider Help file: DTSFFile.hlp Help context: 0 DTSRun OnFinish: DTSStep_DTSDataPumpTask_1 DTSRun: Package execution complete. Process Exit Code 1. The step failed.

i really hope and appreciate if someone out there can help me out. thanks!

ps: pls let me know if more clues needed from my environment settings.

View 7 Replies View Related

DTS Works But Job Fails

Dec 18, 2007

Hi

I have a DTS to copy data from Oracle to SQL Server. When I logon to SQL Server box with a userID xxx, I can run the DTS from EM and it works perfectly fine but when I schedule the DTS as job, it fails.

SQL Server agent is running with same account "xxx"
DTS connects to SQL Server with sa authentication
Job owner is same account "xxx"

Job error log

Executed as user: DOMAINNAMExxx. ... Drop table [IFS_PROD].[dbo].[INVENTORY_PART] Step DTSRun OnStart: Drop table [IFS_PROD].[dbo].[PART_CATALOG] Step DTSRun OnStart: Drop table [IFS_PROD].[dbo].[SUPPLIER_INFO] Step DTSRun OnStart: DTSStep_DTSExecuteSQLTask_1 DTSRun OnFinish: Drop table [IFS_PROD].[dbo].[PART_CATALOG] Step DTSRun OnFinish: Drop table [IFS_PROD].[dbo].[INVENTORY_PART] Step DTSRun OnStart: Create Table [IFS_PROD].[dbo].[INVENTORY_PART] Step DTSRun OnStart: Create Table [IFS_PROD].[dbo].[PART_CATALOG] Step DTSRun OnFinish: Drop table [IFS_PROD].[dbo].[SUPPLIER_INFO] Step DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_1 DTSRun OnStart: Create Table [IFS_PROD].[dbo].[SUPPLIER_INFO] Step DTSRun OnStart: Create Table [IFS_PROD].[dbo].[SUPPLIER_INFO_ADDRESS] Step DTSRun OnFinish: Create Table [IFS_PROD].[dbo].[PART_CATALOG] Step DTSRun OnFinish: Create Table [IFS_PROD].[dbo].[INVENTORY_PART] Step DTSRun OnStart... Process Exit Code 6. The step failed.


I copied the DTS to another one and scheduled it

This time I got the error log
Executed as user: DOMAINNAMExxx. ...... DTSRun OnStart: DTSStep_DTSExecuteSQLTask_1 DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_1 DTSRun OnStart: Create Table [IFS_PROD].[dbo].[SUPPLIER_INFO_ADDRESS] Step DTSRun OnFinish: Create Table [IFS_PROD].[dbo].[SUPPLIER_INFO_ADDRESS] Step DTSRun OnStart: Copy Data from SUPPLIER_INFO_ADDRESS to [IFS_PROD].[dbo].[SUPPLIER_INFO_ADDRESS] Step DTSRun OnError: Copy Data from SUPPLIER_INFO_ADDRESS to [IFS_PROD].[dbo].[SUPPLIER_INFO_ADDRESS] Step, Error = -2147467259 (80004005) Error string: Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed. Error source: Microsoft OLE DB Provider for Oracle Help file: Help context: 0 Error Detail Records: Error: -2147467259 (80004005); Provider Error: 0 (. The step failed.

Please help!
Thanks in advance

View 3 Replies View Related

The Code Works ... But Is It Right?

Dec 11, 2006

Hi,

Is there a better (more elegant) way to build the file name than the following code:


/* File name has format mmddhhmmDX.748 with all time/date values zero padded */

DECLARE @FileName char(14)
DECLARE @out_dte datetime
DECLARE @CharDate char(8)
DECLARE @CharTime char(8)

set @out_dte = '2006-08-03 04:05:12.670'
set @CharDate = convert(char(8),@out_dte,1)
set @CharTime = convert(char(8),@out_dte,8)


set @FileName = substring(@CharDAte,1,2) +
substring(@CharDate,4,2) +
substring(@CharTime,1,2) +
substring(@CharTime,4,2) +
'DX.748'
select @FileName

/* Expected Result: 08030405DX.748 */


My first attempt was this:

DECLARE @FileName char(14)
DECLARE @out_dte datetime

set @out_dte = '2006-08-03 04:05:12.670'
set @FileName = cast(DATEPART(mm,@out_dte) as char(2)) +
cast(DATEPART(dd,@out_dte) as char(2)) +
cast(DATEPART(HH,@out_dte) as char(2)) +
cast(DATEPART(mm,@out_dte) as char(2)) +
'DX.748'


select @FileName

… but then date and time values were left justified spaced filled.
Example output: 8 3 4 8 DX.748

I don't just want to get code that works. I want to learn how to write the best possible code.

Thanks,

Laurie

View 3 Replies View Related

How Clustering Works?

Mar 5, 2007

Hi,

I am having data like this

Studid Date Perf

001 01/01/2008 90

001 02/01/2008 89

001 03/02/2008 91

002 01/01/2008 75

002 02/01/2008 79

002 03/02/2008 69

I gave Perf as PREDICT. When I use the

"SELECT * FROM [Cluster_Model]"

Query I am getting

Perf

82.

Can anyone help me how clustering works? and how to write a Query to group the values here based on StudId?

View 1 Replies View Related

How Does Sp_start_job Works?

May 27, 2008

Hi:

I would like to use sp_start_job to execute a SSIS Package but I am not sure how it works. If there are two requests run the job two times simultaneously or sequentially?

View 4 Replies View Related

Pkg Execution Works In VS But Not In SQL

Jun 2, 2006

I'm able to execute a package in VS Pro on my machine. However when I upload it to the sql server and try to execute the package directly it fails with:

Error: The product level is insuficient for component "...." (3129)
Error: The product level is insuficient for component "...." (5411)

The first component is a DataReader Source which is consuming an ODBC (Noble Systems ATOMIX Driver) connection and the second component is a DataConversion object. Anyone know why this would work running it on my pc in VS but not when I execute it from SQL on the same machine?

View 13 Replies View Related







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