Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Monday, March 26, 2012

Interlektual property

Hello all,

How do I protect my Interlektual property for a BI solution ( analysis services) ?

I do not want others to be able to view and change my coding ?

Thanks heaps for any advise.

To deny others to see definition of your database, you should only grant Read rights to your users.
Others can copy your design if given Admin rights to your database or ReadDefinition rights.

Create a role in your database and grant Read permissions to your users.

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

|||

I do not have access to the database but only the design of the BI solution.

It means the customer will own the database and I will deliver the BI solution.

How do I protect the solution not to be copied by someone else ?

|||

Think of BI solution as the source code for you application. The same way if you giving out application source code, same BI Solution will be open for anyone to copy your design.

Giving out BI solution is not the way to protect your intellectual property. The minute customer owns a database customer can see the metadata and the logic implemented by it.

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

Interlektual property

Hello all,

How do I protect my Interlektual property for a BI solution ( analysis services) ?

I do not want others to be able to view and change my coding ?

Thanks heaps for any advise.

To deny others to see definition of your database, you should only grant Read rights to your users.
Others can copy your design if given Admin rights to your database or ReadDefinition rights.

Create a role in your database and grant Read permissions to your users.

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

|||

I do not have access to the database but only the design of the BI solution.

It means the customer will own the database and I will deliver the BI solution.

How do I protect the solution not to be copied by someone else ?

|||

Think of BI solution as the source code for you application. The same way if you giving out application source code, same BI Solution will be open for anyone to copy your design.

Giving out BI solution is not the way to protect your intellectual property. The minute customer owns a database customer can see the metadata and the logic implemented by it.

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

Friday, March 23, 2012

Interfacing with SQL Server 2005 EXPRESS

hey howzit guys!

I am very new to SQL Server 2005 Express, my question is simple, can I only view and add database tables etc through VS 2005 when using SQL Server 2005 EXPRESS, since it does not seem to have any facilities in the Config. Manager to do this directly in SQL Server?

Did you try the managment studio express which is downloadable for SQL Server Express ?

http://www.microsoft.com/downloads/details.aspx?FamilyID=82AFBD59-57A4-455E-A2D6-1D4C98D40F6E&displaylang=en

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Monday, March 19, 2012

Intercept SQL Queries sent to DB

Anybody know of a way to view SQL Queries sent to a SQL Server 2000
box ?

I have tried using the 'current activity' option in enterprise
manager, and ODBC tracing but neither show the queries made by this
3rd party app.

I have no db schema and wondered if there was a tool to let me see the
queries sent to my sql server.

Thanks!Vlade writes:
> Anybody know of a way to view SQL Queries sent to a SQL Server 2000
> box ?
> I have tried using the 'current activity' option in enterprise
> manager, and ODBC tracing but neither show the queries made by this
> 3rd party app.
> I have no db schema and wondered if there was a tool to let me see the
> queries sent to my sql server.

Take a look at the Profiler. You find it in the SQL Server program
group.

--
Erland Sommarskog, SQL Server MVP,

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Intercept Result

Hi,

I am trying to write a system (Stored Proc, View, CLR Proc, ?), where if you query a specific table and it returns data from only 1 column for the submitted SELECT statement then substitute data obtained from an external web service.

Does anyone have any suggestions about how best to implement this? I have searched through the BOL but nothing directly deals with what I want to do.

Thanks,

Blair

P.S. I am using SQL SERVER 2005 ENT Edition with everything available.

Hi,

I'm not very clear with your question.

For substituting a result, you can use CASE within your SELECT statement.

Assuming Table1 table with Col1 as column, and a scalar valued function CLRFunction() which will call a web service,

SELECT CASE Col1
WHEN 'abc' THEN CLRFunction(1)
WHEN 'def' THEN CLRFunction(2)
END 'Col1'
FROM Table1

Here 'abc' and 'def' are the values stored in Col1 of Table1

Hope this answers for your query, else please explain your requirement with some more detail.

Regards

Babu

|||

Thanks that is exactly what I was looking for. I now know what to do.

blair

|||

Hello...

I think calling a webservie inside a SP is not a very good behavior. You should write your SPs so that they finish as fast as possible. If you try to access an outside resource you never know how long it will take(and a webservice is even worse). You should consider moving this logic into your application. Also you need to access external resources in that function, so you have to declare it as "unsafe" which will also have some implications on security...

Also it will be more complicated to make your app responsive while your code is waiting on the SQL Server. Calling a webservice async is very easy... Calling SQL is a little more work (but still no big deal)

Monday, March 12, 2012

Interactive sort not working in Tabular View

I am just starting with Sql Server reporting, but I can't get interactive sort to work for columns with aggregate fields.

I am using the following query for DataSet:

SELECT
Store.ID as StoreID,
Store.Name as StoreName,
COUNT(*) as NumReservations,
SUM(Appointment.TotalBeforeTaxes) as Revenue
FROM Store LEFT JOIN Appointment ON Store.ID=Appointment.StoreID
GROUP BY ALL Store.ID, Store.Name
ORDER BY Store.Name ASC

For report, I am using tabular data view. Interactive sorting works great for StoreID, StoreName, but doesn't work for NumReservations and Revenue fields. I turned it on for all 4 columns.

What could be causing this problem?
Figured out the problem... It just doesn't work in FireFox. Seems to work fine in IE.

Friday, March 9, 2012

Intensively used function in view needs a minimum and maximum from a table

I have a problem (who not?) with a function which i'm using in a view.
This function is a function which calculates a integer value of a
date. For example: '12/31/2004 00:00:00" becomes 20041231. This is
very handy in a datawarehouse and performes superfast. But here is my
problem.

My calendar table is limited by a couple of years. What happens is
that sometimes a value is loaded which is not in the range of the
Calendardate. What we want to do is when a date is loaded is that this
function insert a minimum date when date < minimum date and a maximum
date when date > maximum date.

Yes i know you're thinking : This is datamanipulation and yes this is
true. But now we loose information in our cubes and reports by inner
joining. So if we can use a minimum and a maximum than a user would
say: "This is strange, a lot of values on 1980/1/1!" instead of "I
think that i have not all the data!"

Greetz

HennieHi

If you LEFT or RIGHT JOIN to the calendar table you will get a NULL value
for the column, you can then is CASE to determine the value

CREATE FUNCTION ConvertDate (@.datevalue datetime)
RETURNS INT
AS
BEGIN
DECLARE @.dateint INT
SELECT @.dateint = CAST( CASE WHEN A.Date < '20030101' THEN '19800101'
WHEN A.Date > '20051231' THEN '99991231'
ELSE CONVERT(CHAR(4),C.[Year]) + RIGHT('0'+
CONVERT(VARCHAR(2),C.[Month]),2) + RIGHT('0'+ CONVERT(VARCHAR(2),C.[Day]),2)
END AS INT )
FROM ( SELECT @.datevalue AS [Date] ) A
LEFT JOIN CALENDAR C ON C.[Date] = A.[Date]
RETURN @.dateint
END
GO

John

"Hennie de Nooijer" <hdenooijer@.hotmail.com> wrote in message
news:191115aa.0412300238.7dee0f85@.posting.google.c om...
>I have a problem (who not?) with a function which i'm using in a view.
> This function is a function which calculates a integer value of a
> date. For example: '12/31/2004 00:00:00" becomes 20041231. This is
> very handy in a datawarehouse and performes superfast. But here is my
> problem.
> My calendar table is limited by a couple of years. What happens is
> that sometimes a value is loaded which is not in the range of the
> Calendardate. What we want to do is when a date is loaded is that this
> function insert a minimum date when date < minimum date and a maximum
> date when date > maximum date.
> Yes i know you're thinking : This is datamanipulation and yes this is
> true. But now we loose information in our cubes and reports by inner
> joining. So if we can use a minimum and a maximum than a user would
> say: "This is strange, a lot of values on 1980/1/1!" instead of "I
> think that i have not all the data!"
> Greetz
> Hennie|||On 30 Dec 2004 02:38:51 -0800, Hennie de Nooijer wrote:

>I have a problem (who not?) with a function which i'm using in a view.
>This function is a function which calculates a integer value of a
>date. For example: '12/31/2004 00:00:00" becomes 20041231. This is
>very handy in a datawarehouse and performes superfast. But here is my
>problem.
(snip)

Hi Hennie,

Is this conversion all that your function does? If so, you might want to
try the following alternative (using CURRENT_TIMESTAMP as example; replace
it with your date column / parameter):

SELECT CAST(CONVERT(varchar, CURRENT_TIMESTAMP, 112) AS int)

You could put this in the UDF (probably at least as fast as your current
Calenmdar-table based function), or use it inline as a replacement to the
function call (probably even faster).

It should work for all dates from Jan 1st 1753 through Dec 31st 9999.

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)

Wednesday, March 7, 2012

Integrity between table and View

It is possible to drop the table without dropping the view referencing
it. How do I force integrity?

MadhivananNo you can't. What do you mean by 'force integrity'? A view is always kept
in sync with the table(s) on which it is based.

--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine

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

"Madhivanan" <madhivanan2001@.gmail.com> wrote in message
news:1121175173.490148.91840@.g43g2000cwa.googlegro ups.com...
> It is possible to drop the table without dropping the view referencing
> it. How do I force integrity?
> Madhivanan|||Think about this for two seconds. If there is no base table, how would
you build the VIEW?|||Yes, you can drop a table when referencing views exist unless views are
created with the WITH SCHEMABINDING option. The view will be invalid in
that case. You can specify WITH SCHEMABINDING on your views to prevent
invalid views.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Madhivanan" <madhivanan2001@.gmail.com> wrote in message
news:1121175173.490148.91840@.g43g2000cwa.googlegro ups.com...
> It is possible to drop the table without dropping the view referencing
> it. How do I force integrity?
> Madhivanan|||What do you mean by 'force integrity'?

I want to get the error, This table is referenced by a view

Think about this for two seconds. If there is no base table, how would

you build the VIEW?

I think you didnot understand my question

Yes, you can drop a table when referencing views exist unless views are

created with the WITH SCHEMABINDING option.

Thanks

Madhivanan|||No error will be generated when you drop a table referenced in a view
unless the view is indexed. Maybe you can index your view(s), although
in my opionion you shouldn't need to do so just for this. Surely you
wouldn't drop a table in production without first testing your code? If
the table or view is used in code then testing will show an error. If
the table or view isn't used then it isn't relevant. MS could have
implemented it better but unfortunately they didn't.

--
David Portas
SQL Server MVP
--|||David Portas (REMOVE_BEFORE_REPLYING_dportas@.acm.org) writes:
> No error will be generated when you drop a table referenced in a view
> unless the view is indexed. Maybe you can index your view(s), although
> in my opionion you shouldn't need to do so just for this. Surely you
> wouldn't drop a table in production without first testing your code? If
> the table or view is used in code then testing will show an error. If
> the table or view isn't used then it isn't relevant. MS could have
> implemented it better but unfortunately they didn't.

You don't need to go all the way and index the view. As Dan said,
what you need is WITH SCHEMABINDING. Try this:

CREATE TABLE mytable (a int NOT NULL)
go
CREATE VIEW myview WITH SCHEMABINDING AS
SELECT a FROM mytable
go
DROP TABLE mytable -- Fails

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Ernold,

I get the error
Server: Msg 4512, Level 16, State 3, Procedure myview, Line 2
Cannot schema bind view 'myview' because name 'mytable' is invalid for
schema binding. Names must be in two-part format and an object cannot
reference itself.

Madhivanan|||Madhivanan (madhivanan2001@.gmail.com) writes:
> I get the error
> Server: Msg 4512, Level 16, State 3, Procedure myview, Line 2
> Cannot schema bind view 'myview' because name 'mytable' is invalid for
> schema binding. Names must be in two-part format and an object cannot
> reference itself.

Oops! I tested, got an error messages, was contented with that. I failed
to read the error message, though. OK, try this then:

CREATE TABLE mytable (a int NOT NULL)
go
CREATE VIEW myview WITH SCHEMABINDING AS
SELECT a FROM dbo.mytable
go
DROP TABLE mytable -- Fails

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||No it works well
Thanks Erland

Madhivanan

Sunday, February 19, 2012

Integrating Reports with ASP page

HI,

I've created reports using VS2003 n sqlserver 2000.Now I need to view these reports from ASP page.Can anybody tell me how to integrate it with ASP .Can I use report viewer control?Thanks in advance.

May

May,

I have used iFrames in the past to drop an ASPX page inside an ASP. It is messy to have these two interact, but sometimes you are stuck with it.

If you want a seemless iFrame you can use the code below inside your ASP page:

<iframe src="test.aspx"framespacing="0" border="0" frameborder="0"></iframe>

You may also wish to set these:width="100%"marginheight="0"marginwidth="0"height="500" scrolling="yes"

As far as browser compatibility goes, beware of the scrollbar and how different browsers render scrollbars.

More reference: iFrame W3c spec

Thanks,

Chelsea

|||

Thanks for the reply.
I've to show the report in a new window.There is a button on the asp page.On button click I'm passing the URL of the reportserver along with the parameter in the query string.But it is not working.I need the correct syntax for that as I'm new to ASP.
Please help me thanks in advance.Here is the part of the code:

sub ViewContact()document.frmContact.method="post" document.frmContact.target="_blank" document.frmContact.action="http://xp00025370/ReportServer?/TrinityRailSales/CallReport&iCall=1&rs:Command=Render"frmContact.submit()end sub <script>

sub ViewContact()

document.frmContact.method="post"

document.frmContact.target="_blank" document.frmContact.action="http://xp00025370/ReportServer?/TrinityRailSales/CallReport&iCall=1&rs:Command=Render" frmContact.submit()

</script>

<form name=frmContact>

<input type=button OnClick="ViewContact">

sub ViewContact()document.frmContact.method="post" document.frmContact.target="_blank" document.frmContact.action="http://xp00025370/ReportServer?/TrinityRailSales/CallReport&iCall=1&rs:Command=Render"frmContact.submit()end sub


May

|||

seems like the code got messed up-

<script>

sub ViewContact()

document.frmContact.method="post"

document.frmContact.target="_blank" document.frmContact.action="http://xp00025370/ReportServer?/TriSales/CallReport&iCall=1&rs:Command=Render "

frmContact.submit()

</script>

<form name=frmContact>

<input type=button Onclick="ViewContact">

Thanks

May