Wednesday, September 18, 2013

[SQL 2012] FileStream

[SQL 2012] FileStream


FileStream

Posted: 18 Sep 2013 02:07 AM PDT

Hello.I have a database with 2 filestreams and i create tables with a column varbinary(max) to a filestream and others tables with that column to the other filestream.How do i can to know which parent filestream a table?Thanks.

Would Always-On Groups be a decent solution for this?

Posted: 17 Sep 2013 11:59 PM PDT

So, my employer (may) be frowning on after-hours work (even though it's a *bad* thing to take down a production SQL during the day to reboot from OS updates that they require to be installed by a certain date) and I'm looking to get some options lined up to resolve this.While a SQL cluster would be a solution, they started migrating to a VMWare environment before I started, and just recently decomissioned the last physical SQL servers (in a cluster no less) a couple months ago.So, I thought of AAGs. It sounds like this would let me do the OS updates (which on my SQL servers I am responsible for) by the following method:1. Update the replica (which would not be configured for read-only access)2. Reboot the replica3. Wait for the DBs to re-synch4. Manually (planned) failover the AAG DBs to the replica, making it the Primary5. Repeat steps 1-4, replacing "replica" with "primary" (although technically the former primary would now be the replica because of step 4)6. Go home at my normally scheduled time, and only connect in to work if something breaks...I've set up a very basic AAG at home in a VM environment without to much hassle, so that part I think I could manage.I'm also presuming that any SQL Agent jobs would need to be configured on *both* hosts, as you can't make system DBs part of an AAG (one downside compared to a cluster, at least.)Am I on the right track? Or at least a reasonable one, if this becomes a requirement?Thanks,Jason

Printed Books Vs E-Books

Posted: 17 Sep 2013 10:43 PM PDT

;-)

SSRS reportsolution file

Posted: 17 Sep 2013 09:50 PM PDT

Hi,I have a report URL and I can see some of the reports on the URL. But where can I see the visual studio solution file to edit the report. Is there a way/option to find the solution file part from the report URL?Thanks.

Sql Server Authentication

Posted: 17 Sep 2013 04:29 PM PDT

Please help me, what are the system procedures and system functions that are used for validating whether a user is a valid user or not when we click on "connect" button for sql server 2008.

SSAS Forum

Posted: 17 Sep 2013 06:14 PM PDT

All,My first question is that whether this is right forum for Analysis services posts because I have posted my question relating to only T-SQL and Administration. If not Please suggest me a better forum for that.

HELP! Service Broker is dropping messages

Posted: 17 Sep 2013 09:42 AM PDT

I've set up a simple service broker implementation where I have a sender queue on one database and a reciever queue on another database. I've noticed that randomly, about 50% of the messages are dropped and do not show up in either the sender or reciever queues, even after waiting several minutes. To test this, I run a query that puts four messages in the queue, then shows the contents of the sender and receiver queues. After sending four messages, I never see anything in the sender queue, but I'll see anwhere from 1-4 messages in the receiver queue and there is no pattern to what messages are getting dropped. I tried tracing all of the broker messages and don't see any indication of errors. Instead, I see this pattern of traces show up for all four messages, regardless of whether they are dropped or not: STARTED_OUTBOUND CONVERSING STARTED_INBOUND CONVERSING DISCONNECTED_OUTBOUND DISCONNECTED_INBOUND CLOSEDI am running out of ideas of how to get brokering to work right. Any advice?-eHere's my test script:[code]Use SenderDatabaseEXEC [MySignaling].[SendSignal] '<Foo>A1</Foo>'EXEC [MySignaling].[SendSignal] '<Foo>B1</Foo>'EXEC [MySignaling].[SendSignal] '<Foo>C1</Foo>'EXEC [MySignaling].[SendSignal] '<Foo>D1</Foo>'SELECT * From MySignaling.SignalDefaultSenderQueueUse ReceiverDatabaseSELECT * From MySignaling.SignalReceiverQueue[/code] Here is the SendSignal SP:[code]CREATE PROCEDURE [MySignaling].[SendSignal] ( @signal XML, @senderService SYSNAME = 'MySignaling_SignalDefaultSenderService' ) AS DECLARE @SBDialog UNIQUEIDENTIFIER; BEGIN DIALOG CONVERSATION @SBDialog FROM SERVICE @senderService TO SERVICE 'MySignaling_SignalReceiverService' ON CONTRACT [MySignaling_SignalContract] WITH ENCRYPTION = OFF; SEND ON CONVERSATION @SBDialog MESSAGE TYPE [MySignaling_Signal] (@signal); END CONVERSATION @SBDialog; RETURN;[/code]And here's the setup code for the two databases:[code]ALTER DATABASE ReceiverDatabase SET ENABLE_BROKERGoALTER DATABASE ReceiverDatabase SET TRUSTWORTHY ONGoALTER DATABASE SenderDatabase SET ENABLE_BROKERGoALTER DATABASE SenderDatabase SET TRUSTWORTHY ONGo----------------------------------------------------- Set up Receiver---------------------------------------------------USE ReceiverDatabaseGoCREATE SCHEMA [MySignaling];GoCREATE MESSAGE TYPE [MySignaling_Signal] VALIDATION = WELL_FORMED_XML;GOCREATE CONTRACT [MySignaling_SignalContract] ([MySignaling_Signal] SENT BY INITIATOR);GOCREATE QUEUE [MySignaling].[SignalReceiverQueue] WITH STATUS = ON , RETENTION = OFF , POISON_MESSAGE_HANDLING (STATUS = OFF);GOCREATE SERVICE [MySignaling_SignalReceiverService] ON QUEUE [MySignaling].[SignalReceiverQueue] ([MySignaling_SignalContract]);Go----------------------------------------------------- Set up Sender---------------------------------------------------USE SenderDatabaseGoCREATE SCHEMA [MySignaling];GoCREATE MESSAGE TYPE [MySignaling_Signal] VALIDATION = WELL_FORMED_XML;GOCREATE CONTRACT [MySignaling_SignalContract] ([MySignaling_Signal] SENT BY INITIATOR);GOCREATE QUEUE [MySignaling].[SignalDefaultSenderQueue] WITH STATUS = ON , RETENTION = OFF , POISON_MESSAGE_HANDLING (STATUS = OFF);GOCREATE SERVICE [MySignaling_SignalDefaultSenderService] ON QUEUE [MySignaling].[SignalDefaultSenderQueue] ([MySignaling_SignalContract]);GOCREATE PROCEDURE [MySignaling].[SendSignal] ( @signal XML, @senderService SYSNAME = 'MySignaling_SignalDefaultSenderService' ) AS DECLARE @SBDialog UNIQUEIDENTIFIER; BEGIN DIALOG CONVERSATION @SBDialog FROM SERVICE @senderService TO SERVICE 'MySignaling_SignalReceiverService' ON CONTRACT [MySignaling_SignalContract] WITH ENCRYPTION = OFF; SEND ON CONVERSATION @SBDialog MESSAGE TYPE [MySignaling_Signal] (@signal); END CONVERSATION @SBDialog; RETURN;[/code]

HELP - MDX QUERY - EXCEPTION or MINUS

Posted: 17 Sep 2013 08:36 AM PDT

HY guys, my second time here!I'm work with MDX query in my job and i need a little help please.I need to use the hierarchy [CFOP]. [FINANCIAL OPERATION]be removed from the items below in the query in the end of this post: [CFOP].[OPERAÇÃO FINANCEIRA].&[7105], [CFOP].[OPERAÇÃO FINANCEIRA].&[511], [CFOP].[OPERAÇÃO FINANCEIRA].&[611], [CFOP].[OPERAÇÃO FINANCEIRA].&[512]I can not select all the items they are more than 5000 and makes difficult understanding of query and the same will be used in a procedure.Is there any way? found minus and except it did not work for meI appreciate if someone can help.QUERY:SELECT { [Measures].[REC LIQ FRETE], [Measures].[DESP FRETE], [Measures].[REC LIQ PROD] } ON COLUMNS, { ([LOJA].[ORGANIZAÇÃO].[MARCA].ALLMEMBERS * [ITEM].[ESTRUTURA ITEM].[DEPARTAMENTO].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( { [CFOP].[OPERAÇÃO FINANCEIRA].[All] } ) ON COLUMNS FROM ( SELECT ( { [GERENCIA].[ESTRUTURA GERENCIAL].[All] } ) ON COLUMNS FROM ( SELECT ( { [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[8], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[9], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[2], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[1], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[7], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[6], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[-1], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].&[5] } ) ON COLUMNS FROM ( SELECT ( { [ORGANIZACAO_CD_AF].[ORGANIZAÇÃO CD].[All] } ) ON COLUMNS FROM ( SELECT ( { [MOVIMENTO].[MOVIMENTO].&[2] } ) ON COLUMNS FROM ( SELECT ( { [STATUS_FATURAMENTO].[STATUS FATURAMENTO].[STATUS].&[ATIVO] } ) ON COLUMNS FROM ( SELECT ( { [LOJA].[ORGANIZAÇÃO].[MARCA].&[1], [LOJA].[ORGANIZAÇÃO].[MARCA].&[2], [LOJA].[ORGANIZAÇÃO].[MARCA].&[3], [LOJA].[ORGANIZAÇÃO].[MARCA].&[7], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[26], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[28], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[34], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[22], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[29], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[35], [LOJA].[ORGANIZAÇÃO].[UNIDADE DE NEGÓCIO].&[43] } ) ON COLUMNS FROM ( SELECT ( { [DATA_CONTABIL].[DATA CONTÁBIL].[MÊS].&[2013]&[1] } ) ON COLUMNS FROM [ANALISE_FATURAMENTO_SB])))))))) WHERE ( [DATA_CONTABIL].[DATA CONTÁBIL].[MÊS].&[2013]&[1], [STATUS_FATURAMENTO].[STATUS FATURAMENTO].[STATUS].&[ATIVO], [MOVIMENTO].[MOVIMENTO].&[2], [ORGANIZACAO_CD_AF].[ORGANIZAÇÃO CD].[All], [TIPO_DOCUMENTO].[TIPO DOCUMENTO].CurrentMember, [GERENCIA].[ESTRUTURA GERENCIAL].[All], [CFOP].[OPERAÇÃO FINANCEIRA].[All] ) THNK YOU

Passing parameters From One Project To Another Project In SSIS 2012

Posted: 17 Sep 2013 05:41 AM PDT

I am Using SSIS 2012 & Created 2 Projects A & BProject A Master_Package (Includes Project A/Packages 1,2,3) Package1 Package2 Package3 Project B Master_Package (Includes Project B/Packages 1,2,3) Package1 Package2 Package3 I Am Calling Project B (Master_Package) From Project A (Master_Package) Using (EXEC [SSISDB].[catalog].[start_execution])But i Also Want Pass Some Values From Project A (Master_Package) To Project B (Master_Package)..... How Can i Do this ?

No comments:

Post a Comment

Search This Blog