Definition Of 'Persistent Data'
Nov 4, 2006What is the definition of 'Persistent Data' as related to the definition of a RDBMS?
thx,
Kat
What is the definition of 'Persistent Data' as related to the definition of a RDBMS?
thx,
Kat
During work with creating, updating or deleting objects in a database,
we use explicit name of the objects, for example
DROP PROCEDURE myProc.
By what the method can I avoid using the explicit name and get something like this:
DROP PROCEDURE @myProc or DROP PROCEDURE id_myProc?
I'm a new user that is playiing with a few of the MS web tools available. I have been trying out the ClubDB sample as part of looking at visual web express. I have installed the sample and ran it in multiple directories while debugging. Most of the directories have now been delected. My problem now is that I cannot add back ClubDB and access it remotely because somewhere in the SQL database there are connections made for each of the previous "test" runs of the sample. I have run SSEUtil and deleted all connections involved (no clubdb or aspnetdb connections still connected) but that doesn't seem to fix it. For example, there still seems to be a table somewhere that remembers that I once had a "clubdb" connection in websitemainapp_data.
My questions are:
- where is this information stored?
- is there an easy to use tool to clear all of these persistant connections.
thanks
I need to get a unique value to use for a record *before* the record is added to a table. It doesn't have to be contiguous with existing records, but it must always be unique, has to be persistent over multiple instantiations of an ASP.NET application, and has to work in that sort of a multi-session environment (where other sessions could need additional unique values before the first session gets around to actually adding a record to the table).
I considered generating and using unique CLSIDs for this, but the resulting value also needs to become part of the filename of some files that are being saved to the disk (and those names also saved in the table), and including text CLSIDs along with other filename data would make for some unpleasantly long and difficult to work with filenames.
I also don't think there's a practical way for me to use a trigger associated with an identity column for this, because I need to save files to disk using the unique value before I even know if the record will in fact end up being added to the table, and what's more, the numbers and names of those files will vary in ways that might be difficult to handle in a stored procedure.
What I'm thinking I will have to do is create a separate database table called something like "UniqueIDGen". This table would have a single record in it with a single integer value, initialized to a value of 1. Then, each time an ID is needed, this one record would be locked, read and incremented by 1. The only reason for doing it this way instead of with an application variable, as I see it, is that the values need to be unique and continue incrementing in perpetuity, no matter how many times the ASP.NET application is recycled or the server is rebooted.
But I still have to wonder if there might be a more efficient method provided by SQL Server for this type of unique value generation ... something that is equally as persistent without requiring an entire table with only a single record to be allocated to such a basic task. Does anyone know of a more elegant solution for this?
I've only been workign with Database programming for 6 months or so, specfically SQL Server. I've setup a site through a hosting company that is pretty reputable and allows me plent of space/bandwidth etc. However, they've recently been having problems with one of their servers (the one I'm co hosted on) as an "abornamlly" large amount of connections are being opened up on their server.
I realize that SQL Server is designed to handle large amounts of traffic and my humble little site probably isn't killing it with shear traffic, but I'm wondering if my programming practicies are sub par and causing problems.
I'm coding in ASP (work hasn't given us the chance to migrate to .net). Anyway my site is getting some 30 - 40k hits a day on the actual web portion and probably another 10-20k on backed stuff - all which open up database connections to do their work.
I've had locks and blocks routinely because of this and I'm afraid I'm just going about this all wrong.
So I'm wondering if there is a way to maintain an established connection in ASP across multiple pages and/or sessions so I don't have to constantly drop and reconnect to the db?
Any help would be great!
I have what looks like a completed install of SQL Server Express Edition, accomplished via unattended setup as part of a custom application (on a machine hereafter dubbed Machine "A").
So far, though, I can't access this instance from a remote SQL Server Management Studio because SSMSE can't see the installed database engine.
I've verified that:
The SQL Server Express installation on Machine A has remote connections enabled.
The SQLBrowser on Machine A is enabled and running.
Machine A's Windows Firewall is disabled.
Using a test tool, I can see that UDP messages sent to SQLBrowser (on port 1434), arrive (i.e. it complains about their format in the System Log).
It seems that Machine A's SQLBrowser isn't responding to requests, but there's no obvious reason why.
There's one clue in Machine A's event log:
Whenever SQLBrowser is started or restarted, there's a warning in the App Log:
"The configuration of the AdminConnectionTCP protocol in the SQL instance SQLEXPRESS is not valid." (eventid 3).
Any help will be much appreciated.
Thanks in advance
Josh
<code>
public static DataTable GetCountries() { SqlConnection myConnection = new SqlConnection(ConfigurationManager.AppSettings["omegaloveConnectionString"]);
if (myConnection.Connect()) .............. problem
{ SqlCommand cmd = new SqlCommand("prcGetCountries", myConnection); cmd.CommandType = CommandType.StoredProcedure; DataTable countries = new DataTable(); countries.Columns.Add("CountryId", typeof(string)); countries.Columns.Add("Country", typeof(string)); SqlDataReader reader = cmd.ExecuteReader(); while (reader.Read()) { DataRow dr = countries.NewRow(); dr[0] = reader["CountryId"].ToString(); dr[1] = reader["Country"].ToString(); countries.Rows.Add(dr); } reader.Close(); return countries; } else return null; } }
</code>
When I set a column to have a default definition that uses a UDF, I am receiving the "String or binary data would be truncated" error.
The UDF:
Code BlockALTER FUNCTION GetDefaultClientTier
(
@ClientAssets decimal(15,2)
)
RETURNS char(1)
AS
BEGIN
DECLARE @Result char(1)
-- Get the first result in case of overlaps.
SET @Result = CAST((SELECT TOP 1 ClientTier FROM ClientTiers WHERE @ClientAssets BETWEEN ClientAssetsFloor AND ClientAssetsCeiling) AS char(1))
RETURN @Result
END
ClientTier is defined as char(1) in the table. I simply have (isnull([dbo].[GetDefaultClientTier]([ClientAssets])),(null))) as the definition. I can't use a computed column because I the values need to be editable. When inserting with SSIS, the insert works fine but the column has a value of null for each row.
When putting a character as the default (like 'A') the insert works fine.
The cast is there only because I have tried everything I can think of to get around this.
Is there something simple I am overlooking?
(SQL2005 SP2)
Thanks!
I suspect this is very poor design but I've been asked to research this: can I maintain a persistent communication session inside an sqlclr proc? (tcp/binary packets)
The process has to maintain very high throughput - setting up and tearing down a connection on each transaction is cost prohibitive. For TCO and deployment reasons it is preferable not to have a separate windows service etc that accepts requests from inside the clr proc. Is there the luxury of an alternative integrated into the database?
I am facing a very weird issue in our SSAS database. We have several roles with 'Read definition' access. None of these roles are able to see data in the cubes. I have checked these roles over and over and there is no problem with the definition. Each of the roles have been given read access to Data Source, Cube and Dimensions.
The users are able to access the definition and structure of the cube i.e. they can see the measures & dimensions available but when they drag measures and dimension attributes in the browser (SSMS) OR execute an MDX - they get null values. The roles with 'Full Control (administrator)' access are able to see all the data without any issues.
Â
I have tried the following:
1. Deleted all roles and re-created.
2. Created roles directly on SSAS DB.
3. Deployed all objects and processed the DB.
Â
Each time only the admins are able to see the data.
I'm trying to move my current use of an sql 2000 db to sql 2005.
I need to update a table definition (to change a field to an Identity)
I'm getting a dialog box (in SQL server management studio) on save saying :
'xxxx' table
- Saving Definition Changes to tables with large amounts of data could
take a considerable amount of time. While changes are being
saved, table data will not be accessible.
I press 'Yes' to the dialog box.
After 35 seconds, I get another dialog box saying:
'xxxx' table
- Unable to modify table.
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Well, the server is responding and I can query that talbe and other, I
can add/delete rows to other columns. I can modify other
(smaller) tables.
Any ideas where I can change this timeout?
Daniel
I'm executing a stored procedure but got error :
Msg 213, Level 16, State 1, Procedure ExtSales, Line 182
Column name or number of supplied values does not match table definition.
I'm trying to define a linked server using Microsoft OLE DB Provider for Data Mining Services. MSDMine data provider is missing. Do you know where I can get this? Thanks in advance.
I'm have a Xeon 64bit proc. using SP2. And had installed:
SQLServer2005_ADOMD_x64.msi, SLQServer2005_ASOLEDB9_x64.msi,SQLServer2005_OLAPDM_x64.msi, and SQLServer2005_XMO_x64.msi.
Could someone explain to me what the acroymn BCV means and how it is applied with an SQL database?
Thanks
In sql2k5 we have
GRANT VIEW DEFINITION ON sp_name TO user
Did this option present in SQL2K?
------------------------
I think, therefore I am - Rene Descartes
Which SP should I use to get the definition of a user created SP?
Thanks,
Prakash.P
It is possible to get the definition of an index in a script?
I want the "Create index..." string so I can drop and recreate the index in a single statement.
You can do it in the Query Analyzer object browzer with the "Script object..." options.
Hi,
I need a query to get table Definition in sql server 2005.
please help me out.
Raghu sunkara.
Hello, i would like to know if it's possible to generate automatically a word document or an excel document that will contain all the metadata definition, for example containing the source columns names, their datatype, and the destination with their datatypes, so that it would easy to create a data dictionnary .
Thank you in advance.
Good morning, all!
I'm tasked with creating POCO (C# Class Object) and XML definitions for three different kinds of records coming from my input file. The problem is that I'm not sure how to do this within the SSIS framework. It seems to me that I can somehow define a class and include XML element tags in the definition, but I'm not sure where to look/who to ask/how to do that!
The goal is to be able to assign the data types and class attributes for various parts of each input record based on position, and to serialize the data as XML (and therefore my inputs to my Data Flow will be XML objects instead of a flat file, as I had been doing it...).
Can anyone point me at a good tutorial? Or a simple example?
Also, is "DateTime" a recognized data type in C#?
Thanks a bunch!
Jim Work
Hello :
I want to use a style sheet, in a .RDL file, that is instead of having that:
<BackgroundColor>#336cad</BackgroundColor>
I want to put:
<BackgroundColor> class = « my color » </BackgroundColor>,
And if it is possible, how I make for connected the .RDL and the .CSS.
Thank's.
Someone know what table/column contain the rdl definition in the ssrs database?
thanks
Is it possible to control the number of table rows that can be displayed by modifying the report definition?
View 4 Replies View Related
I have a 2005 .Net 2.0 solution that includes two projects, a windows project and a Reporting Services project. The report viewer is apart of the windows project and I am wanting to open reports in the RS project but keep getting a 'the report definition has not been specified' error.
I set the ReportPath to point to the physical path of the RS project but it does no good.
Anyone have any idea how to run a report that is not apart of the project?
Thanks.
Steve
Hello,I'm using Visual Studio 2005 with ADO.Net 2.0 but I am missing a definition for the sqlcommands' object "ExecuteRow"oCommand = new System.Data.SqlClient.SqlCommand();oCommand.ExecuteRow() ----------------------------> this is the missing definitionAny ideas anyone ???
View 4 Replies View RelatedI've got a table that gets updated with live-data constantly throughout the day. I've got to run some statistical analysis on the data in this table based off of the value of one of the columns. The column can be 4 values, but I'm only looking to analyze data for rows containing one of two of the 4 total values. IETable |Status| more data....||1|......| |2|......||3|......||4|......| |1|......||4|......| I want to only analyze the data of rows with 1 and 4 as values. I don't care about 2 or 3... I was thinking of using a Trigger, but I'm not aware of a way to analyze the data that fires the Trigger.Ideally, I'd like to do something likeCREATE TRIGGER analyze ON table AFTER INSERT WHERE column = '1' OR column = '4' AS 'Trigger sql here'Is this possible?
View 13 Replies View RelatedWe are trying to create a view that references lengths in both metres and feet.
What we want to do is to create a baselength column which either holds the value of the metres column or calculates the metric value of the feet column if there is no value in the metric column.
We can do all the maths for the calculations etc, it is just putting the IF statement into the view to test the values that we are struggling with.
Any help would be appreciated.
Thanks
I'm using the following to get table/column names:
select so.name, sc.name
from sysobjects so, syscolumns sc
where so.id = sc.id
and so.type = 'U'
order by so.name, sc.colid
What is the equivalent for views?
Thanks
Plesae tell me the MSSQL Server equivalent of the below MySQL query .create table temp2(a varchar(23) comment 'male m');What is the use of specifying a keyword 'comment' in the column definition. Will it make any difference
View 14 Replies View RelatedI have set up a couple of views for a user but they want to be able to see the database table columns by doing right click on table and getting the columsn.
I tried to give the permissions to database by right clicking on database and doing the user and giving view defintion.
-- [TABLEA] contains no columns that can be inserted or the current user does not have permissions on that object.
User not allowed to select the data .
Thanks
Hosam writes "Dear Team
Im new to SQL server 2005, and I wonder if I can create the database documentation, I mean table schema and attributes as word or excel file.
Is there anyone can help me please
Thanks
Hosam"
Hi SQL Professionals ,
I have a requirement like this,
I have a Live Database as well as the Test database with the same Definition
now i need to write a SQL to check identity of these two database tables,
i mean i need to check if the Test Database has got the Same Table definition as Live Database table definition ?
In the same way how do i check for the Stored peocedures ?
how do i write a SQL for this ?
regardssuis
I want to create a view on the table "workorder" that contains a serial id "woid". Another table, "wo_comment" contains multiple comments for each "woid".
I would like to create a view view_workorder with a column "allcomments" that is basically a concatenation of all the comments within the table "comment".
Table: workorder has columns: woid, startdate (plus many others)
Table: wo_comment has columns: woid, comment, sequence
Desired View: view_workorder has columns: woid, startdate, allcomments
I tried to create a view as follows but get errors concerning the "CURSOR" statement making me wonder if I can use declarations and CURSORS within a view?
create view [workorder_view] as (
Select
w.woid,
w.startdate,
cast( DECLARE @all_comments nvarchar(4000),
@curr_comment nvarchar(256)
DECLARE wo_comment_cur CURSOR
FOR
SELECT woc.Comments
FROM WO_Comment as woc
WHERE woc.woid = w.woid
OPEN wo_comment_cur
FETCH NEXT FROM wo_comment_cur INTO
@curr_comment
WHILE (@@FETCH_STATUS = 0)
BEGIN
Set @all_comments = @all_comments + @curr_comment
FETCH NEXT FROM wo_comment_cur INTO
@curr_comment
END
CLOSE wo_comment_cur;
DEALLOCATE wo_comment_cur;
as nvarchar(80000)) as COMMENTS
from workorder AS w
Thanks for any help you can provide!