Answer Questions
GShap Check if database is down, display custom message
Hi, I have been using SSRS for creating and getting data from the Oracle databases. I want to display customer error message "Database is down" if the oracle database is down. Is there anyway to check if database is down and display custom error message ...Show All
Marauderz DB Mirroring Monitor Job - Purge Old Data?
Hi, Not sure if this question makes sense, but is it necessary to purge old data in msdb tables used by the db mirroring monitor job I'm just wondering if an insert into the data table every minute of the day would still be needed a month from now. I'm thinking this data would be useful for the purpose of "alerts" and to have access to its recent history, but other than that, is it recommended (or necessary) Would these records keep accumulating until manually purged TIA. Thanks for the info. I checked the SQLAgent properties for the "history log size" setting (currently set to 1000 rows). However, if I check the "msdb.dbm_monitor_data" table, the rows just k ...Show All
Aleniko29139 Data Flow Task empty after check in
On my office PC I have a strange problem with Data Flow Tasks. When I check-in a package into Source Control (Team Foundation) I usually have some empty Data Flow Tasks in the packages...even if I haven't changed that Flow Task. This is really frustrating cause when running the package all goes well, but after a whil you notice that some tables are empty. Does anyone know what the problem is That happened to me in my last project. I was using VSS v6 and it was exactly like you described it; we ran the package and it finished OK, but no data was moved; the reason, the Dataflow task was completely empty. That happens just a couple of times and we could not reproduce the issue, then it never ...Show All
m0nkeyforce How to use variables as a Counter?
While inserting data into a target table, I'm trying to populate a primary key ID field sequentially. For each record, the value of the primary key field needs to be incremented by one (a counter). I've tried to use the RowCount transformation to store the values in a variable. I'm able to successfully do that; however, I don't know how to read or update the variable incrementally. If someone knows how to perform this task, please let me know. I would greatly appreciate it. I used the script component and it does exactly what I need it to do. Thanks, Jamie. I think this: http://www.sqlis.com/default.aspx 37 should do what you need. As will this: http: ...Show All
XNA Rockstar INSERT command question
I am working from C# VS2005 environment. My databases are in SQLEXPRESS. All tables have a unique Primary Key field. The key is just one field of int value that has seed 1 and autoIncrement 1. My question concerns a Stored Procedure that I just created. If "executed" fine. I did not get any compillation errors My question is: if I called this procedure from C# code with paramaters I specified will it create a NEW record for me which is my intent I did not specify the Primary Key field value: it is not among parameters. I hope that when the first record is created it will be seeded with value = 1 and the subsequent records will be autoincremented by 1 each time. Am I right If not then how shall I specify the Primary Key val ...Show All
etcheverrjc Does format file for bulk insert allow mix of native and character format?
I tried to place this question to the .Net framework Data Access and Storage forum and got no answer, so I am trying to move it on this forum. So I have a module which require me to import big amount of data. I believe that the native format data files with format files will be the most efficient way of implementation. I am trying to programmatically produce a BCP like exported files of native format(it means without type conversion) from tables with nullable and nonnullable values.I prefere to be able to not produce computed or identity or rowguid fields,so I need format files. I don't have problems producing different kinds of int or float( which are the majority of fields) or char or nchar fields. Problems are emerging with the ...Show All
A.Momtahan Date lookup in SSIS
How do I perform a date lookup in SSIS. I have a date with time component in it. This has to be looked-up with a table that contains only a date element. Philip Coupar wrote: mike.groh wrote: Vijay: Suresh's suggestion should have worked for you. The conversion statement will look something like this: CONVERT( varchar, <table>.<datetimevalue>, 101 ) The "101" means to convert it to a string in US date format: mm/dd/yyyy CONVERT supports a number of arguments for the output string -- lookup CONVERT in Books Online to see what I mean. As Suresh suggests, you'll probably have to convert the columns in both tables to do the compari ...Show All
Thomas Greenleaf use exists in join
Hello, Can i somehow use exists() function in JOIN ON clause for example SELECT * FROM Table1 INNER JOIN ON Table1.Col1 = Table2.Col1 AND EXISTS(SELECT * FROM Table2 WHERE Table2.Col2 = Table1.Col2) It doesn't work on my query. So, basically i want to do an inner join so that Table1 gets filtered. Then I make sure that every entry in the filtered Table1 has an existing related entry in Table2. i need to do exists because there could be more than one relation in Table2 for each entry in Table1, but i don't want multiple repetition of entries in the filtered Table1. (Not sure if i am making it clear!) I need distict selection, but i am adding NEWID() at the beginning of my query so distinct doesn't work for the rows. with my current query, i ...Show All
Dan Sherwin AMO with VB.Net
Hi All, I am working on a project that require me to build cubes programmatically i.e., using AMO object and VB.Net. I am trying to find a sample that builds cubes using VB.Net. I can add further features to it based on the sample. Can any one help me at their earliest Thanks Sekhar PC Hi, Thank you for your reply. When I tried to create a cube by exactly following the sample, always it threw an error "Could not deploy the cube". Is there a better sample that help to create cube using AMO and dotnet A sample that get deployed though the source is AdventureWorks only. Thanks SekharPC Thanks for the reply. Wh ...Show All
sunil_s Multi-language in Reporting Services
Is there any documentation on how to implement multi-language reports >(texts will change depending on language setting) in Reporting Services Hi Tieto- There is some documentation floating around. I found the general localization documentation here: http://msdn2.microsoft.com/en-us/library/aa972255(SQL.80).aspx However, if sounds like you are interested in controlling the text of the report depending on the locale of the user. This can be accomplished by using custom code. An article on this can be found here: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnsql2k/html/ERSCstCode.asp frame=true Basically, you would create expression based values of text y ...Show All
RibenaUser FK Constraint question
I have two tables GroupUsers and Alias GroupUsers -GroupId -AliasId -UserId Alias -AliasId -UserId When a user joins a Group he selects a default Alias for his group, so I have put a foreign key constraint from the groupusers table to the alias table. Now, if an alias is delete, is there any way through a foreign key constraint to set the value to null because all I've seen is Cascade and No Action A better solution I'm looking for would be a way to run a script that would use the value in the UserId column from the GroupUsers table to select the top alias from the Alias table with a corresponding UserId (if exists) and set it to that. I'm unsure as to if this solution is even possible. SQL Server doesn' ...Show All
Alexey_Rusakov Yearly, monthly... basis report based on the parameter values
Hi guys, I am created a bar chart report. The x-axis value of this chart is a timestamp(datetime) field of a dimension. Thousands of records are inserted in to this field everyday, as a result, I will have the timestamp information every second or minute. So here is the thing, If I want to present last month data in the bar chart(x-axis), the chart can not accomodate all the data and it doesn't look good to present a data in every second or minute. So I want to present the data on yearly, monthly, weekly, daily or hourly basis based on the StartDate and EndDate parameters value provided by the user. Any idea is appreciated. Sincerley, Amde Dear Sufian, Here is the thing, the user can chang ...Show All
Joe Truman Recursive Hierarchy
I have the following agent’s structure on the agent table. 16 ---17 -----18 ---------19 --------------20 Where Agent 20 sold the product and he is under 19 and 19 is under 18 and 18 is under 17 and 17 is under 16. I need a function that allows me to enter agent 20 and it return agent 18 since 17 and 16 are not longer valid agents but they are still on the table. In the agent structure could be more than 5 levels. Thank you In that case, you'll need to use a temporary table, a loop and a processed flag to achieve the same kind of thing. create table #agents (agentid int, active bit, processed tinyint) insert into #agents values (@agentid, 0, 0) while (@@rowcount > 0) begin update #agents s ...Show All
Christie Myburgh Log shipping monitor our of sync SQL Server 2005
I have set up log shipping between two servers with a third serving as a monitoring server. Recently the monitoring for the eight databases that I am log shipping began to indicate that everything was failing. Upon further inventigation of the log_shipping_monitor_history_detail tables on the prinary and secondary everthing appears to working properly but I have been unable to resyncronize the monitoring. I have attempted to use the stored procedure sp_refresh_log_shipping_monitor to no avail, it does not appear to do anything with respect to the data in the dbo.log_shipping_primary_databases and log_shipping_monitor_primary tables on the primary server or the log_shipping_monitor_secondary and dbo.log_shipping_secondary_databases tables o ...Show All
Zadoras Design Question re images
Hi I have a table of people, and for some of them I want to store photo's, is it better to store the phots in a separate table or just add a column to the people table I'm think about 60% will have photo's. What is the best way to add a photo to a table First why you want to store those Photos in Database. Consider to strore those on file system and store the File path on your table. It is very cheap to store on the filesystem(memory, retrival, storage & manipulations).. If you want to store the Photos in database you need to store those in different table as Master Table. You can have those refrences on the detailed table. It is not a bad idea to keep the Image properties on the same (where ...Show All
