Showing posts with label via. Show all posts
Showing posts with label via. Show all posts

Sunday, March 11, 2012

Error in metadata manager processing sample database/cubes

I've just installed SQL Server 2005 with Analysis Services and the sample AdventureWorks databases. When I try to process the database via SQL Server Management Studio, I get the following error - see below. I did check the xml file referenced by the name of the error and I do see the dimension listed Order Date key but not any attribute called Name of Date. Is there any workaround to enable processing of the database and cubes?

I did bump up to Sp1 and this did not fix my problem. I also tried installing the samples from the downloads section of microsoft.com. Alas, no success.

Any help appreciated,

Mairead

Errors in the metadata manager. The dimension with ID of 'Order Date Key - Dim Time', Name of 'Date' referenced by the 'Adventure Works' cube, does not exist.
Errors in the metadata manager. An error occurred when loading the Adventure Works cube, from the file, '\\?\D:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\Data\Adventure Works DW.0.db\Adventure Works DW.2.cub.xml'.
(Microsoft.AnalysisServices)


Program Location:

at Microsoft.AnalysisServices.XmlaClient.CheckForException(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError)
at Microsoft.AnalysisServices.AnalysisServicesClient.Discover(IMajorObject obj, ObjectExpansion expansion)
at Microsoft.AnalysisServices.Server.Refresh(IMajorObject obj, ObjectExpansion expansion)
at Microsoft.AnalysisServices.Server.SendRefresh(IMajorObject obj, ObjectExpansion expansion)
at Microsoft.AnalysisServices.MajorObject.Refresh()
at Microsoft.AnalysisServices.Server.Connect(String connectionString, String sessionId)
at Microsoft.AnalysisServices.Server.Connect(String connectionString)
at Microsoft.SqlServer.Management.SqlMgmt.CDataContainer.Init(XmlDocument doc)
at Microsoft.SqlServer.Management.SqlMgmt.CDataContainer.Init(XmlDocument doc, IServiceProvider site)
at Microsoft.SqlServer.Management.SqlMgmt.DefaultLaunchFormHostedControlAllocator.AllocateDataContainer(XmlDocument initializationXml, IServiceProvider dialogServiceProvider)
at Microsoft.SqlServer.Management.SqlMgmt.DefaultLaunchFormHostedControlAllocator.Microsoft.SqlServer.Management.SqlMgmt.ILaunchFormHostedControlAllocator.CreateDialog(XmlDocument initializationXml, IServiceProvider dialogServiceProvider)
at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm.InitializeForm(XmlDocument doc, IServiceProvider provider, ISqlControlCollection control)
at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm..ctor(XmlDocument doc, IServiceProvider provider)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItem.OnCreateAndShowForm(IServiceProvider sp, XmlDocument doc)
at Microsoft.SqlServer.Management.SqlMgmt.RunningFormsTable.RunningFormsTableImpl.ThreadStarter.StartThread()

Here is simple way out of your situation

1. Stop Analysis Service.
2. Delete everything in your D:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\Data\Adventure Works DW.0.db folder.
3. Start the service
4. Re-deploy your sample project.

Hope that helps

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Thanks Edward, I finally did get everything working again by completely uninstalling/reinstalling and redeploying the samples again. I did try your workaround but still could not get the samples processed successfully.

Mairead

Sunday, February 19, 2012

Error in accessing data via Linked Server

Hi,

I am trying to access the View through linked server connection .The linked server connection is between two sql server 2005.

The problem is I am not able to access 2 columns of nvarchar datatype of length 255, from the view through select statement.

I do a SELECT col1,col2 from VIEW,then getting the following error .

Cannot get the data of the row from the OLE DB provider "SQLNCLI" for linked server "SRVXPR". Could not convert the data value due to reasons other than sign mismatch or overflow.

Then I tried with

Select cast(Col1 as nvarchar) ,

cast(col2 as nvarchar) from VIEW,

I am able to get the values.

The collation type is same for all underlying tables and also for the servers.

Is there any restrictions in handling nvarchar data thru linked server/ anyother size limitation.

I don't want to use cast as this will lead to performance problem.

Thanks,

Philip


Seems as this is a problem of the OLEDB driver. You could send this to Microsoft as a BUG through the connect.microsoft.com portal, or in urgent cases call PSS to get the problem fixed.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

Friday, February 17, 2012

error importing data from Access to SQL Server

Hi
I am trying to import of data from my Access 2003 tables in to SQL Server
2005, via SQL Server Management Studio (Import and
export wizard). All accesstables have been imported with no errors except for
this last one "Transaktionsrader"
I have tried to run some different queries to find Unmatched data in this
tables foreign key, inside Access, found some (removed it from the table)
then tried the same import of table again, but still keep getting this error.
I receive this error below:
Regards
Mattias
- Copying to [MbaseMuseumServerNetSQL].[dbo].[Transaktionsrader] (Error)
Messages
Information 0x402090df: Data Flow Task: The final commit for the data
insertion has started.
(SQL Server Import and Export Wizard)
Error 0xc0202009: Data Flow Task: An OLE DB error has occurred. Error code:
0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client"
Hresult: 0x80004005 Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Native Client"
Hresult: 0x80004005 Description: "The INSERT statement conflicted with the
FOREIGN KEY constraint "ITransaktionsrader11". The conflict occurred in
database "MbaseMuseumServerNetSQL", table "dbo.Transaktionhuvud", column
'TransaktionhuvudTransaktionsnr'.".
(SQL Server Import and Export Wizard)
Information 0x402090e0: Data Flow Task: The final commit for the data
insertion has ended.
(SQL Server Import and Export Wizard)
Error 0xc0047022: Data Flow Task: The ProcessInput method on component
"Destination - Transaktionsrader" (115) failed with error code 0xC0202009.
The identified component returned an error from the ProcessInput method. The
error is specific to the component, but the error is fatal and will cause the
Data Flow task to stop running.
(SQL Server Import and Export Wizard)
Error 0xc0047021: Data Flow Task: Thread "WorkThread0" has exited with error
code 0xC0202009.
(SQL Server Import and Export Wizard)
It appears that there is a Foreign Key issue.
(I'm only guessing about your table and column names since you didn't include any DDL.)
Try a query somewhat like this to find the 'orphan' rows -and then correct them.
SELECT th.TransaktionhuvudTransaktionsnr
FROM Transaktionsrader tr
RIGHT JOIN MbaseMuseumServerNetSQL.dbo.Transaktionhuvud th
ON tr.TransaktionsraderTransaktionsnr = th.TransaktionhuvudTransaktionsnr
WHERE TransaktionsraderTransaktionsnr IS NULL
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the top yourself.
- H. Norman Schwarzkopf
"Mattias" <Mattias@.discussions.microsoft.com> wrote in message news:8178B69D-4227-4C49-95A5-D7C67490CD7F@.microsoft.com...
> Hi
> I am trying to import of data from my Access 2003 tables in to SQL Server
> 2005, via SQL Server Management Studio (Import and
> export wizard). All accesstables have been imported with no errors except for
> this last one "Transaktionsrader"
> I have tried to run some different queries to find Unmatched data in this
> tables foreign key, inside Access, found some (removed it from the table)
> then tried the same import of table again, but still keep getting this error.
> I receive this error below:
> Regards
> Mattias
> - Copying to [MbaseMuseumServerNetSQL].[dbo].[Transaktionsrader] (Error)
> Messages
> Information 0x402090df: Data Flow Task: The final commit for the data
> insertion has started.
> (SQL Server Import and Export Wizard)
> Error 0xc0202009: Data Flow Task: An OLE DB error has occurred. Error code:
> 0x80004005.
> An OLE DB record is available. Source: "Microsoft SQL Native Client"
> Hresult: 0x80004005 Description: "The statement has been terminated.".
> An OLE DB record is available. Source: "Microsoft SQL Native Client"
> Hresult: 0x80004005 Description: "The INSERT statement conflicted with the
> FOREIGN KEY constraint "ITransaktionsrader11". The conflict occurred in
> database "MbaseMuseumServerNetSQL", table "dbo.Transaktionhuvud", column
> 'TransaktionhuvudTransaktionsnr'.".
> (SQL Server Import and Export Wizard)
> Information 0x402090e0: Data Flow Task: The final commit for the data
> insertion has ended.
> (SQL Server Import and Export Wizard)
> Error 0xc0047022: Data Flow Task: The ProcessInput method on component
> "Destination - Transaktionsrader" (115) failed with error code 0xC0202009.
> The identified component returned an error from the ProcessInput method. The
> error is specific to the component, but the error is fatal and will cause the
> Data Flow task to stop running.
> (SQL Server Import and Export Wizard)
> Error 0xc0047021: Data Flow Task: Thread "WorkThread0" has exited with error
> code 0xC0202009.
> (SQL Server Import and Export Wizard)
>
>
>
|||Hi
Thank you for your reply.
I have already transfered the Transaktionshuvud table from Access to SQL
Server.
Transaktionsrader in SQL Server is an empty table right now.
How do I run your query here?
The best would be if I could run it based on the Transaktionshuvud and
Transaktionsrader in the Access db.
Is it possible?
Mattias
"Arnie Rowland" wrote:
[vbcol=seagreen]
> It appears that there is a Foreign Key issue.
> (I'm only guessing about your table and column names since you didn't include any DDL.)
> Try a query somewhat like this to find the 'orphan' rows -and then correct them.
> SELECT th.TransaktionhuvudTransaktionsnr
> FROM Transaktionsrader tr
> RIGHT JOIN MbaseMuseumServerNetSQL.dbo.Transaktionhuvud th
> ON tr.TransaktionsraderTransaktionsnr = th.TransaktionhuvudTransaktionsnr
> WHERE TransaktionsraderTransaktionsnr IS NULL
>
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to the top yourself.
> - H. Norman Schwarzkopf
>
> "Mattias" <Mattias@.discussions.microsoft.com> wrote in message news:8178B69D-4227-4C49-95A5-D7C67490CD7F@.microsoft.com...
|||What I've done in the past is use the access query wizard to create an
'unmatched' query on the child table using the FK>PK in parent table to find
the orphaned records.
Regards,
Dave Patrick ...Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"Mattias" wrote:
> Hi
> Thank you for your reply.
> I have already transfered the Transaktionshuvud table from Access to SQL
> Server.
> Transaktionsrader in SQL Server is an empty table right now.
> How do I run your query here?
> The best would be if I could run it based on the Transaktionshuvud and
> Transaktionsrader in the Access db.
> Is it possible?
> Mattias
|||Hi
I did excactly what you suggested, but still getting this error when
importing the Transaktionsrader table
Mattias
"Dave Patrick" wrote:

> What I've done in the past is use the access query wizard to create an
> 'unmatched' query on the child table using the FK>PK in parent table to find
> the orphaned records.
> --
> Regards,
> Dave Patrick ...Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
> "Mattias" wrote:
>
|||Mattias (Mattias@.discussions.microsoft.com) writes:
> I did excactly what you suggested, but still getting this error when
> importing the Transaktionsrader table
Well, that is sort of expected. Dave suggested that you would create a
third table without foreign keys, import into this table to track
down the suspect rows. From this follows that the import into the
original table would still fail as long as you don't repair the data.
But it appears to akward to import to SQL Server to track down problems
in your access data. What does this query return in Access:
SELECT *
FROM Transaktionsrader R
WHERE NOT EXISTS (SELECT *
FROM Transaktionshuvud H
WHERE H.TransaktionhuvudTransaktionsnr =
R.TransaktionsraderTransaktionsnr)
(I'm making a guess on the last column name here.)
If foreign keys are properly implemented in your Access database,
this query should not return any rows. But in such case the import
would not fail.
Once you have tracked down the wacko rows, insert/delete/updated and
re-import.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||Sorry, I should have mentioned and as Erland pointed out I meant to use the
result as a guide to what records need repaired or deleted.
Regards,
Dave Patrick ...Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"Mattias" wrote:
> Hi
> I did excactly what you suggested, but still getting this error when
> importing the Transaktionsrader table
> Mattias
|||Hi
I tried your Select in Access but no rows was to find, unfortunatly.
Do you have any more ideas?
Mattias
"Erland Sommarskog" wrote:

> Mattias (Mattias@.discussions.microsoft.com) writes:
> Well, that is sort of expected. Dave suggested that you would create a
> third table without foreign keys, import into this table to track
> down the suspect rows. From this follows that the import into the
> original table would still fail as long as you don't repair the data.
> But it appears to akward to import to SQL Server to track down problems
> in your access data. What does this query return in Access:
> SELECT *
> FROM Transaktionsrader R
> WHERE NOT EXISTS (SELECT *
> FROM Transaktionshuvud H
> WHERE H.TransaktionhuvudTransaktionsnr =
> R.TransaktionsraderTransaktionsnr)
> (I'm making a guess on the last column name here.)
> If foreign keys are properly implemented in your Access database,
> this query should not return any rows. But in such case the import
> would not fail.
> Once you have tracked down the wacko rows, insert/delete/updated and
> re-import.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
>
|||Mattias (Mattias@.discussions.microsoft.com) writes:
> I tried your Select in Access but no rows was to find, unfortunatly.
> Do you have any more ideas?
One possibility is that comparison is case-insensitive on the Access
side, but you have a case-sensitive collation on the SQL Server side, and
the usage of case in the data is inconsistent. That presume that the columns
are character data.
Or else something goes wrong during import, for instance the tables being
imported in the wrong order.
I would disable the foreign-key constraint with:
ALTER TABLE Transaktionsrader NOCHECK CONSTRAINT ITransaktionsrader11
and then run the import. Then use the query from my previous post, to see
if there are bad rows.
To enable the constraint again, do:
ALTER TABLE Transaktionsrader WITH CHECK CHECK
CONSTRAINT ITransaktionsrader11
(Yes, it should really be CHECK CHECK.)
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||Hi
Thank you for your effort your idea worked fine imported it and could
remove 16 rows
All the best
Mattias
"Erland Sommarskog" wrote:

> Mattias (Mattias@.discussions.microsoft.com) writes:
> One possibility is that comparison is case-insensitive on the Access
> side, but you have a case-sensitive collation on the SQL Server side, and
> the usage of case in the data is inconsistent. That presume that the columns
> are character data.
> Or else something goes wrong during import, for instance the tables being
> imported in the wrong order.
> I would disable the foreign-key constraint with:
> ALTER TABLE Transaktionsrader NOCHECK CONSTRAINT ITransaktionsrader11
> and then run the import. Then use the query from my previous post, to see
> if there are bad rows.
> To enable the constraint again, do:
> ALTER TABLE Transaktionsrader WITH CHECK CHECK
> CONSTRAINT ITransaktionsrader11
> (Yes, it should really be CHECK CHECK.)
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
>

Error Importing CVS into SQL Server 2005 using SQLBulkCopy and c#

Hi,
I'm using SQLBulkCopy via c#, I'm importing a large text file into a
destination SQL Table, the file contains multiple columns and is about 100k
records, I am getting the following error:
'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
filegroup is full. Create disk space be deleting unneeded files, dropping
objects in the filegroup, adding additional files to the filegroup, or
setting autogrowth on the existing files in the filegroup.
Can someone please tell me how to resolve this?
Thanks
Hi Rob
"Rob Dob" wrote:

> Hi,
>
> I'm using SQLBulkCopy via c#, I'm importing a large text file into a
> destination SQL Table, the file contains multiple columns and is about 100k
> records, I am getting the following error:
>
> 'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
> database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
> filegroup is full. Create disk space be deleting unneeded files, dropping
> objects in the filegroup, adding additional files to the filegroup, or
> setting autogrowth on the existing files in the filegroup.
>
> Can someone please tell me how to resolve this?
> Thanks
The error message is probably correct! You have either a fixed file size for
the database file, or there is not enough disc space for the file to grow by
the expected value. This may be because you have a percentage growth set and
it is therefore trying to expand by an enormous amount or you just don't have
enough space available.
John

Error Importing CVS into SQL Server 2005 using SQLBulkCopy and c#

Hi,
I'm using SQLBulkCopy via c#, I'm importing a large text file into a
destination SQL Table, the file contains multiple columns and is about 100k
records, I am getting the following error:
'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
filegroup is full. Create disk space be deleting unneeded files, dropping
objects in the filegroup, adding additional files to the filegroup, or
setting autogrowth on the existing files in the filegroup.
Can someone please tell me how to resolve this?
ThanksHi Rob
"Rob Dob" wrote:
> Hi,
>
> I'm using SQLBulkCopy via c#, I'm importing a large text file into a
> destination SQL Table, the file contains multiple columns and is about 100k
> records, I am getting the following error:
>
> 'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
> database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
> filegroup is full. Create disk space be deleting unneeded files, dropping
> objects in the filegroup, adding additional files to the filegroup, or
> setting autogrowth on the existing files in the filegroup.
>
> Can someone please tell me how to resolve this?
> Thanks
The error message is probably correct! You have either a fixed file size for
the database file, or there is not enough disc space for the file to grow by
the expected value. This may be because you have a percentage growth set and
it is therefore trying to expand by an enormous amount or you just don't have
enough space available.
John

Error Importing CVS into SQL Server 2005 using SQLBulkCopy and c#

Hi,
I'm using SQLBulkCopy via c#, I'm importing a large text file into a
destination SQL Table, the file contains multiple columns and is about 100k
records, I am getting the following error:
'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
filegroup is full. Create disk space be deleting unneeded files, dropping
objects in the filegroup, adding additional files to the filegroup, or
setting autogrowth on the existing files in the filegroup.
Can someone please tell me how to resolve this?
ThanksHi Rob
"Rob Dob" wrote:

> Hi,
>
> I'm using SQLBulkCopy via c#, I'm importing a large text file into a
> destination SQL Table, the file contains multiple columns and is about 100
k
> records, I am getting the following error:
>
> 'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
> database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
> filegroup is full. Create disk space be deleting unneeded files, dropping
> objects in the filegroup, adding additional files to the filegroup, or
> setting autogrowth on the existing files in the filegroup.
>
> Can someone please tell me how to resolve this?
> Thanks
The error message is probably correct! You have either a fixed file size for
the database file, or there is not enough disc space for the file to grow by
the expected value. This may be because you have a percentage growth set and
it is therefore trying to expand by an enormous amount or you just don't hav
e
enough space available.
John

Wednesday, February 15, 2012

error handling vbscript via sqlserver

Hi,

I wrote a small vbscript that sends information from a local computer to SQL server.
The method I use for connecting to the SQL server is via ODBC DSN.
This scripts runs on a DMZ located machine, while the SQL server is inside our LAN.

All works fine, but when the network connection between DMZ machine and SQL server lost
for a min. I receive an error.

I monitored the error and tried to error handle it.

after network is back the script is still on, but the error still there.

this is the part where I get the error:

-----------------------
Public function reso(byval res)

'error 3705 occurs here

objConn.Open strConn

Set objrs = objconn.Execute("exec cmp_creation "& Computer &"," & res)


objConn.Close

end function
-----------------------

Help would be much appreciatedWhy not use a DSN-less connection?

Also, if the server is in your DMZ and the SQL Server is behind a firewall (assumed), I would be sure to use the IP address instead of the network name.

Regards,

hmscott|||I'm not sure about the DSN-Less connection.... what would it change regarding my problem? also, what port do I have to open for a DSN-Less connection?|||I don't think that there's anything really wrong with a DSN connection and I'm not positive it would rectify your particular issue. However, DSN connections leave "footprints" on the server in your DMZ (in the registry) which are potentially vulnerable.

DSN and DSN-less connections use the same ports to connect to their respective data sources. Thus, a DSN connection to SQL Server would use port 1433 as would a DSN-less connection.

In general (from what I understand), DSN-less connections are "lighter" on the server, incurring less memory overhead. They are not, however, necessarily faster.

In your script, do you check for the state of the connection? Is it just opened once and left open? Or is it opened and closed as necessary?

Regards,

hmscott

Originally posted by eransp
I'm not sure about the DSN-Less connection.... what would it change regarding my problem? also, what port do I have to open for a DSN-Less connection?