Showing posts with label excel. Show all posts
Showing posts with label excel. Show all posts

Sunday, March 25, 2012

Analysis server cube Performance through Excel 2007

Hello Everybody

I am accessing Analysis server cube -2005 through Excel 2007 for building reports. When ever i select a row or column right click and select Filter > Hide Selected Items, it will show "running query on the OLAP server" at bottom and will not respond after that.

Ran the MDX generated by Excel 2007 directly on analysis server, even then also it takes lot of time and finally it doesnt respond. I read in the forum that the sql generated by Excel 2007 is different. how can i tweak in so that cube performance improves ?

Thanks
Kiran

Hi Kiran,

Do you have old AS 2000 to compare performance? The reason I am asking this because you can check if you have same aggregation setup in AS 2005 cube. If you don't have old cube to compare try creating aggregation on AS 2005 cube. Also you can check profiler, performance counter etc.

-Ashok

sql

Sunday, March 11, 2012

An error was encountered in the transport layer

I am fairly new to SSAS 2005. I have just created one cube. I was able to create an Excel pivot table that connected to this cube and had all the funtionality that I expected. I then published the pivot table as a web page. When I view the web page on the server where SQL 2005 is loaded the web page comes up with all of the expected functionality. But when I try to view the web page from another computer on my network I gett the error

The query could not be processed:

An error was encounted in the transport layer

The peer prematurely closed the connection.

Any suggestions on how to proceed.

Even though this is a web page, the page actually contains an ActiveX pivot table control which executes on the client machine. The client machines will need to have the OLEDB provider for SSAS 2005 installed in order to connect to SSAS 2005. You can download the "Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider " from the feature pack download page (about half way down) at http://www.microsoft.com/downloads/details.aspx?FamilyID=df0ba5aa-b4bd-4705-aa0a-b477ba72a9cb&DisplayLang=en

If this still does not help, there is a great article on troubleshooting connectivity issues with SSAS at http://sqljunkies.com/WebLog/edwardm/archive/2006/05/26/21447.aspx

|||I've loaded SSAS OLE DB 9.0. I've allowed anonymous users and I still get the error. Any other suggestions.|||Trying using the domain name in front of your user name (domain\username)|||

You could try tracing the SSAS server while you try to connect to see if there are any error events that appear.

The following thread from the newsgroup might also provide some ideas:

http://groups.google.com/group/microsoft.public.sqlserver.olap/browse_frm/thread/fda9edcc5cabaaa6/ae553b59c97dd4b5?lnk=st&q=&rnum=7#ae553b59c97dd4b5

|||

Hi,

I'm having a similar problem except it's less consistent (*sigh*). The situation: I have SSAS 2005 running on a non-domain machine (it's a test setup) along with Project Server 2007. I then have a few client machines I'm trying to connect with. The hitch is that one of them is able to connect with any method I try (.udl file, Excel PivotTable, or the Data Analysis Web components in the Project Server) - in SQL Server Profiler, I see the correct NTUserName appear (I have a couple of users created on the server). However, when I try to connect with another machine using Data Analysis components with IE7, I get the error "An error was encountered in the transport layer." and "The peer prematurely closed the connection."; the profiler shows the NTUserName is "Anonymous", yet I'm using the same user credentials. To make things interesting, on the problem machine, I can successfully connect using the .udl file method and Excel (the NTUserName is correct). Just for completeness, I have no problems when trying to connect locally from the server.

I'm reasonably sure the settings for Internet Explorer are correct and that I have the correct components installed (like OLE DB Provider for Analysis Services 9.0) otherwise no method would work. I'm just not sure why the user credentials are making it okay from one machine and not the other (and from different methods, to boot). Just for funsies, I enabled Anonymous access to SSAS but that had no difference. For reference, the machine that works is Vista and the machine that does not is XP SP2. Both machines are fully patched.

I have tried the suggestions in both of these following Web pages (and a variety of other postings) to no avail:

http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/cisql2005ascs.mspx

and

http://sqljunkies.com/WebLog/edwardm/

Other things:

The firewall on the server is off "Access data sources across domains" is enabled (IE option) "Automatic logon with current user name and password" is enabled in all browsers I try (IE option)

An error was encountered in the transport layer

I am fairly new to SSAS 2005. I have just created one cube. I was able to create an Excel pivot table that connected to this cube and had all the funtionality that I expected. I then published the pivot table as a web page. When I view the web page on the server where SQL 2005 is loaded the web page comes up with all of the expected functionality. But when I try to view the web page from another computer on my network I gett the error

The query could not be processed:

An error was encounted in the transport layer

The peer prematurely closed the connection.

Any suggestions on how to proceed.

Even though this is a web page, the page actually contains an ActiveX pivot table control which executes on the client machine. The client machines will need to have the OLEDB provider for SSAS 2005 installed in order to connect to SSAS 2005. You can download the "Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider " from the feature pack download page (about half way down) at http://www.microsoft.com/downloads/details.aspx?FamilyID=df0ba5aa-b4bd-4705-aa0a-b477ba72a9cb&DisplayLang=en

If this still does not help, there is a great article on troubleshooting connectivity issues with SSAS at http://sqljunkies.com/WebLog/edwardm/archive/2006/05/26/21447.aspx

|||I've loaded SSAS OLE DB 9.0. I've allowed anonymous users and I still get the error. Any other suggestions.|||Trying using the domain name in front of your user name (domain\username)|||

You could try tracing the SSAS server while you try to connect to see if there are any error events that appear.

The following thread from the newsgroup might also provide some ideas:

http://groups.google.com/group/microsoft.public.sqlserver.olap/browse_frm/thread/fda9edcc5cabaaa6/ae553b59c97dd4b5?lnk=st&q=&rnum=7#ae553b59c97dd4b5

|||

Hi,

I'm having a similar problem except it's less consistent (*sigh*). The situation: I have SSAS 2005 running on a non-domain machine (it's a test setup) along with Project Server 2007. I then have a few client machines I'm trying to connect with. The hitch is that one of them is able to connect with any method I try (.udl file, Excel PivotTable, or the Data Analysis Web components in the Project Server) - in SQL Server Profiler, I see the correct NTUserName appear (I have a couple of users created on the server). However, when I try to connect with another machine using Data Analysis components with IE7, I get the error "An error was encountered in the transport layer." and "The peer prematurely closed the connection."; the profiler shows the NTUserName is "Anonymous", yet I'm using the same user credentials. To make things interesting, on the problem machine, I can successfully connect using the .udl file method and Excel (the NTUserName is correct). Just for completeness, I have no problems when trying to connect locally from the server.

I'm reasonably sure the settings for Internet Explorer are correct and that I have the correct components installed (like OLE DB Provider for Analysis Services 9.0) otherwise no method would work. I'm just not sure why the user credentials are making it okay from one machine and not the other (and from different methods, to boot). Just for funsies, I enabled Anonymous access to SSAS but that had no difference. For reference, the machine that works is Vista and the machine that does not is XP SP2. Both machines are fully patched.

I have tried the suggestions in both of these following Web pages (and a variety of other postings) to no avail:

http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/cisql2005ascs.mspx

and

http://sqljunkies.com/WebLog/edwardm/

Other things:

The firewall on the server is off

"Access data sources across domains" is enabled (IE option)

"Automatic logon with current user name and password" is enabled in all browsers I try (IE option)

Thursday, February 16, 2012

Am I only one with the problem using CSV files?

Simple thing - trying to set up connection for CSV file.

In Microsoft Excel - CSV is displayed OK.

However - in SSIS - some records are broken - for example records where Description field contains: ""WHITE HOT.""

I'm not expert on CSV format - but aren't double quotes used for escape in csv - and if so then WHY microsoft implements it one of their products and not it SSIS?

So what am I going to do now?Search the forums, man! You aren't alone and SSIS doesn't handle embedded quotes.|||http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=546729&SiteID=1|||Thanks for the link.

I was mostly pissed off that my 2 hour project was going to be days worth of work because they decided not to implement CSV.

However - it did not take long for me to write the following code in VB Script Task
(The components marked as asnwer in this linked post seemed not quite what i needed - and Im somewhat suspicious of installing another SSIS component)

Sub ProcessFile(ByVal source_file As String, ByVal destination_file As String)
Dim sReader As New System.IO.StreamReader(source_file)
Dim sWriter As New System.IO.StreamWriter(destination_file)
Do
sWriter.WriteLine(FixCsvQuotes(sReader.ReadLine()))
Loop Until sReader.Peek = -1
sWriter.Close()
sReader.Close()
End Sub

Function FixCsvQuotes(ByVal csv_row As String) As String
Dim qiStr As String = Chr(34) & "," & Chr(34) ' ","
Dim qiStr1 As String = Chr(34) & "," ' ",
Dim qiStr2 As String = "," & Chr(34) ' ,"
Dim str1 As String = ""
Dim str2 As String = ""
Dim str3 As String = ""

str1 = csv_row.Substring(0, csv_row.IndexOf(Chr(34)) + 1)
str3 = csv_row.Substring(csv_row.LastIndexOf(Chr(34)), csv_row.Length - csv_row.LastIndexOf(Chr(34)))
str2 = csv_row.Substring(str1.Length, csv_row.Length - str1.Length - str3.Length)

str2 = Replace(str2, qiStr, "|&|")
str2 = Replace(str2, qiStr1, "|&")
str2 = Replace(str2, qiStr2, "&|")

str2 = Replace(str2, Chr(34), """)

str2 = Replace(str2, "|&|", qiStr)
str2 = Replace(str2, "|&", qiStr1)
str2 = Replace(str2, "&|", qiStr2)

Return (str1 & str2 & str3)
End Function|||Note:
following string will still cause an error if in description:

...available in ""The Siena"", the most sought after ...|||

TheViewMaster wrote:

Thanks for the link.

I was mostly pissed off that my 2 hour project was going to be days worth of work because they decided not to implement CSV.

They have done.

never ever trust what Excel says about CSVs. If you want to look at the raw data, open it up in a text editor.

-Jamie

|||Well - it still doesn't work - is there a VB function which can fix CSV files for SSIS import?|||Allrite - my 3rd hack at Visual basic FixCsv function:

Function FixCsvQuotes(ByVal csv_row As String) As String
Dim qiStr0 As String = "," & Chr(34) & Chr(34) & "," ' ,"",
Dim qiStr As String = Chr(34) & "," & Chr(34) ' ","
Dim qiStr1 As String = Chr(34) & "," ' ",
Dim qiStr2 As String = "," & Chr(34) ' ,"
Dim str1 As String = ""
Dim str2 As String = ""
Dim str3 As String = ""

str1 = csv_row.Substring(0, csv_row.IndexOf(Chr(34)) + 1)
str3 = csv_row.Substring(csv_row.LastIndexOf(Chr(34)), csv_row.Length - csv_row.LastIndexOf(Chr(34)))
str2 = csv_row.Substring(str1.Length, csv_row.Length - str1.Length - str3.Length)

While InStr(str2, qiStr0) > 0
str2 = Replace(str2, qiStr0, ",&||&,")
End While

str2 = Replace(str2, qiStr, "|&|")
str2 = Replace(str2, Chr(34) & Chr(34), """)
str2 = Replace(str2, qiStr1, "|&")
str2 = Replace(str2, qiStr2, "&|")

str2 = Replace(str2, Chr(34), """)

str2 = Replace(str2, "&||&", """""")
str2 = Replace(str2, "|&|", qiStr)
str2 = Replace(str2, "|&", qiStr1)
str2 = Replace(str2, "&|", qiStr2)

Return (str1 & str2 & str3)
End Function

Thursday, February 9, 2012

Alternative to Identity Help.

I have a SSIS package that imports an Excel file using Visual Basic 2005 into my SQL 2005 database. All the fields are the same in the DB and xls. The package runs with no problem but I need one of the fields to be autoincrement. I tried to set up the properties of one of my fields "ID" to be an Identity. This didn't seem to work at all. There are about 1300 records in the DB so far with the last "ID" number being 10001415. Before now, the numbers were inputed manually. I want the "ID" to be assigned when the SSIS package imports the xls file.

Any help is very appreciated.

See if this helps:
http://www.ssistalk.com/2007/02/20/generating-surrogate-keys/|||

Not really. I opened the SQL Server Management Studio and tried to edit the DTSX package. I couldn't find any of those options you mention in the article. I am not that familiar with SSIS. I just used the wizard to create it.

|||

I think all you have to do is to set a column in the target table to be an Identity (Identity Specification = Yes).

BTW, to edit a ssis package you have to use Business Intelligence Studio.

|||

I previously set my column to Identity = Yes. When I run my DTSX package I get an error. It will not let me change a current column to identity and then import new data into the column. I tried creating a new column whith the Is Identity set to Yes with the appropriate seed and increment, however, I have records that have been deleted and now the numbering is off from the original format. What I mean is I have records numbered 1, 2, 3, 5, 6, 9, 12, etc in the DB in that order. When I create the new column and set the ID, it is unaware that I have records missing and what I end up with is 1, 2, 3, 4, 5, 6, etc.

I also tried creating a new SSIS package in order to use surrogate ID's and cannot figure out how to implement that within my import from Excel.

Please help!

|||

ISSOA wrote:

I previously set my column to Identity = Yes. When I run my DTSX package I get an error. It will not let me change a current column to identity and then import new data into the column.

If you want to insert explicit values in a identity colum you have to alter the table:

SET IDENTITY_INSERT <tableName> ON

|||

I set all that up and I still get an error that I have violated the constraints for the column. The column that I am importing from EXCEL is blank. I want it to get a number when it is imported by the DTSX job. When I put a number in that column within the EXCEL sheet the number stays the same. Any ideas?

|||

ISSOA wrote:

I set all that up and I still get an error that I have violated the constraints for the column. The column that I am importing from EXCEL is blank. I want it to get a number when it is imported by the DTSX job. When I put a number in that column within the EXCEL sheet the number stays the same. Any ideas?

Don't map that column to the destination column. Leave it out of the Import/Export Wizard and you should get the results you desire.

Alternative to Identity Help.

I have a SSIS package that imports an Excel file using Visual Basic 2005 into my SQL 2005 database. All the fields are the same in the DB and xls. The package runs with no problem but I need one of the fields to be autoincrement. I tried to set up the properties of one of my fields "ID" to be an Identity. This didn't seem to work at all. There are about 1300 records in the DB so far with the last "ID" number being 10001415. Before now, the numbers were inputed manually. I want the "ID" to be assigned when the SSIS package imports the xls file.

Any help is very appreciated.

See if this helps:
http://www.ssistalk.com/2007/02/20/generating-surrogate-keys/|||

Not really. I opened the SQL Server Management Studio and tried to edit the DTSX package. I couldn't find any of those options you mention in the article. I am not that familiar with SSIS. I just used the wizard to create it.

|||

I think all you have to do is to set a column in the target table to be an Identity (Identity Specification = Yes).

BTW, to edit a ssis package you have to use Business Intelligence Studio.

|||

I previously set my column to Identity = Yes. When I run my DTSX package I get an error. It will not let me change a current column to identity and then import new data into the column. I tried creating a new column whith the Is Identity set to Yes with the appropriate seed and increment, however, I have records that have been deleted and now the numbering is off from the original format. What I mean is I have records numbered 1, 2, 3, 5, 6, 9, 12, etc in the DB in that order. When I create the new column and set the ID, it is unaware that I have records missing and what I end up with is 1, 2, 3, 4, 5, 6, etc.

I also tried creating a new SSIS package in order to use surrogate ID's and cannot figure out how to implement that within my import from Excel.

Please help!

|||

ISSOA wrote:

I previously set my column to Identity = Yes. When I run my DTSX package I get an error. It will not let me change a current column to identity and then import new data into the column.

If you want to insert explicit values in a identity colum you have to alter the table:

SET IDENTITY_INSERT <tableName> ON

|||

I set all that up and I still get an error that I have violated the constraints for the column. The column that I am importing from EXCEL is blank. I want it to get a number when it is imported by the DTSX job. When I put a number in that column within the EXCEL sheet the number stays the same. Any ideas?

|||

ISSOA wrote:

I set all that up and I still get an error that I have violated the constraints for the column. The column that I am importing from EXCEL is blank. I want it to get a number when it is imported by the DTSX job. When I put a number in that column within the EXCEL sheet the number stays the same. Any ideas?

Don't map that column to the destination column. Leave it out of the Import/Export Wizard and you should get the results you desire.