Showing posts with label via. Show all posts
Showing posts with label via. Show all posts

Monday, March 12, 2012

How to import files via HTTP in SSIS

Hello,

How can I import data into SQL server via http server ?

ThanksHi,
Is this any use to you: http://www.sqljunkies.com/WebLog/ashvinis/archive/2005/05/25/15653.aspx

|||Yes i saw it, but i'm novice, i don't know how tu use it ...

If someone can help me|||The code is VB.Net which can be used within a Script Task in your package.
To start, add two variables. Hope fully the names are self-explanatory-

RemoteUri
LocalFileName

Ensure they are type String, and set some suitable values. Add a Script Task, and replace Sub main with Ash's code.

|||thanks a lot, i'll try it !|||

How can i do to specifiy the path of local file with something like

PhysicalApplicationPath in a DTS script task ?

|||

The script references a variable to get the file - Dts.Variables("LocalFileName").Value

Or

Is PhysicalApplicationPath a special path that you expect to be derived? If so what exactly would you expect it to be?

|||I need to specify where my file will be downloaded. My problem is i execute this on shared sql server...

Thanks|||So use the variable and supply the folder you need to that variable. You cannot get th path of the package, as the package may not even have a path, and is being hosted at execution time, so the package path is meaningless. You seem to have started another thread so followup there.

Sunday, February 19, 2012

How to Identify a User's Permissions to SQL Server Tables via VB 6.0 Application

I'm writing an application using VB 6.0 as the front-end GUI, and the
MSDE version of SQL Server as the back-end (it's a program for a
really small # of users -- less then 3-4).
I'm trying to determine, through the Visual Basic interface, the
permissions of each user that's using the application on his/her
machine.
For example, let's say I'm user "Michael" that's sitting down at my
machine using the app. I've written. The security for logging into
SQL Server will be setup using Windows Security (Trusted Connection)
as opposed to Windows & SQL Server security. When Michael accesses a
particular form in the VB 6.0 GUI, I want to run some code that
automatically checks Michael's permission levels on the underlying
table (actually, a stored procedure supplying the data from the table)
that supplies the data to the form he's looking at and then give him
some feedback on the form as to what type of permissions he has while
he's browsing through the data shown in the form.
For example, Michael opens a particular form, code in the background
is run to identify that this is Michael accessing the form, the code
returns a value that identifies what type of permissions he has on the
data in the form, and a text box on the form informs Michael (for
example) that he only has read-only permissions to the data he is
viewing and cannot edit any of the data.
As another example, user Karen sits down at her computer, logs into
the application, opens the same form that Michael just opened, the
code is run in VB to detect the level of permissions she has on the
data being displayed in the form, and the text box on the form informs
her that she has editing permissions on the data in the underlying
table.
Etc...
If anyone can post an example of the code they use in accomplishing
this task in an application they've written, I'd really appreciate a
point in the right direction or a real-world example that's been
implemented by one of you. I've written several apps. thus far using
MSDE as the back-end, but the previous apps. I've written were for
clients that didn't care about restricting access to the
application... everyone could pretty much use the application as they
desired and do anything they desired to the data.
The current client I'm writing the app. mentioned here for wants to
have security in place to where various users access the application
with various levels of permissions to do stuff (or *not* do stuff) to
the data in the application.
Thanks very much in advance for any assistance / code provided!
Sincerely,
Brad McCollum
bmccoll1@.midsouth.rr.com"Brad H McCollum" <bmccoll1@.midsouth.rr.com> wrote in message
news:52031869.0410131014.25af0f1c@.posting.google.com...
> I'm writing an application using VB 6.0 as the front-end GUI, and the
> MSDE version of SQL Server as the back-end (it's a program for a
> really small # of users -- less then 3-4).
> I'm trying to determine, through the Visual Basic interface, the
> permissions of each user that's using the application on his/her
> machine.
> For example, let's say I'm user "Michael" that's sitting down at my
> machine using the app. I've written. The security for logging into
> SQL Server will be setup using Windows Security (Trusted Connection)
> as opposed to Windows & SQL Server security. When Michael accesses a
> particular form in the VB 6.0 GUI, I want to run some code that
> automatically checks Michael's permission levels on the underlying
> table (actually, a stored procedure supplying the data from the table)
> that supplies the data to the form he's looking at and then give him
> some feedback on the form as to what type of permissions he has while
> he's browsing through the data shown in the form.
> For example, Michael opens a particular form, code in the background
> is run to identify that this is Michael accessing the form, the code
> returns a value that identifies what type of permissions he has on the
> data in the form, and a text box on the form informs Michael (for
> example) that he only has read-only permissions to the data he is
> viewing and cannot edit any of the data.
> As another example, user Karen sits down at her computer, logs into
> the application, opens the same form that Michael just opened, the
> code is run in VB to detect the level of permissions she has on the
> data being displayed in the form, and the text box on the form informs
> her that she has editing permissions on the data in the underlying
> table.
> Etc...
> If anyone can post an example of the code they use in accomplishing
> this task in an application they've written, I'd really appreciate a
> point in the right direction or a real-world example that's been
> implemented by one of you. I've written several apps. thus far using
> MSDE as the back-end, but the previous apps. I've written were for
> clients that didn't care about restricting access to the
> application... everyone could pretty much use the application as they
> desired and do anything they desired to the data.
> The current client I'm writing the app. mentioned here for wants to
> have security in place to where various users access the application
> with various levels of permissions to do stuff (or *not* do stuff) to
> the data in the application.
> Thanks very much in advance for any assistance / code provided!
> Sincerely,
> Brad McCollum
> bmccoll1@.midsouth.rr.com
See my response in comp.database.ms-sqlserver - please don't multipost.
Simon

How to hide unauthorized databases with SQL 2005?

Hi,
I have configure permission for userA and he can access only one database.
When user estabilish the connection via management studio, though he cannot
access other databases, he can see them. Is it possible to hide other
databases for userA?
Appreciate all your reply.
ShaneVIEW ANY DATABASE is granted to public by default. If you want to remove
this permission from userA:
USE master
DENY VIEW ANY DATABASE TO userA
Although the user still has VIEW ANY DATABASE via public role membership,
the DENY takes precedence.
You could also REVOKE VIEW ANY DATABASE from public and then selectively
grant that permission to users as you see fit.
Hope this helps.
Dan Guzman
SQL Server MVP
"SL Coder" <sl_coder@.hotmail.com> wrote in message
news:e50gEfAaGHA.3704@.TK2MSFTNGP03.phx.gbl...
> Hi,
> I have configure permission for userA and he can access only one database.
> When user estabilish the connection via management studio, though he
> cannot access other databases, he can see them. Is it possible to hide
> other databases for userA?
> Appreciate all your reply.
> Shane
>|||Thanks for the reply Dan. But the problem is, this statement applies for all
databases that is not what I want. I need to allow userA to see one databas
e while denying other databases. Is it possible. Have I missed anything?
Shane
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message news:%2
300soIBaGHA.3304@.TK2MSFTNGP04.phx.gbl...
VIEW ANY DATABASE is granted to public by default. If you want to remove
this permission from userA:
USE master
DENY VIEW ANY DATABASE TO userA
Although the user still has VIEW ANY DATABASE via public role membership,
the DENY takes precedence.
You could also REVOKE VIEW ANY DATABASE from public and then selectively
grant that permission to users as you see fit.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"SL Coder" <sl_coder@.hotmail.com> wrote in message
news:e50gEfAaGHA.3704@.TK2MSFTNGP03.phx.gbl...
> Hi,
> I have configure permission for userA and he can access only one database.
> When user estabilish the connection via management studio, though he
> cannot access other databases, he can see them. Is it possible to hide
> other databases for userA?
> Appreciate all your reply.
> Shane
>|||SL
Well, this unwanted user must be connected via SSMS (am I right?) and if you
have not added him/her to the database , he/she will see the database's nam
e but cannot access to
"SL Coder" <sl_coder@.hotmail.com> wrote in message news:eV8jH9BaGHA.4116@.TK2
MSFTNGP05.phx.gbl...
Thanks for the reply Dan. But the problem is, this statement applies for all
databases that is not what I want. I need to allow userA to see one databas
e while denying other databases. Is it possible. Have I missed anything?
Shane
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message news:%2
300soIBaGHA.3304@.TK2MSFTNGP04.phx.gbl...
VIEW ANY DATABASE is granted to public by default. If you want to remove
this permission from userA:
USE master
DENY VIEW ANY DATABASE TO userA
Although the user still has VIEW ANY DATABASE via public role membership,
the DENY takes precedence.
You could also REVOKE VIEW ANY DATABASE from public and then selectively
grant that permission to users as you see fit.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"SL Coder" <sl_coder@.hotmail.com> wrote in message
news:e50gEfAaGHA.3704@.TK2MSFTNGP03.phx.gbl...
> Hi,
> I have configure permission for userA and he can access only one database.
> When user estabilish the connection via management studio, though he
> cannot access other databases, he can see them. Is it possible to hide
> other databases for userA?
> Appreciate all your reply.
> Shane
>|||After VIEW ANY DATABASE is denied, only master, tempdb, and databases that
the login owns are visible. Other databases that the user can access are
not enumerated but can still be accessed directly by setting the database
context (e.g. USE). Unfortunately, SSMS Object Explorer functionality is
limited to visible databases.
The reason for this behavior is that it is necessary to open each database
on the server to determine whether or not a non-privileged login has
database access. This caused performance issues on servers with a lot
(100's) of databases.
If this feature is important to you, make a suggestion (or vote on the
importance if already submitted) at the product feedback center:
http://lab.msdn.microsoft.com/produ...ck/default.aspx
Hope this helps.
Dan Guzman
SQL Server MVP
"SL Coder" <sl_coder@.hotmail.com> wrote in message
news:eV8jH9BaGHA.4116@.TK2MSFTNGP05.phx.gbl...
Thanks for the reply Dan. But the problem is, this statement applies for all
databases that is not what I want. I need to allow userA to see one database
while denying other databases. Is it possible. Have I missed anything?
Shane
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:%2300soIBaGHA.3304@.TK2MSFTNGP04.phx.gbl...
VIEW ANY DATABASE is granted to public by default. If you want to remove
this permission from userA:
USE master
DENY VIEW ANY DATABASE TO userA
Although the user still has VIEW ANY DATABASE via public role membership,
the DENY takes precedence.
You could also REVOKE VIEW ANY DATABASE from public and then selectively
grant that permission to users as you see fit.
Hope this helps.
Dan Guzman
SQL Server MVP
"SL Coder" <sl_coder@.hotmail.com> wrote in message
news:e50gEfAaGHA.3704@.TK2MSFTNGP03.phx.gbl...
> Hi,
> I have configure permission for userA and he can access only one
database.
> When user estabilish the connection via management studio, though he
> cannot access other databases, he can see them. Is it possible to hide
> other databases for userA?
> Appreciate all your reply.
> Shane
>