Showing posts with label certain. Show all posts
Showing posts with label certain. Show all posts

Wednesday, March 28, 2012

Malicious User

Not sure if its the right place..but need help cracking this...Just
inherited a bad place......
Users access a certain share point site and browse a directory for a host of
folders.This afternoon one of the folders was deleted which has loads of
subfolders(as it is a sharepoint server).....now I need to find out who thi
s
kool dude is!...
What I have now: System state backup of the Machine,SQL full backup and the
backup(SQL and System) just after the files have
been deleted.
All I have is just Auditing for success and failure but nothing with object
access,didnt think if it would matter even if
object acess was enabled...
now...with the given situation...how do I get to this dude?Can someone
enrich my novice knowledge please?SQL server security...what do i look for
and where?
thanks
maverickHi maverick,
Not sure how Sharepoint works with SQL Server in this case but to find
out what people are using on the SQL Server level you should be using
SQL Profiler to capture a trace of all activity carried out against the
SQL Server. Hope this helps.
Jonathan
maverick wrote:
> Not sure if its the right place..but need help cracking this...Just
> inherited a bad place......
> Users access a certain share point site and browse a directory for a host
of
> folders.This afternoon one of the folders was deleted which has loads of
> subfolders(as it is a sharepoint server).....now I need to find out who t
his
> kool dude is!...
>
> What I have now: System state backup of the Machine,SQL full backup and th
e
> backup(SQL and System) just after the files have
> been deleted.
> All I have is just Auditing for success and failure but nothing with objec
t
> access,didnt think if it would matter even if
> object acess was enabled...
> now...with the given situation...how do I get to this dude?Can someone
> enrich my novice knowledge please?SQL server security...what do i look for
> and where?
>
> thanks
> maverick

Monday, March 26, 2012

making record read-only

Hi,

i want to make a certain records read-only using stored procedure. something like:

Update dbo.Articles
SET record = "read-only"
WHERE
ArticleID = @.ArticleID

(you know what i mean)

the reason i want to do that is that im publishing articles and i want to lock the articles once they're published so no body can change them unless they're unpublished.

of course i aslo want to know how to make a record read-write again.

ThanxAnswer: you can not. Row level security is not part of SQL.

What yo ucould do is a Trigger that blos and rolld back the transaction when a row has a specific value (read only flag).

But then - why the heck dont you handle this in the frontend application? Just dont let the user delete.|||well i wanted i did that in the front end.. just wanted to do it at the backend to ensure data integrity.

Thank you|||::just wanted to do it at the backend to ensure data integrity.

Sadly, this is nonsense, as this does not touch the issue of data integrity. Relational integrity has nothing to do with being able to delete something or not.

Now, in the rare case this needs to be blocked, a trigger that blows the transaction is about the only way to go :-)sql

Making only certain data show in a cell

I am building a report and would like only certain data to show in a cell.
For instance I have 8 pay codes in my select statement, but would like to
show just 4 of them in the detail section. I don't want to limit my select
statement to just the 4 because I need the other 4 in another cell of this
report. Any ideas?
Its almost like I need a where clause within my particular cell.
Thanks,
RyanAlso, I thought about using multiple data sources and create a new table, but
is there a way to link two different data sources in a report? For instance
my report is on employee id and I would need to make sure that the data from
both data sources in the row detail are for the same employee id.
"Ryan Mcbee" wrote:
> I am building a report and would like only certain data to show in a cell.
> For instance I have 8 pay codes in my select statement, but would like to
> show just 4 of them in the detail section. I don't want to limit my select
> statement to just the 4 because I need the other 4 in another cell of this
> report. Any ideas?
> Its almost like I need a where clause within my particular cell.
> Thanks,
> Ryan|||Maybe you can use Filters.
In your data properties, select tab "Filters" and configure there the values
you want to show.
Does it help?
"Ryan Mcbee" <RyanMcbee@.discussions.microsoft.com> escribió en el mensaje
news:0F3503DD-A100-47C5-B4F3-B36EE6AF8BBE@.microsoft.com...
> Also, I thought about using multiple data sources and create a new table,
> but
> is there a way to link two different data sources in a report? For
> instance
> my report is on employee id and I would need to make sure that the data
> from
> both data sources in the row detail are for the same employee id.
> "Ryan Mcbee" wrote:
>> I am building a report and would like only certain data to show in a
>> cell.
>> For instance I have 8 pay codes in my select statement, but would like to
>> show just 4 of them in the detail section. I don't want to limit my
>> select
>> statement to just the 4 because I need the other 4 in another cell of
>> this
>> report. Any ideas?
>> Its almost like I need a where clause within my particular cell.
>> Thanks,
>> Ryan|||I will give that a shot. I built some case statements in my syntax to
seperate the data better.
"Mónica" wrote:
> Maybe you can use Filters.
> In your data properties, select tab "Filters" and configure there the values
> you want to show.
> Does it help?
>
> "Ryan Mcbee" <RyanMcbee@.discussions.microsoft.com> escribió en el mensaje
> news:0F3503DD-A100-47C5-B4F3-B36EE6AF8BBE@.microsoft.com...
> > Also, I thought about using multiple data sources and create a new table,
> > but
> > is there a way to link two different data sources in a report? For
> > instance
> > my report is on employee id and I would need to make sure that the data
> > from
> > both data sources in the row detail are for the same employee id.
> >
> > "Ryan Mcbee" wrote:
> >
> >> I am building a report and would like only certain data to show in a
> >> cell.
> >> For instance I have 8 pay codes in my select statement, but would like to
> >> show just 4 of them in the detail section. I don't want to limit my
> >> select
> >> statement to just the 4 because I need the other 4 in another cell of
> >> this
> >> report. Any ideas?
> >>
> >> Its almost like I need a where clause within my particular cell.
> >>
> >> Thanks,
> >> Ryan
>
>

Friday, March 23, 2012

Making a row delete itself at a certain time?

Is there any possible way to make a row delete itself at a certain date and time? I am tring to make an "On_Sale" table and perticular items(rows) must expire at a certain Date and time. I have an idea to delete a row when it expires but it will cause an extra burden on my application. So is it possible to have SQL responsible for deleting a row at a certain time and date?

Also, I have another question:
when I asign a PK Identity to a certain column is there a way I can enforce consecutive order of PK values? For example if I delete a row and the PK value was 5 it will reoder the whole table so all PK values are in consecutive order:

PK----Item----price
1----XYZ1----$$$$
2----XYZ2----$$$$
3----XYZ3----$$$$

when I delete PK 2 this is what happens

PK----Item----price
1----XYZ1----$$$$
3----XYZ3----$$$$

the PKs are not in consecutive order

What I want is this to happen: when PK 2 is deleted I need it to show as follows

PK----Item----price
1----XYZ1----$$$$
2----XYZ3----$$$$

The PKs stay in consecutive order.

See how the PK are still in consecutive order?I am tring to make an "On_Sale" table and perticular items(rows) must expire at a certain Date and time. I have an idea to delete a row when it expires but it will cause an extra burden on my application.Why delete it at all? Save the expiration date within your row, and then create a view on that table with something like WHERE expiration_date <= current_date. Then make your application use the view to retrieve the data (or simply add the condition to your application logic), thus it will never see expired rows. If you put an index on that column the retrieval should be quite fast.

If you are concerned about space, than run a batch job every night that deletes the expired rows.|||you could create an agent job that would delete the rows also.

Monday, March 19, 2012

Make items bold in parameter selection list

Is it possible to make certain items in a parameter selection list appear bold?No, parameters are not configurable in terms of presentation.


HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||I am getting available values from a calculated member in analysis services. The definition pane for a calculated member contains a section for 'font expressions'. I tried to use that, but didn't succeed. Does anyone know what you can do with font expressions?

make a user for the database

hi
how can i make a user give it a name ReportUser and a password msdn for a certain database named on the sql server 2000 and thank you for your help and oyur timeWissam,
Let's say you have a database on SQL2000 with the name, WEBDATA.

1. Make sure your SQL Instance allows SQL Server and Windows authentication enabled
* From Enterprise Mgr, right click on your server icon, and select Properties
* In the SQL Server Properties window, and select the SECURITY tab
* Check SQL Server and Windows authentication
* You will be prompted to restart the SQL Server service - go ahead and do it (just make sure you are the only user on the databases that are running on that sql instance)
2. Create a new Login User, by going in to the SECURITY - Logins and right-click to create a 'New Login', we can call it ReportUser
3. Once that new Login is created, give it the appropriate permissions for ReportUser to access only the databases you want it to touch, as well as triggering stored procedures, etc.

I didn't want to give you all the answer, but just enough to get you rolling! :-)

Happy Learning

raj