Tuesday, March 20, 2012
Backing Up
is restored I think it is a good idea to back up the full text catalog. What
is the best method for doing do ?
GMG,
Assuming you're using either SQL Server 7.0 or SQL Server 2000, you should
review KB article: 240867 (Q240867) "INF: How to Move, Copy, and Backup
Full-Text Catalog Folders and Files" at
http://support.microsoft.com/default...b;EN-US;240867
If you're using SQL Server 2005 (codename Yukon), the FT Catalog can be
backed up and restored with the database!
Regards,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"GMG" <nospam@.nospam.com> wrote in message
news:uDysw71tFHA.908@.tk2msftngp13.phx.gbl...
> As it can take a long time to create the full text index once the database
> is restored I think it is a good idea to back up the full text catalog.
> What
> is the best method for doing do ?
>
sql
Friday, February 24, 2012
Avoiding Divide by Zero in Report
What is the experession to evaluate if the result of a computation would be a divide by zero error for a text box in report?
IIF(divide by zero, display nothing, else display computed result)...?
you should actually use it in your query,but...
=iif(value1 = 0 or value2=0,0, value1/value2)
where the values are the values your dividing by.
it's much easier to do it in sql though...
|||I'd recommend either doing it in your Stored Procedure or creating a function to handle it. You don't want to be putting that expression in every sell in which you're doing division.You can create a function like the one below and place it in the Report code block or put it in an assembly and reference the assembly in the report.
Public Function CalcAvg(dblNum As Double, dblDen As Double) as Object
if (dblDen = nothing) or (dblDen = 0)
CalcAvg = 0
else
CalcAvg = dblNum / dblDen
end if
End Function|||
I have this code in my Code section
Code Snippet
Public Shared Function DivideXbyY(ByVal X As Decimal, ByVal Y As Decimal) As DecimalDivideXbyY = IIF(Y=0, 0, X / IIF(Y=0, 1, Y))
End Function then I call it in the Table/Matrix
Code Snippet
=Code.DivideXbyY(Fields!amt.Value,Fields!tix.Value)
|||Thanks guys, your responses are very helpful and much appreciated.Avoiding clear text passwords and editing of packages
I have an SQL Server where only a group of sysadmins have access to install DTSX packages. Those DTSX packages are developed by another team that does not have access to the production SQL Server. They use their own SQL Server.
In order to make it as simple as possible to install these packages by the sysadmins, I suggested the use of configuration files. The files are associated with the job that executes the package and all that has to be done to install the package is copy it to the file system or import it into the SQL Server. Developers use their configuration file, sysadmins user theirs. Nothing new here.
The problem is that some of the packages have to access some old systems and we cannot use integrated authentication. We have to use SQL authentication and therefore specify a user account and password in the connection string. If this is stored in the configuration file, it is available in clear text! If I store the configuration in the package itself using ProtectSensitiveWithPassword protection level, the sysadmins will have to edit every DTSX package to reset the connections to the production environment (the developers always send them with their development configurations) and I don't want that. If I store it in a SQL Server database, it seems the sysadmins also have to edit the package to point the package configuration to the correct database and set the configuration filter.
Another solution is to store the credentials in clear text in the configuration file but set the file system permissions on that file so only the account that executes the package can read them (this is what I'm implementing if nothing better comes up...)
Is there any other way to do this? Am I doing something wrong?
Thanks in advance.
Rui Covelo wrote:
Hi!
Another solution is to store the credentials in clear text in the configuration file but set the file system permissions on that file so only the account that executes the package can read them (this is what I'm implementing if nothing better comes up...)Is there any other way to do this? Am I doing something wrong?
Thanks in advance.
I don't see any other way. Unless that you want to save you the time of oppening each package to change the credentials in every package; I think you are better dealing with the passwords in plain text and securing the place where they live. BTW, you can use Env. variables or a SQL table to place those connection strings if that makes you feel more secure.
This is just my opinion and not an entry for the 'best practice' book
Rafael Salas
|||I don't see using configuration files is not that big issue that people seem to think of it. So what if they use clear text, all that means is that you need secure them correctly. You probably have a password store already. Does it have password complexity? Does it have group membership? Do passwords expire? Can you manage access centrally? If not it would seem obvious that AD is going to do a better job, so use it :)
The issue I think is more about how people have viewed file permissions in the past, or rather the lack of them. Use them correctly and will be more secure than a single password embedded in a package, and don't forget those jobs that also have the password too. AD is much harder to circumvent any controls around it. People just don't use file permissions, because it is "hard", well get it right and it is more secure, so what sounds better?
|||I would re-iterate what Darren has said.
At some point someone somewhere needs to know what some password is to open up access to a securable. If that password is the password of a Windows AD account then so much the better. Security is one of the main things that AD is there for.
-Jamie
|||Thanks for your answers!
Monday, February 13, 2012
available values and free text
Hi,
I have a parameter that get his available values from a query.
I want that user will have the option to select from the values list OR to type in his own value.
Is there a way to do that?
Thanks,YOu will have to use two parameters and compose your query to accept either the one or the other value.
HTH; Jens K. Suessmeyer.
http://www.sqlserver2005.de|||Hello Jens,
I was afraid of that :(
I was sure at first that there is a simple solution other then that.
Now it mean that I need to check both parameters and if the user fill them both I need to decide which one to choose and so on...
Any way, It seems that its the only way.
Thanks for your replay,
Roy.
available values and free text
I have a parameter that get his available values from a query.
I want that user will have the option to select from the values list OR to type in his own value.
Is there a way to do that?
Thanks,
Hello my friend,
I am assuming that your rdl report is working and the user can select from a drop down list and you just want extra functionality to allow the user to choose their own, which may not be on the list. A way to do this would be to use 2 other parameters. One will be the user's chosen value and the other will be a flag to say whether to use the selected drop down value or what the user entered
SELECT * FROM MyTable WHERE (MyID = @.DropDownListValue AND @.UsingDropDownList = 1)
OR (MyID = @.UserValue AND @.UsingDropDownList = 0)
Kind regards
Scotty
|||
Hi Scotty,
Thank for your replay!
I also thought about useing two parameters but it looked like a really poor idea.
After seeing your answer I got the feeling That Its the only way :(
The problem is that I already have to much parameters and helf the screen is with parameters textBox (since it organized them in two column and I can't do any thing about that),
Thanks for your help,
Roy.
Hello again my friend,
You do not need to use the default parameter screen that the report generates. When you submit the report after choosing your parameters, observe the url it generates. It concatenates your parameters on to the URL. Instead of using the default report screen, you can make your own user-friendly web page where they choose the parameters and then just generate the URL based on their choices and redirect them.
Kind regards
Scotty
available values and free text
I have a parameter that get his available values from a query.
I want that user will have the option to select from the values list
OR to type in his own value.
Is there a way to do that?
Thanks,You can have either type in values or drop down you cant have both.
Amarnath
"nicknack" wrote:
> Hi,
> I have a parameter that get his available values from a query.
> I want that user will have the option to select from the values list
> OR to type in his own value.
> Is there a way to do that?
> Thanks,
>|||Yap, Thats what i found out.
Thanks
Amarnath =D7=9B=D7=AA=D7=91:
> You can have either type in values or drop down you cant have both.
> Amarnath
> "nicknack" wrote:
> > Hi,
> > I have a parameter that get his available values from a query.
> >
> > I want that user will have the option to select from the values list
> > OR to type in his own value.
> >
> > Is there a way to do that?
> >
> > Thanks,
> >
> >