Showing posts with label figure. Show all posts
Showing posts with label figure. Show all posts

Sunday, March 25, 2012

Authentication Quirk

For some reason that I cannot figure out, some users are prompted for a
username and password when they request data in some reports. They can access
the reports OK, and choose the parameters OK, but then when they try to view
the report, they are prompted for credentials. If they click Cancel, the
report runs fine and the data is retrieved.
Any initial ideas?Do you have the datasource the report is using set to:
Connect Using:
The credentials supplied by the user running the report?
Adrian M.
"Mark Parter" <MarkParter@.discussions.microsoft.com> wrote in message
news:5D8230E0-EA56-4673-A88F-91E7C54F9DE8@.microsoft.com...
> For some reason that I cannot figure out, some users are prompted for a
> username and password when they request data in some reports. They can
> access
> the reports OK, and choose the parameters OK, but then when they try to
> view
> the report, they are prompted for credentials. If they click Cancel, the
> report runs fine and the data is retrieved.
> Any initial ideas?|||Thanks for replying.
To answer your question, no. The data source has the "Credentials stored
securely in the report server" option selected with the additional "Use as
Windows credentials when connecting to the data source" also selected.
Thanks.
"Adrian M." wrote:
> Do you have the datasource the report is using set to:
> Connect Using:
> The credentials supplied by the user running the report?
> Adrian M.
> "Mark Parter" <MarkParter@.discussions.microsoft.com> wrote in message
> news:5D8230E0-EA56-4673-A88F-91E7C54F9DE8@.microsoft.com...
> > For some reason that I cannot figure out, some users are prompted for a
> > username and password when they request data in some reports. They can
> > access
> > the reports OK, and choose the parameters OK, but then when they try to
> > view
> > the report, they are prompted for credentials. If they click Cancel, the
> > report runs fine and the data is retrieved.
> >
> > Any initial ideas?
>
>|||hmm, odd...
Some ideas, try the article http://support.microsoft.com/kb/842517
hth
Adrian M.
"Mark Parter" <MarkParter@.discussions.microsoft.com> wrote in message
news:FBAE3BCE-F1D9-4B02-AAAF-44199ADF3744@.microsoft.com...
> Thanks for replying.
> To answer your question, no. The data source has the "Credentials stored
> securely in the report server" option selected with the additional "Use as
> Windows credentials when connecting to the data source" also selected.
> Thanks.
> "Adrian M." wrote:
>> Do you have the datasource the report is using set to:
>> Connect Using:
>> The credentials supplied by the user running the report?
>> Adrian M.
>> "Mark Parter" <MarkParter@.discussions.microsoft.com> wrote in message
>> news:5D8230E0-EA56-4673-A88F-91E7C54F9DE8@.microsoft.com...
>> > For some reason that I cannot figure out, some users are prompted for a
>> > username and password when they request data in some reports. They can
>> > access
>> > the reports OK, and choose the parameters OK, but then when they try to
>> > view
>> > the report, they are prompted for credentials. If they click Cancel,
>> > the
>> > report runs fine and the data is retrieved.
>> >
>> > Any initial ideas?
>>|||Thanks for taking the time to help/post Adrian. For some unknown reason, the
problem has allegedly vanished. I say allegedly as a colleague informed me
yesterday that it was now working Ok for him but as I wasn't in the office
yesterday, I won't be able to confirm till Monday.
Fingers crossed.
"Adrian M." wrote:
> hmm, odd...
> Some ideas, try the article http://support.microsoft.com/kb/842517
> hth
> Adrian M.
> "Mark Parter" <MarkParter@.discussions.microsoft.com> wrote in message
> news:FBAE3BCE-F1D9-4B02-AAAF-44199ADF3744@.microsoft.com...
> > Thanks for replying.
> >
> > To answer your question, no. The data source has the "Credentials stored
> > securely in the report server" option selected with the additional "Use as
> > Windows credentials when connecting to the data source" also selected.
> >
> > Thanks.
> >
> > "Adrian M." wrote:
> >
> >> Do you have the datasource the report is using set to:
> >>
> >> Connect Using:
> >> The credentials supplied by the user running the report?
> >>
> >> Adrian M.
> >>
> >> "Mark Parter" <MarkParter@.discussions.microsoft.com> wrote in message
> >> news:5D8230E0-EA56-4673-A88F-91E7C54F9DE8@.microsoft.com...
> >> > For some reason that I cannot figure out, some users are prompted for a
> >> > username and password when they request data in some reports. They can
> >> > access
> >> > the reports OK, and choose the parameters OK, but then when they try to
> >> > view
> >> > the report, they are prompted for credentials. If they click Cancel,
> >> > the
> >> > report runs fine and the data is retrieved.
> >> >
> >> > Any initial ideas?
> >>
> >>
> >>
>
>

Thursday, March 8, 2012

Auditing a table for SQL Server

I'm a programmer, and not a DBA, so I need some help here. I'm trying to figure out how to set up some auditing within a production database.

Basically what I have to do is, I need to log all record deletions from a particular table. I've been looking through SQL Profiler, but so far I haven't been able to figure out how to do this.

Any help would be greatly appreciated.

Thanks.Best way would probably be to implement a trigger on the table that inserts the deleted record into a backup table, alnog with the date it was deleted. This table would have to get purged every once in a while, in order to make sure that it itself does not become larger than the table you are auditing, though. Hope this helps.|||Or add buisness logic. On our 'user' table, we shut them off with a datetime column, rather than delete them, for example.|||If you can afford then use Lumigent's (http://www.lumigent.com) ENTEGRA which is best used tool to audit the database events at all levels.

Friday, February 24, 2012

Attribute AggregationUsage Setting

I can't figure out where to set the aggregationussage property of an attribute to unrestricted?

In the cube designer in BIDS. Open the cube designer. Go to the cube structure tab. In the bottom-left, select Dimension Attributes. Expand a dimension, highlight an attribute, and open its properties. The property should be at the top.

B.

Sunday, February 19, 2012

Attempted Brute Force Attacks

It is not uncommon for me to review the event logs of our SQL Server and notice that someone is attempting to figure out the password for one of the SQL user accounts.......especially the "sa" username. But lately our SQL server has to be rebooted to where it is starting to become a nightly thing.

Last night the SQL Server was bombarded with attempted failed connections for 2 hours before it finally gave a blank BSOD. The SQL Server in question is in mixed mode and is a shared server. Strictly using Windows Authentication mode is not an option for us. The server has "beefy" hardware and has all updates and patches.

Sometimes, when I log on the server and notice that an IP address is making such attacks on the server, I put up an IPSEC policy against that IP. But that is not a good solution for reasons I dont think need to be outlined here.

So my question is, what can I do to better protect our SQL Server from these types of attacks? My thought on these attacks is not different than a DDOS that eventually takes the server down.

I have already done TCP/IP Hardening but not sure what else to do.

Thank you all for your replies.That sounds like Blaster to me. First order of business, patch your server, preferably to sp3a.

Next, consider killing port 1434 (and maybe 1433) at your firewall. That means that your SQL Server won't be visible outside the firewall, so this might not be a viable solution.

-PatP|||1434 is NIC Filtered as well as protected by IPSEC and Firewall.

1433 cannot be blocked becuase this is a public SQL Server used by many of our clients.

I already scanned the machine for Blaster and it is not affected. But thank you very much for your reply.|||Another solution might be to implement some form of challenge-response mechanism. For instance, if the access to the SQL Server is via a web page, have that web page (or one of its predecessors) enable the specific IP or MAC address for port 1433 for some arbitrary period of time. If the access is via a two-tier client, use an RPC to do the same thing. This will effecitvely cut off your SQL Server from all but pre-approved machines, and it is much less cumbersome for the user than using VPN to acheive similar results.

-PatP

Monday, February 13, 2012

Attaching data at differnet levels in a heirchy

I don't think this is too complex, but I can't figure out what what the correct solution is.

I have 6 tables: Customer, Project, Rate, Hours, EquipmentType, Equipment

All projects belong to a customer, so customers have a PK CustomerId and Project has a PK {CustomerId, ProjectId} where CustomerId is a FK to Customer.

A rate can be defined as being at a project level or a Customer level. A project must specify if it is using the customer level rates or its own rates.

So what I wanted to do at first was creat the key in Rate as {CustomerId, ProjectId NULLABLE, EquipmentTypeId}. The idea being that a NULL ProjectId would mean that the Rate was Customer level since it didn't point to a project.

But of course that won't work. In addition to SQL Server not allowing a PK with a NULLABLE it would also mess up my relationship between Rate and Hours.

I wanted to specify in Hours the Rate, Project (and Customer), and Equipment and Equipment type.

I didn't want to create 2 rate tables, one for Customer level rates and one for Project level rates, but is that what I should have done?

I hope this is a clear explanation.

Does anyone have a better idea how to create what I want.It is hard to give you advice without seeing any data.
But I don't think Project table should have CustormerID at all.
Usually people create Customer table with CustormerID PK and
Project table with ProjectID PK and in between for multi-to-multi relationships you should have CustomerProgect table with CustomerID, ProjectID PK and CustomerID FK and ProjectID FK.
The same is with a Rate. Just create Rate table with column RateType where you can store C or P meaning Customer or Project type rate.
And in between just create Customer_Rate table with CustormerID, RateID PK and corresponding foreign keys.

Hope it helps.

attaching a ms access project file to SQL Server 2005 Express

I have some sample files from the Access Inside OUt 2003 book I want to
attach to my server. I can't figure out how to be able to connect to them
from the Server?
I can't connect to them from the SQL Server at all So I am trying to attach
them with this batch script.
I run this from the document window in SQL Server Management Studio :
sp_attach_db "ContactsSQL",
"C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
"C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
and I get this error message:
sg 5120, Level 16, State 101, Line 1
Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
I changed the user account control to on so how can I read this access
project file from the SQL Server?
thanks
Hi
Have you checked that there is not a typing mistake in the batch file and
that you have the correct name for the log file? Check the file permissions
on each of these files. Alternatively you can rename the log file you have
and try sp_attach_single_file_db
John
"Janis" wrote:

> I have some sample files from the Access Inside OUt 2003 book I want to
> attach to my server. I can't figure out how to be able to connect to them
> from the Server?
> I can't connect to them from the SQL Server at all So I am trying to attach
> them with this batch script.
> I run this from the document window in SQL Server Management Studio :
> sp_attach_db "ContactsSQL",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> and I get this error message:
> sg 5120, Level 16, State 101, Line 1
> Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
> I changed the user account control to on so how can I read this access
> project file from the SQL Server?
> thanks
|||Thanks for your answer. I tried some connections and then I ran the batch
and I get another response.
Msg 1801, Level 16, State 3, Line 1
Database 'ContactsSQL' already exists. Choose a different database name.
I don't understand what is going on here. So I have the contactsSQL
database supposed connected. I don't see any contact tables listed in the
database engine. I registered the connection. I have the Contacts access
project file open and the connection tested okay. I don't understand how
they are connected because there are no dbo.tables in the Access objects. I
am using Access 2008 and Vista.
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Have you checked that there is not a typing mistake in the batch file and
> that you have the correct name for the log file? Check the file permissions
> on each of these files. Alternatively you can rename the log file you have
> and try sp_attach_single_file_db
> John
> "Janis" wrote:
|||One possibility:
Since you copied the *.mdf/*.ldf file from CD coming with the book, the
files are read-only. You need to clear the "Read ONly" bit first
(rigth-click the files and select "Properties").
"Janis" <Janis@.discussions.microsoft.com> wrote in message
news:5FA5913E-2B03-4756-88CB-FFC8AC8F27AB@.microsoft.com...
>I have some sample files from the Access Inside OUt 2003 book I want to
> attach to my server. I can't figure out how to be able to connect to them
> from the Server?
> I can't connect to them from the SQL Server at all So I am trying to
> attach
> them with this batch script.
> I run this from the document window in SQL Server Management Studio :
> sp_attach_db "ContactsSQL",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> and I get this error message:
> sg 5120, Level 16, State 101, Line 1
> Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is
> denied.)".
> I changed the user account control to on so how can I read this access
> project file from the SQL Server?
> thanks
|||When I try to Use the database then I get this message:
Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'contacts'. No entry
found with that name. Make sure that the name is entered correctly.
So it appears I haven't really connected to the database even though it
passed the connection test.
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Have you checked that there is not a typing mistake in the batch file and
> that you have the correct name for the log file? Check the file permissions
> on each of these files. Alternatively you can rename the log file you have
> and try sp_attach_single_file_db
> John
> "Janis" wrote:
|||Hi Janis
In one post you call the database contacts and the other contactsSQL.
John
"Janis" wrote:
[vbcol=seagreen]
> When I try to Use the database then I get this message:
> Msg 911, Level 16, State 1, Line 1
> Could not locate entry in sysdatabases for database 'contacts'. No entry
> found with that name. Make sure that the name is entered correctly.
> So it appears I haven't really connected to the database even though it
> passed the connection test.
> "John Bell" wrote:
|||You are right again. thanks, I thought they were all access files. I just
looked at the extensions and it is a SQL Server file which I attached to. I
still haven't gotten connected to the adp file yet but I thought I did.
Thanks for noticing it.
"John Bell" wrote:
[vbcol=seagreen]
> Hi Janis
> In one post you call the database contacts and the other contactsSQL.
> John
> "Janis" wrote:

attaching a ms access project file to SQL Server 2005 Express

I have some sample files from the Access Inside OUt 2003 book I want to
attach to my server. I can't figure out how to be able to connect to them
from the Server?
I can't connect to them from the SQL Server at all So I am trying to attach
them with this batch script.
I run this from the document window in SQL Server Management Studio :
sp_attach_db "ContactsSQL",
"C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
"C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
and I get this error message:
sg 5120, Level 16, State 101, Line 1
Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
I changed the user account control to on so how can I read this access
project file from the SQL Server?
thanksHi
Have you checked that there is not a typing mistake in the batch file and
that you have the correct name for the log file? Check the file permissions
on each of these files. Alternatively you can rename the log file you have
and try sp_attach_single_file_db
John
"Janis" wrote:
> I have some sample files from the Access Inside OUt 2003 book I want to
> attach to my server. I can't figure out how to be able to connect to them
> from the Server?
> I can't connect to them from the SQL Server at all So I am trying to attach
> them with this batch script.
> I run this from the document window in SQL Server Management Studio :
> sp_attach_db "ContactsSQL",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> and I get this error message:
> sg 5120, Level 16, State 101, Line 1
> Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
> I changed the user account control to on so how can I read this access
> project file from the SQL Server?
> thanks|||Thanks for your answer. I tried some connections and then I ran the batch
and I get another response.
Msg 1801, Level 16, State 3, Line 1
Database 'ContactsSQL' already exists. Choose a different database name.
I don't understand what is going on here. So I have the contactsSQL
database supposed connected. I don't see any contact tables listed in the
database engine. I registered the connection. I have the Contacts access
project file open and the connection tested okay. I don't understand how
they are connected because there are no dbo.tables in the Access objects. I
am using Access 2008 and Vista.
"John Bell" wrote:
> Hi
> Have you checked that there is not a typing mistake in the batch file and
> that you have the correct name for the log file? Check the file permissions
> on each of these files. Alternatively you can rename the log file you have
> and try sp_attach_single_file_db
> John
> "Janis" wrote:
> > I have some sample files from the Access Inside OUt 2003 book I want to
> > attach to my server. I can't figure out how to be able to connect to them
> > from the Server?
> > I can't connect to them from the SQL Server at all So I am trying to attach
> > them with this batch script.
> >
> > I run this from the document window in SQL Server Management Studio :
> > sp_attach_db "ContactsSQL",
> > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> >
> > and I get this error message:
> > sg 5120, Level 16, State 101, Line 1
> > Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> > Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
> >
> > I changed the user account control to on so how can I read this access
> > project file from the SQL Server?
> > thanks|||One possibility:
Since you copied the *.mdf/*.ldf file from CD coming with the book, the
files are read-only. You need to clear the "Read ONly" bit first
(rigth-click the files and select "Properties").
"Janis" <Janis@.discussions.microsoft.com> wrote in message
news:5FA5913E-2B03-4756-88CB-FFC8AC8F27AB@.microsoft.com...
>I have some sample files from the Access Inside OUt 2003 book I want to
> attach to my server. I can't figure out how to be able to connect to them
> from the Server?
> I can't connect to them from the SQL Server at all So I am trying to
> attach
> them with this batch script.
> I run this from the document window in SQL Server Management Studio :
> sp_attach_db "ContactsSQL",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> and I get this error message:
> sg 5120, Level 16, State 101, Line 1
> Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is
> denied.)".
> I changed the user account control to on so how can I read this access
> project file from the SQL Server?
> thanks|||When I try to Use the database then I get this message:
Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'contacts'. No entry
found with that name. Make sure that the name is entered correctly.
So it appears I haven't really connected to the database even though it
passed the connection test.
"John Bell" wrote:
> Hi
> Have you checked that there is not a typing mistake in the batch file and
> that you have the correct name for the log file? Check the file permissions
> on each of these files. Alternatively you can rename the log file you have
> and try sp_attach_single_file_db
> John
> "Janis" wrote:
> > I have some sample files from the Access Inside OUt 2003 book I want to
> > attach to my server. I can't figure out how to be able to connect to them
> > from the Server?
> > I can't connect to them from the SQL Server at all So I am trying to attach
> > them with this batch script.
> >
> > I run this from the document window in SQL Server Management Studio :
> > sp_attach_db "ContactsSQL",
> > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> >
> > and I get this error message:
> > sg 5120, Level 16, State 101, Line 1
> > Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> > Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
> >
> > I changed the user account control to on so how can I read this access
> > project file from the SQL Server?
> > thanks|||Hi Janis
In one post you call the database contacts and the other contactsSQL.
John
"Janis" wrote:
> When I try to Use the database then I get this message:
> Msg 911, Level 16, State 1, Line 1
> Could not locate entry in sysdatabases for database 'contacts'. No entry
> found with that name. Make sure that the name is entered correctly.
> So it appears I haven't really connected to the database even though it
> passed the connection test.
> "John Bell" wrote:
> > Hi
> >
> > Have you checked that there is not a typing mistake in the batch file and
> > that you have the correct name for the log file? Check the file permissions
> > on each of these files. Alternatively you can rename the log file you have
> > and try sp_attach_single_file_db
> >
> > John
> >
> > "Janis" wrote:
> >
> > > I have some sample files from the Access Inside OUt 2003 book I want to
> > > attach to my server. I can't figure out how to be able to connect to them
> > > from the Server?
> > > I can't connect to them from the SQL Server at all So I am trying to attach
> > > them with this batch script.
> > >
> > > I run this from the document window in SQL Server Management Studio :
> > > sp_attach_db "ContactsSQL",
> > > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> > > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> > >
> > > and I get this error message:
> > > sg 5120, Level 16, State 101, Line 1
> > > Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> > > Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
> > >
> > > I changed the user account control to on so how can I read this access
> > > project file from the SQL Server?
> > > thanks|||You are right again. thanks, I thought they were all access files. I just
looked at the extensions and it is a SQL Server file which I attached to. I
still haven't gotten connected to the adp file yet but I thought I did.
Thanks for noticing it.
"John Bell" wrote:
> Hi Janis
> In one post you call the database contacts and the other contactsSQL.
> John
> "Janis" wrote:
> > When I try to Use the database then I get this message:
> > Msg 911, Level 16, State 1, Line 1
> > Could not locate entry in sysdatabases for database 'contacts'. No entry
> > found with that name. Make sure that the name is entered correctly.
> >
> > So it appears I haven't really connected to the database even though it
> > passed the connection test.
> >
> > "John Bell" wrote:
> >
> > > Hi
> > >
> > > Have you checked that there is not a typing mistake in the batch file and
> > > that you have the correct name for the log file? Check the file permissions
> > > on each of these files. Alternatively you can rename the log file you have
> > > and try sp_attach_single_file_db
> > >
> > > John
> > >
> > > "Janis" wrote:
> > >
> > > > I have some sample files from the Access Inside OUt 2003 book I want to
> > > > attach to my server. I can't figure out how to be able to connect to them
> > > > from the Server?
> > > > I can't connect to them from the SQL Server at all So I am trying to attach
> > > > them with this batch script.
> > > >
> > > > I run this from the document window in SQL Server Management Studio :
> > > > sp_attach_db "ContactsSQL",
> > > > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.mdf",
> > > > "C:\Microsoft Press\Access 2003 Inside Out\SQL\ContactsSQL.ldf"
> > > >
> > > > and I get this error message:
> > > > sg 5120, Level 16, State 101, Line 1
> > > > Unable to open the physical file "C:\Microsoft Press\Access 2003 Inside
> > > > Out\SQL\ContactsSQL.ldf". Operating system error 5: "5(Access is denied.)".
> > > >
> > > > I changed the user account control to on so how can I read this access
> > > > project file from the SQL Server?
> > > > thanksJoh