Showing posts with label location. Show all posts
Showing posts with label location. Show all posts

Monday, March 12, 2012

Fail to start SQL Server 2005 Analysis Services Service

Hi, all experts here,

How can we find the storage location of the first partition of a cube originally when the cube is created? I mean after the cube is created with the cube wizard, we can always add new partitions for a cube with the partition wizard which enables us to select the storage location of the partitions. But how about the first partition of a cube which is created automatically along with the creation of a cube? I need to locate the storage locations of all partitions of a cube to be able to put the OLAP database somewhere with enough space.

I am looking forward to hearing from you shortly and thanks a lot in advance for your kind advices and help.

With best regards,

Yours sincerely,

Open SSMS, connect to your instance, right-click it and select Properties. In the General tab, look for a property called DataDir. Your partitions will be created in a subfolder of that folder. If you open the value dialog on this property, you will be given instructions on how to make additional locations available.

Good luck,
Bryan

|||

You can also view and set this from within BIDS for any partion.

Open up the cube, click on the partitions tab, click on a partition and in the properties window (right click on the partition and select "Properties" if this window is not already visible, in my environment the properties window is always visible in the lower right hand corner). There is a property called StoreageLocation, if you click on the button for this property a dialog pops up that lets you see the default storage location and override it, to set it to a given folder.

You can also change this property at the Cube and MeasureGroup objects, but I think at this level the property only works as a default setting for any new partitions that are created.

|||

Why I am not able to start the Analysis Services Engine again as the error message from event viewer as:

Event Type: Error
Event Source: MSSQLServerOLAPService
Event Category: (289)
Event ID: 0
Date: 04/07/2007
Time: 10:45:48
User: N/A
Computer: computer_name
Description:
The service cannot be started: Message-handling subsystem: The message manager for the default locale cannot be found. The locale will be changed to US English. Message-handling subsystem: The message manager for the default locale cannot be found. The locale will be changed to US English. The following system error occurred: The filename, directory name, or volume label syntax is incorrect. . File system error: Error occurred during the creation of directory: '\\?\'.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

On SQL Server, when I start the Analysis services, the error message is : The SQL Server Analysis Services (MSSQLSERVER) service on local computer started and then stopped. Some services stop automatically if they have no work to do, for example, the performance logs and Alerts service.

Why is that? That is really frustrated and please any of you give me any advices or help on it. Thanks a lot in advance.

With best regards,

Yours sincerely,

|||

Hi, Bryan,

Thank you for your kind advices. But another very weird problem occured now. I am not even able to restart the SQL Server 2005 Analysis Services Service now.

Event Type: Error
Event Source: MSSQLServerOLAPService
Event Category: (289)
Event ID: 0
Date: 04/07/2007
Time: 10:45:48
User: N/A
Computer: computer_name
Description:
The service cannot be started: Message-handling subsystem: The message manager for the default locale cannot be found. The locale will be changed to US English. Message-handling subsystem: The message manager for the default locale cannot be found. The locale will be changed to US English. The following system error occurred: The filename, directory name, or volume label syntax is incorrect. . File system error: Error occurred during the creation of directory: '\\?\'.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

On SQL Server, when I start the Analysis services, the error message is : The SQL Server Analysis Services (MSSQLSERVER) service on local computer started and then stopped. Some services stop automatically if they have no work to do, for example, the performance logs and Alerts service.

I have no idea what is going on and that is pretty frustrated.

I am looking forward to hearing from any of you here for your kind advices and help.

Thanks in advance.

With best regards,

Yours sincerely,

|||

Did you change something?

The error message seems similar to the one you posted on June 13 in PostID 463688. Could this be the same issue?

B.

|||

Hi, Bryan,

Thanks for your reply.

I have no idea what did I change. The only thing I did change was DataDir setting of the server property which I changed to other storage location instead of where the Analysis Services Instance was originally installed.

Does that have something to do with this problem?

Thanks a lot and I am looking forward to hearing from you shortly.

With best regards,

Yours sincerely,

|||

Changing the default DataDir of a server that is in use is a bigger deal than either BOL or the user interface lets on.

Other people have posted about similar issues before: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=500300&SiteID=1

The above posting might give you some ideas as to how to rectify the issue, it might be that the SSAS service account does not have access to the new location.

An alternative approach would be to set the DataDir back to its default setting and to just move specific cubes/partitions to an alternate location.

|||These two threads have been merged as the same question was posted twice Smile

Friday, February 17, 2012

Extracting Binary data from SQL DB to a location on the web server

Hey all,

WE have a document management system where by Adminstrators can upload documents, once the document is uploaded the binary data is stored on in a folder on the web server. We used to stored the documents in the actaul db table, but we found that there were to many documents and it was using alot of space on db server.

So my boss has decided we are now going to upload the binary data onto the web server. Currently we are donig this with new documents which have been added or documents which are gettinguploaded when reloading, but there are many documents in the db table which have not been updated and are still embedded in the db table. So i need to figure out how to go about copying the data storewd in the db table and storing it in web servers folder location.

I've tried various things for a enitre day but im going round in circiles.

MemoryStream mStream = new MemoryStream((Byte[])dtrResults["file"]);
BinaryReader bReader = new BinaryReader(mStream);
int intFileSize = (int)mStream.Length;
Byte[] byteFile = (Byte[])dtrResults["file"];

i can get to this state but then how do i create a folder on the BinaryREader to then store the binary data of the file to the location.

BinaryReader bReader2 = new BinaryReader(File.Open(strDocFolder + strSavedFileName, FileMode.Create));
int count2 = bReader2.Read(byteFile, 0, intFileSize);

bReader2.Close();

i've also tried this but when the file gets created in the folder there is no content.

i do know that the file does contain content as ive tried this and downlaoding the file from that page acctually works

string strContentTpe = WValue.WStr(dtrResults["contenttype"]);
int intFileSize = VValue.VInt(dtrResults["filesize"]);
/ Byte[] byteFile = ((Byte[])dtrResults["file"]);
//Downloads the data correctly
Response.ClearContent();
Response.ClearHeaders();
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + WValue.WStr(dtrResults["docfilename"]) + "\"");
Response.AddHeader("Content-Length", WValue.WStr(intFileSize));
Response.ContentType = strContentTpe;
Response.BinaryWrite(byteFile);

I hope ive made some snese andthat someone can hlep me.

Have a nice day

Zal


i dont think u should extract all the data by a response object .....how many files will u sit & click save .......bt just retrive the byte information from the database & send it across the network using socket programming.(dont get scared..it could be a command line utility)

while using socket programing u will need to make client which would extract the data & send it ...while at the new location could use a server which would recv data & and make files out of it.

this would only be advisable if the files are more than 50000.....

if less just write a command line utility to remove the data & store as .dat files with filenames......then physically transfer the data to new location

|||

Thanks for the advice, but it seems all a bit ot scary for me.

Ive actaully found a way of doing it by reading and writing to the reader, it might not be perfect but this code will only be used once.

Zal