Showing posts with label user. Show all posts
Showing posts with label user. Show all posts

Friday, March 30, 2012

pre-execute failure

I just started getting this error.

[DTS.Pipeline] Error: component "User Type" (377) failed the pre-execute phase and returned error code 0x8007000E.

It wasn't happening before. Does anyone know what it means?

Hi Jim,
Without more information it is probably impossible to say.

What type of component is it?
What are you using it for?
How have you configured it?
When do you get the error - when the package starts or when the data-flow starts?
What inputs does it take?

etc...etc...

Regards
Jamie|||

Excelent questions.
This s a dataflow component. All of it's input is from a table. It seems like just rearranging the dataflow components in the work flow eliminates the problem. Since it isn't happening any longer, I can't do a better job answering your questions.

I don't understand it.

|||Incidentally, that error is Out Of Memory, so there could have been some transient cause.... Please let us know if you do come across a repro.sql

Predict % completed

I'm doing a web search page on a db that has about 1 million records, and
the query is quite complicated. I would like to provide the user some
feedback will the db server is performing the search.
What is the best way to do this? any examples or tutorials?
The only way I can think of is doing 10000 records at a time and add 1% to a
counter.
There must be a better way.
Any input is greatly appreciated,
AaronWhat about firing first the Query to the Optimizer and sshowing the
execution plan for it, you might see there how long (CPU cycles) it will
last and how many rows are estimated (Requirement of maintained statistics
:-)
See for this one:
USE NORTHWIND
GO
SET SHOWPLAN_ALL ON
GO
Select CompanyName from Customers where CompanyName LIKE '%A%'
GO
SET SHOWPLAN_ALL OFF
GO
(Result gonna spread over the page, best thing you execute in on your own.)
HTH, Jens Smeyer
http://www.sqlserver2005.de
--
"Aaron" <kuya789@.yahoo.com> schrieb im Newsbeitrag
news:O503JyYQFHA.204@.TK2MSFTNGP15.phx.gbl...
> I'm doing a web search page on a db that has about 1 million records, and
> the query is quite complicated. I would like to provide the user some
> feedback will the db server is performing the search.
> What is the best way to do this? any examples or tutorials?
> The only way I can think of is doing 10000 records at a time and add 1% to
> a counter.
> There must be a better way.
> Any input is greatly appreciated,
> Aaron
>
>|||what's the Optimizer ? is that an addon to sql server?
i don't think i have that
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:eu5VT4YQFHA.1392@.TK2MSFTNGP10.phx.gbl...
> What about firing first the Query to the Optimizer and sshowing the
> execution plan for it, you might see there how long (CPU cycles) it will
> last and how many rows are estimated (Requirement of maintained statistics
> :-)
> See for this one:
>
> USE NORTHWIND
> GO
> SET SHOWPLAN_ALL ON
> GO
> Select CompanyName from Customers where CompanyName LIKE '%A%'
> GO
> SET SHOWPLAN_ALL OFF
> GO
> (Result gonna spread over the page, best thing you execute in on your
> own.)
> HTH, Jens Smeyer
>
> --
> http://www.sqlserver2005.de
> --
> "Aaron" <kuya789@.yahoo.com> schrieb im Newsbeitrag
> news:O503JyYQFHA.204@.TK2MSFTNGP15.phx.gbl...
>|||On Fri, 15 Apr 2005 16:06:44 -0700, Aaron wrote:

>what's the Optimizer ? is that an addon to sql server?
>i don't think i have that
(snip)
Hi Aaron,
The optimizer is an integral part of SQL Server. It's the part of the
server that reviews your query and determines the execution plan (the
order and methods in which data will be fetched and combined to satisfy
your request).
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

Friday, March 23, 2012

Power user question

I want to create a user on SQL Server 2005 that needs to be able to
create databases, logins, and users, as well as create stored procs,
triggers, tables, etc. This user will be accessed from a vb.net
application. Is there anything less powerful than the 'sa' user that
will do the trick, or some kind of roll-my-own permissions? I really
haven't played around too much with assigning SQL Server permissions
before.
Cheers,
MarcusYou can grant the server role Database Creators to the user, and then grant
the fixed database role db_ddladmin for each existing database.
"Marcus" wrote:

> I want to create a user on SQL Server 2005 that needs to be able to
> create databases, logins, and users, as well as create stored procs,
> triggers, tables, etc. This user will be accessed from a vb.net
> application. Is there anything less powerful than the 'sa' user that
> will do the trick, or some kind of roll-my-own permissions? I really
> haven't played around too much with assigning SQL Server permissions
> before.
> Cheers,
> Marcus
>

Power user question

I want to create a user on SQL Server 2005 that needs to be able to
create databases, logins, and users, as well as create stored procs,
triggers, tables, etc. This user will be accessed from a vb.net
application. Is there anything less powerful than the 'sa' user that
will do the trick, or some kind of roll-my-own permissions? I really
haven't played around too much with assigning SQL Server permissions
before.
Cheers,
MarcusYou can grant the server role Database Creators to the user, and then grant
the fixed database role db_ddladmin for each existing database.
"Marcus" wrote:
> I want to create a user on SQL Server 2005 that needs to be able to
> create databases, logins, and users, as well as create stored procs,
> triggers, tables, etc. This user will be accessed from a vb.net
> application. Is there anything less powerful than the 'sa' user that
> will do the trick, or some kind of roll-my-own permissions? I really
> haven't played around too much with assigning SQL Server permissions
> before.
> Cheers,
> Marcus
>

Tuesday, March 20, 2012

POST BACK TO SERVER

hi all,

i want to filter data from a database using parameters supplied by the user via textboxes. i've been able to write the select statement. my problem now is, the code behind for the "view data" button. do i do "sqldatasource1.select" orpost the databack to theserver? if i'm topostback to theserver, whats the code i should use?

protected void button1_Click(object sender, Eventargs e)

{

????

}


I guess it depends. Are you simply displaying data within something like a GridView? If so, then just use GridView.DataBind() and set your Parameters within the SqlDataSource.Selecting event. You could also set up your Parameters to be ControlParameters and point them directly to your TextBoxes.

|||

well i had done that already. it was just the code behind i needed. i didnt put any code and at runtime i clicked the button and it posted to the server. so i guess thats all i need. thanks for the input though

Monday, March 12, 2012

Possible to use Calendar control with date parameter?

SQL 2005 on XP Pro.
I want to call up a Calendar Control when a user enters a report parameter which is a date. Is this possible? I am using the out-of-the-box SQL Srvr Reporting Services, not a custom implementation.

Thanks in advanceThis is supported. A calendar control will be displayed for date parameters that do not have a valid values list.|||

Calender control comes automatically once you define a report parameter as datetime.

Amarnath

possible to spoof report parameters?

Sorry if this has been asked before, but the searches I tried didn't turn anything up.

My question is, is it possible for a user to spoof report parameters in order to get a report to run for values that would normally be unavailable to that user?

For example, let's say we have a report that has a drop-down parameter containing a list of account numbers that the user is allowed to see data for. (The query that populates the dropdown itself uses the reporting services login to appropriately filter the list of accounts.) Would it be theoretically possible to write a custom http client that injected its own value for the account # parameter and have the report run for an account that was not intended for that user? Or is this somehow prevented in some way (perhaps the viewstate?).

Note, I am not the potential hacker, I would like to know if I need to add some other security mechanism to all of our reports.

By the way, we are using RS 2005.

ThanksUse stored procedures to prevent SQL injection attacks.|||I'm sorry, I shouldn't have used the word "inject" in my original question. I am not speaking about a traditional SQL injection attack, I'm only talking about spoofing an http client to post arbirtrary http-parameter values in runing the report. Thanks for the reply tho.

possible to spoof report parameters?

Sorry if this has been asked before, but the searches I tried didn't turn anything up.

My question is, is it possible for a user to spoof report parameters in order to get a report to run for values that would normally be unavailable to that user?

For example, let's say we have a report that has a drop-down parameter containing a list of account numbers that the user is allowed to see data for. (The query that populates the dropdown itself uses the reporting services login to appropriately filter the list of accounts.) Would it be theoretically possible to write a custom http client that injected its own value for the account # parameter and have the report run for an account that was not intended for that user? Or is this somehow prevented in some way (perhaps the viewstate?).

Note, I am not the potential hacker, I would like to know if I need to add some other security mechanism to all of our reports.

By the way, we are using RS 2005.

ThanksUse stored procedures to prevent SQL injection attacks.|||I'm sorry, I shouldn't have used the word "inject" in my original question. I am not speaking about a traditional SQL injection attack, I'm only talking about spoofing an http client to post arbirtrary http-parameter values in runing the report. Thanks for the reply tho.

Wednesday, March 7, 2012

Possible to create an OPTIONAL multi-value field that can be left empty?

Greetings,

I have several reports for which the user has asked to have an optional muti-value parameter. They want to be able to select zero, one, many, or all values in the parameter list. The parm list is created through a query and the values are not static.

I would like to allow the user to leave the muti-value field empty if they want to allow all values to appear on the report. I've read some discussion about populating a multi-value default with the same query that produces the multi-value list values - presto, everything is selected. However, this is not a desirable solution for me because I "echo" the users parameter selections in the report heading. Selecting all values (and some parms have a lot of values) would cause the "parm feedback" section to grow large and unreadable.

In short, I don't want to tell the user they have to select everything when they really want to select nothing.

Is there any way to have a muti-value parm that won't insist the user select one or more values?

Thanks,

BCB

Make your query which is populating your parameter to have another value "All" and make that as the default value instead of an empty value that indicates all.

Shyam

possible to call a table valued User Defined Function thru ODBC

I want to be able to call a SQL Server User Defined Function that is a
table valued UDF. I have existing code that uses ODBC and calling UDFs
is going to be a lot easier than calling stored procedures, as the
syntax is close to using a table itself (at least in T-SQL it is).
But, I suspect that only scalar-valued functions can be called, but
please tell me otherwise.
I don't believe you can return a TABLE variable from a UDF
directly through to ODBC.
How is calling a UDF simpler than calling a stored procedure?
By the way, if you want the database layer written for you in
ADO.NET (if you are using .NET...), you can use this code
generator (source code included).
http://www.eggheadcafe.com/articles/..._generator.asp
2005 Microsoft MVP C#
Robbe Morris
http://www.masterado.net
http://www.mastervb.net
"fpdave" <deroberts100@.hotmail.com> wrote in message
news:1106230769.823842.53790@.z14g2000cwz.googlegro ups.com...
>I want to be able to call a SQL Server User Defined Function that is a
> table valued UDF. I have existing code that uses ODBC and calling UDFs
> is going to be a lot easier than calling stored procedures, as the
> syntax is close to using a table itself (at least in T-SQL it is).
> But, I suspect that only scalar-valued functions can be called, but
> please tell me otherwise.
>

possible to call a table valued User Defined Function thru ODBC

I want to be able to call a SQL Server User Defined Function that is a
table valued UDF. I have existing code that uses ODBC and calling UDFs
is going to be a lot easier than calling stored procedures, as the
syntax is close to using a table itself (at least in T-SQL it is).
But, I suspect that only scalar-valued functions can be called, but
please tell me otherwise.I don't believe you can return a TABLE variable from a UDF
directly through to ODBC.
How is calling a UDF simpler than calling a stored procedure?
By the way, if you want the database layer written for you in
ADO.NET (if you are using .NET...), you can use this code
generator (source code included).
http://www.eggheadcafe.com/articles...e_generator.asp
2005 Microsoft MVP C#
Robbe Morris
http://www.masterado.net
http://www.mastervb.net
"fpdave" <deroberts100@.hotmail.com> wrote in message
news:1106230769.823842.53790@.z14g2000cwz.googlegroups.com...
>I want to be able to call a SQL Server User Defined Function that is a
> table valued UDF. I have existing code that uses ODBC and calling UDFs
> is going to be a lot easier than calling stored procedures, as the
> syntax is close to using a table itself (at least in T-SQL it is).
> But, I suspect that only scalar-valued functions can be called, but
> please tell me otherwise.
>

Saturday, February 25, 2012

Possible causes for "login failed for user 'xyz' "

What are some of the possible causes for the following error :
Login failed for user 'xyz' assuming we have mixed mode of authentication on
SQL 2K.
I can think of just an incorrect password entered. Are there any more
reasons ?I'd think there will be some more detail in the error message. Is that all,
you are getting?
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
What hardware is your SQL Server running on?
http://vyaskn.tripod.com/poll.htm
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:OeEWPGEkDHA.1808@.TK2MSFTNGP09.phx.gbl...
What are some of the possible causes for the following error :
Login failed for user 'xyz' assuming we have mixed mode of authentication on
SQL 2K.
I can think of just an incorrect password entered. Are there any more
reasons ?|||We can get authenticated for some apps. I just have profiled some failed
logins and wanted to know what may some reason be for that error message
seen in text data column
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:%23fvMIHMkDHA.2416@.TK2MSFTNGP10.phx.gbl...
> I'd think there will be some more detail in the error message. Is that
all,
> you are getting?
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> What hardware is your SQL Server running on?
> http://vyaskn.tripod.com/poll.htm
>
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:OeEWPGEkDHA.1808@.TK2MSFTNGP09.phx.gbl...
> What are some of the possible causes for the following error :
> Login failed for user 'xyz' assuming we have mixed mode of authentication
on
> SQL 2K.
> I can think of just an incorrect password entered. Are there any more
> reasons ?
>
>|||"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:OeEWPGEkDHA.1808@.TK2MSFTNGP09.phx.gbl...
> What are some of the possible causes for the following error :
> Login failed for user 'xyz' assuming we have mixed mode of authentication
on
> SQL 2K.
> I can think of just an incorrect password entered. Are there any more
> reasons ?
Connectivity. If it takes a while for the error to appear, consider your
connectivity options.
Kind Regards, Howard

Possible bug with SSIS File System Task

I'm having an issue with a file system task & I'm not sure whether it is user error on my part or a bug. I'm using a SQL Task to create a transaction log backup & I'm saving the name of the file in a result set which I then am mapping to a package level user variable. After that runs I'm trying to copy this .BAK file to another folder using the file system task. I'm setting the following properties on the file system task.

Isdestinationpathvariable: False

Then I have entered the static directory for the file move.

Operation: Tried it with both copy file & move file.

Issourcepathvariable: True

Sourceconnection: User::File_name

After setting this I immediately get a validation warning telling me the source directory cannot be empty. If I try to run it, it fails. The weird thing is that if I set up a connection manager to a flat file & pass my user variable in as the connection string to this connection. Then set the Issourcepathvariable to false & the Sourceconnection to this connection manager it works.

I also have gotten it to work by substituting an ftp task in place of the file system task. The ftp task has no problem when I set the Islocalpathvariable to true & then pass my variable to Localvariable property. This is why I believe there is some sort of issue with the file system task. Has anyone seen this before? Is there some sort of problem with the way I'm setting it up?

Thank you

You might be missing the path of your source connection. Make sure you are including the path of the source file as a part of the File_name variable.

Rafael Salas

|||I tried it with both a mapped drive letter in the path & a unc path. No luck with either. Also the path I put into the variable works for the ftp task. Thank you though.

Monday, February 20, 2012

Positive/Negative with ROWLOCK

When you want to use a ROWLOCK?
When you not want to user a ROWLOCK?
Thank You,Very rarely!
I've used that hint only twice, temporarily when diagnosing deadlocks. I
eventually removed it in both cases.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
news:DDD23068-06F5-4103-A85D-98CC2452A065@.microsoft.com...
> When you want to use a ROWLOCK?
> When you not want to user a ROWLOCK?
> Thank You,

Positive/Negative with ROWLOCK

When you want to use a ROWLOCK?
When you not want to user a ROWLOCK?
Thank You,
Very rarely!
I've used that hint only twice, temporarily when diagnosing deadlocks. I
eventually removed it in both cases.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
"Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
news:DDD23068-06F5-4103-A85D-98CC2452A065@.microsoft.com...
> When you want to use a ROWLOCK?
> When you not want to user a ROWLOCK?
> Thank You,

Positive/Negative with ROWLOCK

When you want to use a ROWLOCK?
When you not want to user a ROWLOCK?
Thank You,Very rarely!
I've used that hint only twice, temporarily when diagnosing deadlocks. I
eventually removed it in both cases.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
news:DDD23068-06F5-4103-A85D-98CC2452A065@.microsoft.com...
> When you want to use a ROWLOCK?
> When you not want to user a ROWLOCK?
> Thank You,

Position of the Title of the Report

I have a Landscape report ,I've put the title at the center but if the user on printing report set the Print to portrait the title will not be at the center of the paper,is there a way to set the position of the title in the center of the Report in all cases I mean something like

reportTitle.position=centerIf in Design mode, you stretch the label that holds the title so that it takes up the whole width of the report and make sure its justification is set to center, that should do it for you.|||Sorry I'm working in Crystal Report of VB.Net 2005 I have use the report Title of the specialFields and I can't reach the stretch property of it..