Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Friday, March 30, 2012

putting user accounts on the database

hii all;

My question is from 2 sections:

1- Is it secure to put user accounts (userName and password ...) on the database?

2- How can I set username and password for SQL server 2005 express file?

Thanks

Hi Abdul-Rahman,

"1- Is it secure to put user accounts (userName and password ...) on the database?"

Actually, the fact that you have concerns about storing the passwords in the database show that it isn′t secure :-) In my past project with SQL Server 2000, I always used a encryption function in the middle tier which encrypted the password, send the encrypted text to SQL Server which did the comparison of the stored and send encrypted password. So the logic and the security layer was on the middle tier. In SQL Server 2005 there are more security enhancements like enryption of data:

http://www.databasejournal.com/features/mssql/article.php/3483931

AFAIK, there is no password on the database file. If you have access to attach the database file you are free to attach it, but as somebody has another opinion or facts about that, I would be glad to hear that.

HTH; Jens Suessmeyer.

|||

(1) You can protect information in various ways. But to decide how secure your protection scheme is you should provide additional information: how do you use that information and against whom you are trying to protect it?

(2) What file are you referring to? Please provide additional information.

Thanks
Laurentiu

|||

Hi all;

First, my application is based on storing some data about customers, and I hope to make something to prevent anyone from opening or connecting to the database directly and watching or editing its data, but instead, specific users can enter an application that can deal with data in tables.

I think there's a way, because I see some where connection string that has something like: "... username=someUser ... password=pw..."

and I think this means the program enters the password to enter the DB.

"(2) What file are you referring to? Please provide additional information"

SQL2005 Express File, which ends with .mdf extension.

Thanks

|||

(1) SQL Server can do the authentication for you, which means you don't have to store passwords in a table and process them yourself. See Books Online, the topics on creating logins and users (CREATE LOGIN, CREATE USER). SQL Server 2005 stores SHA1 hashes of the SQL login passwords and the hashes are only visible to system administrators. If you use Windows authentication, no password is stored in the server. Books Online has more information on this:

http://msdn2.microsoft.com/en-us/library/ms130214.aspx

(2) There is no password for mdf files. If you store sensitive information in the database, you should look at the encryption features. To protect the mdf file, you should restrict access to it in Windows.

Thanks

Laurentiu

Wednesday, March 28, 2012

Put Windows Logs into SQL

Hi!
I am looking into a way to put Windows Logs into SQL Server database
and to be able to query them for specific information. Anybody know
the tool that I can use and be able to schedule it to run on a weekly
basis?
Thank you,
T.tolcis,
In Windows Scripting you can use the WMI datareader to read the Event Logs
into a structured resultset. Then you can use ADO to insert the rows into a
table. I don't have any examples handy, but this link might have what you
need. If not search Google.
http://www.databasejournal.com/feat...cle.php/1503181
-- Bill
"tolcis" <nytollydba@.gmail.com> wrote in message
news:1172591825.527761.216540@.8g2000cwh.googlegroups.com...
> Hi!
> I am looking into a way to put Windows Logs into SQL Server database
> and to be able to query them for specific information. Anybody know
> the tool that I can use and be able to schedule it to run on a weekly
> basis?
> Thank you,
> T.
>sql

Put Windows Logs into SQL

Hi!
I am looking into a way to put Windows Logs into SQL Server database
and to be able to query them for specific information. Anybody know
the tool that I can use and be able to schedule it to run on a weekly
basis?
Thank you,
T.
tolcis,
In Windows Scripting you can use the WMI datareader to read the Event Logs
into a structured resultset. Then you can use ADO to insert the rows into a
table. I don't have any examples handy, but this link might have what you
need. If not search Google.
http://www.databasejournal.com/features/mssql/article.php/1503181
-- Bill
"tolcis" <nytollydba@.gmail.com> wrote in message
news:1172591825.527761.216540@.8g2000cwh.googlegrou ps.com...
> Hi!
> I am looking into a way to put Windows Logs into SQL Server database
> and to be able to query them for specific information. Anybody know
> the tool that I can use and be able to schedule it to run on a weekly
> basis?
> Thank you,
> T.
>

Wednesday, March 21, 2012

Punctuation ?

Hi
I have this simple and working well SQL-row:

MyCommand = New SqlDataAdapter("SELECT * From Tbl_Table where Type = '" & TestType.tostring & "' ", MyConnection)

----
Then I have this one which I am very proud of because I can retrieve any word or part of word from the Item-field:

Test_Text=(Session("session-Text").tostring)

Dim val1, val2, val3 as string
val1 = Test_Text
val2 = "%"
val3= val1 + val2

MyCommand = New SqlDataAdapter("SELECT * From Tbl_Table where Item Like '%" & val1 & " %' OR Item Like '%" & val3 & " %' ", MyConnection)

----
The problem is:
When I try to merge these two in one big "AND" row as shown below, It only cares of picking up the Test_Text string and ignores totaly the TestType one!
I guess it is a matter of punctuation, can any one help me? Thanks.

MyCommand = New SqlDataAdapter("SELECT * From Tbl_Table where Type = '" & TestType.tostring & "' AND Item Like '%" & val1 & " %' OR Item Like '%" & val3 & " %'", MyConnection)I fixed it like this:

MyCommand = New SqlDataAdapter("SELECT * From tbl_Table where Item Like '" & val1 & " %' OR Item Like '%" & val3 & "' AND Type = '" & TestType.tostring & "' ", MyConnection)

Thanks|||when i'm debugging a concatenated sql string like that, i usually dim a var and set the var to the string. then i can see the result of the concatenation before passing it to the command object. it helps me to pick out the syntax errs quicker...

i.e.

dim mySQL as string = "SELECT * From tbl_Table where Item Like '" & val1 & " %' OR Item Like '%" & val3 & "' AND Type = '" & TestType.tostring & "' "

MyCommand = New SqlDataAdapter(mySQL, MyConnection)|||That´s a good Idea, thanks!

Wednesday, March 7, 2012

Publishing a report programmatically.

Hi!

I have a rdl file and would like to publish it programmatically? Is there any API or Web Service available for this.

Hello Vivekananda:

SQL Server 2005 Reporting Services (SSRS) provides a full-featured set of APIs that you can use to integrate Reporting Services with custom business applications and extend its functionality.

The Report Server Web service provides access to the full functionality of the report server.

A Report Server Web service is an Extensible Markup Language (XML) Web service with a Simple Object Access Protocol (SOAP) API. You can use the Web service to add the functionality of Reporting Services to your business applications.

For more information of the Report Server Web Service:

http://msdn2.microsoft.com/fr-fr/library/ms152787(SQL.90).aspx

ReportingService2005 Class contains the methods and properties that can be used to call the Microsoft SQL Server 2005 Reporting Services (SSRS) Web service.

You can use the method 'ReportingService2005.CreateReport' to create new report to the report server database.

Here is a code example for this:

Code Snippet

class Sample
{
public static void Main()
{
ReportingService2005 rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

Byte[] definition = null;
Warning[] warnings = null;
string name = "MyReport";

try
{
FileStream stream = File.OpenRead("MyReport.rdl");
definition = new Byte[stream.Length];
stream.Read(definition, 0, (int) stream.Length);
stream.Close();
}

catch(IOException e)
{
Console.WriteLine(e.Message);
}

try
{
warnings = rs.CreateReport(name, "/Samples", false, definition, null);

if (warnings != null)
{
foreach (Warning warning in warnings)
{
Console.WriteLine(warning.Message);
}
}

else
Console.WriteLine("Report: {0} created successfully with no warnings", name);
}

catch (SoapException e)
{
Console.WriteLine(e.Detail.InnerXml.ToString());
}

}
}

Hope this helps.

For more information:

Report Server Web Service Features

Report Server Namespace Management Methods

Good luck.

Monday, February 20, 2012

Public Role

Hi:
I want to remove permissions from the public role but it is not working. I
used "revoke all from public". It had worked for me before. Some of the us
ers I created are inheriting permissions from the public role. I want to r
emove those permissions fro
m the public role but the above command is not working. Any help will be gr
eatly appreciated.
ThanksSohail,
What rights are you running with? The BOL says:
Revokes all applicable permissions. For statement permissions, ALL can be
used only by members of the sysadmin and db_securityadmin roles. For object
permissions, ALL can be used by members of the sysadmin, db_securityadmin,
and db_owner roles, and by database object owners.
Russell Fields
"Sohail" <anonymous@.discussions.microsoft.com> wrote in message
news:B1540684-F053-49A0-97AA-CA4BAA02AF86@.microsoft.com...
quote:

> Hi:
> I want to remove permissions from the public role but it is not working.

I used "revoke all from public". It had worked for me before. Some of the
users I created are inheriting permissions from the public role. I want to
remove those permissions from the public role but the above command is not
working. Any help will be greatly appreciated.
quote:

> Thanks
|||Hi Russell:
Thanks for replying. I am using sa but still not working. Very confusing.
Any other thought.
Thanks|||What is the error you receive?
Adam
"Sohail" <anonymous@.discussions.microsoft.com> wrote in message
news:117BF945-B35E-445E-93CF-7AFA0EB8F968@.microsoft.com...
> Hi Russell:
> Thanks for replying. I am using sa but still not working. Very
confusing. Any other thought.
> Thanks

Public role

Hi
I was wondering under what conditions is it ok to grant permissions to the
public role. By default every one belongs to this role. so i am wondering
what conditions justify the grant?. Can some one please explain in detail?.
Thanks
MIf any future and all present users in the database will
definitely always need the permissions and it will not
introduce any security problems or issues for your database.
This would imply that you have full knowledge and control of
any and all future use of your database which may often not
be the case.
-Sue
On Thu, 10 Mar 2005 14:13:44 -0800, "Meher Malakapalli"
<mmalakapalli@.cohesioninc.com> wrote:

>Hi
>I was wondering under what conditions is it ok to grant permissions to the
>public role. By default every one belongs to this role. so i am wondering
>what conditions justify the grant?. Can some one please explain in detail?.
>Thanks
>M
>