A Few Questions On Locking In Sql Server 2005

Jan 29, 2008

Hi pardon my ignorance but I wonder if someone could answer a few questions for me.

I am writing a program which will be used by perhaps upto 100 users at a time. The program sits on any number of PCs and loads user specific data to a given PC according to who has logged on to windows on that PC.

A number of data items loaded from the user table have to be unique as they are usernames for other systems that my program simplifies access to.

So when a user logs on to my program for the first time a row is created for them in the user table (indexed by a GUID and their unique network name). The other unique fields are left blank and the user is given an opportunity to fill these details in.

Before writing these details to the user's row in the 'users table' the program loads the whole user table down and checks that these items are unique before committing them to that user's row in the table.

The problem of course is that if between the program downloading the user table into a local datatable, checking the values are unique and then actually writing them someone else writes the same data into their row then 2 users end up with the same data - which shouldn't be allowed. i.e. 2 users can't have the same user name for the other software.

How can I solve this problem with locking? Once the user table is downloaded and in a locel datatable presumably the table is no longer locked so another user could write data to the table.

I acutally think this is going to be a pretty rare occourance but I still want to try to cover all eventualities.

I suspect the problem is the way my program is going about the checking.

Should I use an SQL insert statement like??

If exists(SELECT username from users where username=@username)
BEGIN
RAISEERROR("Username already exists")
END
ELSE
BEGIN
INSERT etc

If so I guess this will simplify my code. Is this the correct thing to do? And then just trap the errors that arise if a duplicate does arise?

Also some more general questions.

1)I presume 2 users simultaneously looking up data from 2 different rows in a table doesn't lock the table so one search fails? I use the code below having set up a command to run a stored procedure to search for a user by their network name.

Dim lclRowRet As SqlDataReader

lclRowRet = LoadUserCommand.ExecuteReader(CommandBehavior.SingleRow)

lclRowRet.Read()

2) I presume writing data to my user table a row at a time will also not cause a lock. I create a command object with all the row values in and then do a command.executenonquery()

As a rule I close all my connections as soon as I'm done with them.

Many thanks for your help in advance.

nik

View 5 Replies


ADVERTISEMENT

SQL Server 2005 Questions

Aug 21, 2007

Hello,

We are currently running a corporate client with Windows 2000 and .Net 1.1. We are running a number of SQL Server 2000 applications and are now thinking of upgrading to SQL Server 2005 as part of a data consolidation exercise. I am concerned on a number of points:

Can I connect to SQL Server 2005 using old ADO connectors? We have about 40 Excel VBA solutions, and we dont want to upgrade to SQL Server 2005 if we will be unable to connect to the data source. We cannot upgrade any new versions of MDAC or upgrade the .NET framework so this is a concern.

Do we need .NET 2.0 or Visual Studio 2005 to connect and work with SQL Server 2005? If so, this will be a problem as we cannot upgrade any client beyond .NET 1.1, and only have VS 2003 as a scripted application we can install for any development.

Has anyone have any experience of the KPI capabilities of SQL 2005? We are bordering on committing to a Business Objects BI platform, and having worked with BO Dashboard Manager and Performance Manager for 4 months (it was horrible), I am not relishing the prospect and would like to propose SQL 2005 as an alternative.

Many, many thanks

Indy

View 4 Replies View Related

Sql Server 2005 Query Questions

Apr 4, 2006

I recently upgraded to sql server 2005 for developing on my local system and cant seem to find the option that automatically sets the drop procedure at the top and the usernames on the bottom of a procedure that I script as new. I used to do it in the old query analyzer so Im sure its in there somewhere. Thanks in advance for any help.RyanOC

View 4 Replies View Related

Collation Questions SQL Server 2005 SP2

Oct 10, 2007

A few collation questions on SQL Server 2005 SP2, which I'll call SQLS.The default collation for SQLS is apparently SQL_Latin1_General_CP1_CI_AS.I wish to use a variation of this, SQL_Latin1_General_CP1_CS_AIcollation, but there is no such collation returned fromfn_helpcollations(). Also, if I try to use this collation ina CREATE DATABASE stmt, SQLS yells about it.I see that there is a Latin1_General_CS_AI. What effects are therein using this collation? The SQL_* collations are SQL collations,while non-SQL_* collations are Windows collations, yes? SQLS runsonly on Windows, so am I safe in using Latin1_General_CS_AI? Whatdoes the CP1 in the SQL collation signify? Am I asking for trouble?------------------------------------Assuming that I set Latin1_General_CS_AI (or any other case-sensitivecollation) at the database level, I believe my DDL/DML for that databasealso becomes case-sensitive. How can I specify that I want ONLY my dataaccess to be case-sensitive, and not my DDL/DML? I don't want to haveto remember to type "select * from MyCamelCase" when "mycamelcase"should work.Any help appreciated.A new SQLS DBA..aj

View 3 Replies View Related

Sql Server 2005 Questions Regarding Editing Views

Jun 21, 2006

Previously in Sql Server 2000, we would be in enterprise manager, you'ddouble click on a view, and a nice little dialog box opened with the t-sqlstatetments, there was also a check sql syntax and apply and cancel buttons.Not exactly query anaylizer, just a quick lightweight dialog box. Is thisfeature still around? Seems like I have to go into the query anaylizer likemode to edit a view now. I am a total newbie to version 2005. Are there anyoptions I can set to make it behave the old way? All feedback isappreciated.TIA,~CK

View 2 Replies View Related

SQL Server Express 2005 Questions And Issues...

Nov 14, 2007



So I am fairly new to Express and I have installed it on my development machine; much tio my chagrin it is quite difficult to import data into SQLEXPRESS. I have a 'sa' account setup and I have created a new database and table within that database, however, when I try to import data into that table by setting up a link server to excel I am having some major issues!

I ran this code first to create the linked server...


DECLARE @RC int

DECLARE @server nvarchar(128)

DECLARE @srvproduct nvarchar(128)

DECLARE @provider nvarchar(128)

DECLARE @datasrc nvarchar(4000)

DECLARE @location nvarchar(4000)

DECLARE @provstr nvarchar(4000)

DECLARE @catalog nvarchar(128)

-- Set parameter values

SET @server = 'XLTEST_SP'

SET @srvproduct = 'Excel'

SET @provider = 'Microsoft.Jet.OLEDB.4.0'

SET @datasrc = 'c:Anchor_Hocking blactionlist.xls'

SET @provstr = 'Excel 11.0'

EXEC @RC = [master].[dbo].[sp_addlinkedserver] @server, @srvproduct, @provider, @datasrc, @location, @provstr, @catalog


Next I try to run any of the statement below and I get the errors pasted below...


SELECT * FROM Anchor_Hocking...Sheet1$


EXECUTE SP_TABLES_EX 'Anchor_Hocking'


SELECT * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',

'Data Source=c:Anchor_Hocking blactionlist.xls;User ID=sa;Password=sa;Extended Properties=Excel 8.0')...Sheet1$




OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "Anchor_Hocking" returned message "Cannot start your application. The workgroup information file is missing or opened exclusively by another user.".

Msg 7399, Level 16, State 1, Line 1

The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "Anchor_Hocking" reported an error. Authentication failed.

Msg 7303, Level 16, State 1, Line 1

Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "Anchor_Hocking".


The file is not open. I have granted full access rights to all users....I am really frustrated!

Also, how can I get SSIS on this machine with SQLEXPRESS?

-Brian

View 3 Replies View Related

Questions About Sql Server 2005 Timeseries Algorithm

May 16, 2007

First of all I would like to politely greet everybody as I'm new on that forum and new to Data Mining in fact.

To introduce myself I can say I'm a student of Computer Science and I'm trying to use Time Series algorithm for weather analysis. I know that forecasting weather is a hopeless task even for the fastest computers in the world but what I'm trying to do is a kind of aposteriori analysis of historical data to notice some dependencies or characteristic weather behavior on a specified region and perhaps make some short time predictions.


I tried Time Series Algorithm although I have some doubts about methodological justification of this choice (if You have any critical comments please share them with me). But my main questions are about the usage of the algorithm itself:




I've read the documentation and a tutorial on this page for historical predictions but I still don't know what exactly are HistoricalModelCount and HistoricalModelGap. I know that my historical predictions are bounded by a €“ HistoricalModelCount*HistoricalModelGap*, but it's a rather operational knowledge... The explanation is always clouded with an €œinternal model€? phrase. Can You point me to a document where I can find some more detailed information? (What is the form of the model? How is it built? etc.)

Periodicity Hint. How should I treat these optional values? Are they other possible periods of data? I have data about weather measurements made every six hours for thirteen years** so is it a good choice to set this parameter to {365*4,4} (The first goes for a year and the second for a day)?

This is a technical question and I'm really ashamed of myself that I bother You with it. On the time chart in a model Viewer I can see date from the last year only. Zooming out/in, clicking insanely on every pixel on the screen, did not give any result (apart of broken mouse buttons). Is is possible to browse that data in mining model viewer chart?
Thank You in advance for Your replies!



*This formula suggests how this parameters could work but I would like to know it for sure €“ don't want to make some awful mistakes in my project. :-)
**Of course I plan to reduce the amount of data but the period will stay.

View 2 Replies View Related

Questions About Sql Server 2005 Timeseries Algorithm

Apr 1, 2007

The first question is how to of TimeSeries Algorithm?

Using SQL Server 2005 TimeSeries Algorithm ,I build a data mining model.But after three days,it is still training.The data has 2,200,00 rows.

So what can i do to improve the processing speed.

Thanks!





The second question is parameters in Data Mining Query Task.

Data Mining Query Task is used to get data from data mining model.In the mining model form, i choose a mining model . And in the query form,i wrote a dmx ,"select flattened top 100 predicttimeseries([Xssl],1)
from [Time Series XSSL]".Last i choose a table that is for the data from mining model.

If the "100" is variable , how can i do ?



Thanks a lot!

View 1 Replies View Related

I Want The Sites For ASP.NET 2.0 And SQL SERVER 2005 Interview Questions.

May 12, 2008

I want the sites for ASP.NET 2.0 and SQL SERVER 2005 interview questions.


2) Sites for SQL SERVER 2005 concepts

View 6 Replies View Related

ASP.Net 2.0 Application Connection To SQL Server 2005 - Setup Questions

Jun 5, 2007

All:
 I am writing an Internet/Extranet based (ASP.Net 2.0) web application that uses SQL server 2005 as the database. I am using forms authentication on my web application. I am also storing the connection string to SQL server in my web config file. The conn string is encrypted using DPAPI with entropy. I currently have created a SQL login account on my SQL server for use by the web application. This is the user ID I am using in my conn string. The reason for this is because all persons using the application will NOT have a windows login.
Here is my question: The login I created currently has defaulted to the "dbo" role and therefore has "dbo" rights to the database. I want to setup up this login account so that all it can do is execute stored procedures. I dont want this SQL login to be able to do anything else. In my application I am using stored procedures for ALL data access functions, via a data access layer in my application. Can someone guide me step by step as to how to setup this type of access for this SQL login.
 Thanks,
Blue.

View 4 Replies View Related

Questions On Use Of SQL Server 2005 Functionality In Gridview Paging

Jun 25, 2007

I have a webpage that displays 4000 or more records in a GridView control powered by a SqlDataSource.  It's very slow.  I'm reading the following article on custom paging: http://aspnet.4guysfromrolla.com/articles/031506-1.aspx.  This article uses an ObjectDataSource, and some functionality new to Sql Server 2005 to implement custom paging.There is a stored procedure called GetEmployeesSubestByDepartmentIDSorted that looks like this:ALTER PROCEDURE dbo.GetEmployeesSubsetByDepartmentIDSorted(    @DepartmentID        int,    @sortExpression        nvarchar(50),    @startRowIndex        int,    @maximumRows        int)AS    IF @DepartmentID IS NULL        -- If @DepartmentID is null, then we want to get all employees        EXEC dbo.GetEmployeesSubsetSorted @sortExpression, @startRowIndex, @maximumRows    ELSE      BEGIN        -- Otherwise we want to get just those employees in the specified department        IF LEN(@sortExpression) = 0            SET @sortExpression = 'EmployeeID'        -- Since @startRowIndex is zero-based in the data Web control, but one-based w/ROW_NUMBER(), increment        SET @startRowIndex = @startRowIndex + 1        -- Issue query        DECLARE @sql nvarchar(4000)        SET @sql = 'SELECT EmployeeID, LastName, FirstName, DepartmentID, Salary,                     HireDate, DepartmentName        FROM            (SELECT EmployeeID, LastName, FirstName, e.DepartmentID, Salary,                     HireDate, d.Name as DepartmentName,                     ROW_NUMBER() OVER(ORDER BY ' + @sortExpression + ') as RowNum             FROM Employees e                INNER JOIN Departments d ON                    e.DepartmentID = d.DepartmentID             WHERE e.DepartmentID = ' + CONVERT(nvarchar(10), @DepartmentID) + '            ) as EmpInfo        WHERE RowNum BETWEEN ' + CONVERT(nvarchar(10), @startRowIndex) +                         ' AND (' + CONVERT(nvarchar(10), @startRowIndex) + ' + '                         + CONVERT(nvarchar(10), @maximumRows) + ') - 1'                -- Execute the SQL query        EXEC sp_executesql @sql      ENDThe part that's bold is the part I don't understand.  Can someone shed some light on this for me?  What is this doing and why?Diane 

View 4 Replies View Related

Sql Server 2005 Standard And Express Connection Questions

Jul 15, 2007

Hi all, i have standard edition of sql server, on a server hat doesnt have sql server standard would i be able to connect to it using my connection string. Or does the server has to have standard edition too. Is this same for express edition, and if possible to do this whats the difference between express connection string from standard edition thanks

View 3 Replies View Related

A Couple Of Questions On Remote Connection To SQL Server 2005 Database

Nov 23, 2006

I have a SQL Server 2005 database (called BDHSE) in a PC which i call PC1. I have a second PC (PC2) and both are within a network (a WLAN).

What i want is to have access to BDHSE from an application in VB6 (APP1) running in PC2. All the INSERT, DELETE, UPDATE records process is done through APP1.

APP1 ia currently running in PC1 and is to be installed on PC2.

I have these questions:

1. What do i need to install in PC2 since all the INSERT, DELETE, and UPDATE is done using APP1? I guess i only have to install the Microsoft SQL Native Client (with all the prerequisites of course) but i am not sure.

2. In the APP1 made in VB6, do i have to change the connectionstring since i am accesing the database which physically is at PC1 and the APP1 will be used in PC2?

3. Any advice you can give me on doing this will be well received.

Thanks in advance,

BSc Fernando Martinez

View 4 Replies View Related

Vb.net 2005, Sql2005 Not Locking The Records While Editing

Dec 18, 2007

I have created a database and used visual basic 2005.net2.0 to build the application. I used the data wizard. it created datatables and then I bound it to the contols on the form. The program is published to the server and each instance loads from the server and executes. When it stops, the instance is destructed from the host pc. The pc's are large ram and very small hard drive. These were the specs of the job. now when each pc loads an instance of the program, they can all load and edit the same exact record. I tried to bust it and I got on the same record and changed first name on one and last name on the other. the second one overwrote the first name edit. All of the data handling is done inside of the dataset designer and it does not allow edits. ( actually you can edit, but the next time you save it, or run it, it will rewrite what you added and it will be gone.) is there anything I can add to the form vb to tell it to lock the current record?

View 3 Replies View Related

Recently Updated To Sql 2005 From Sql 2000 Now Recieving Locking Problems

Apr 24, 2008



Good afternoon everyone,

I hope that I am not asking a question which has been answered many times in the past, I did a search but could not find an answer. These may be beginner questions, so bear with me as I am something of a beginner.

This week our organization updated from SQL 2000 to SQL 2005. We are using a Microsoft Access front end for this data and the information is entered through forms into the correct tables. When our researchers are enter the information they also have to sometimes search existing information to ensure they do not duplicate what is already in there. For this we use several access queries. This has worked well on the SQL 2000 server without any issues. However, now that we are on 2005 we are starting to recieve ODBC Call fail errors and errors which specify that they are a result of a deadlock. My first question is, are the ODBC call fail errors possibly locks which caused the ODBC connection to time out? My second question is why am I recieving these errors in 2005 but not 2000?


Thanks in advance for any help

- Hitz

View 1 Replies View Related

SQL 2005 Mirroring Questions

Apr 25, 2007

Hi guys,
 I have read many articles on the matter and I have probably used up all my printer's ink in doing so,  however, some questions still remain.
1) What happens if I have to reboot the mirror.. security update, etc.? Obviously the session is broken during reboot, but would I have to do another backup of the principal and resync everything?
2) I know it is not best practice but at this point I have no choice, however, I wanted to get your guys feedback on having two instances of SQL2005 on my development box. One for the mirroring of the production and the second for development. The two instances would live on their own drive... not partitioned and have adequate memory and space.
What would I have to look forward with this?
3) Lastly, I am still uncertain if mirroring is approved for production. Is it?
 
Thanks for your help.

View 4 Replies View Related

SQL 2005 - Syntax Questions

Jan 29, 2008

What is the proper syntax to return records that appear in 1 table but NOT the other table? I have 2 tables that should contain the same records(based on shipping report number), so my join will use this field. How can I only return the data where the shipping report number appears in only 1 of the tables though>?

View 3 Replies View Related

SQL 2005 Encryption Questions

Apr 26, 2006

Hello,I have been researching the use of symmetic and asymmetic encryption inSQL 2005 and I am pretty excited to give it a try. Through examples, Ican encrypt the data, but I cant figure out what to do next...What I want:1. our social security field to be encrypted so that only the person(s)that need it can decrypt it.2. prevent DBA's from decrypting the data themselfs3. Simple way to encrypt the data on the table (maybe a trigger?)I thought I would use asymmetric keys, this way I can embed the publickey into my data warehouse process to encrypt the data.I thought I would prompt the user for the private key when the reportruns, that way I wont store the key on the server.This would be a place to start.Someone in the office said that we can store the keys in Activedirectory, so maybe I could make this seemless to the user running thereport?I've found a lot of great articles that got me started, but I amneeding the next stepAny Ideas would be apprecitated!TIARoblinks to articles I have found handy:http://www.databasejournal.com/feat...int.php/3483931http://www.devx.com/dbzone/Article/29232/0/page/3http://www.sqlservercentral.com/col...rintversion.asp

View 4 Replies View Related

Several 2005 Security Questions

May 28, 2008

I am an Oracle DBA who inherited SQL Server administration. I have been to some 2005 training and I've been supporting several DB's for a while now but I still have some nagging security questions and would appreciate some help.

1) I needed to grant execute on a specific procedure but when I drilled down, I found that it already had execute in the EFFECTIVE PERMISSIONS. I would like to know how to tell where it got this permission from. I did some digging and found that execute appears to have been granted to the schema itself. I didn't know you could do that. Would this result in the effective permission that I observed?

2) I am trying to audit the permissions on existing principles. In Management Studio I drilled down and found permissions under Security and under Server Properties. There are also more permissions under Database Properties and Security and still more assigned at the specific object level. Where can I go or what can I query to see ALL the permissions a principle has been granted across the entire server?

3) If I grant a principle CONTROL to a schema does that also automatically confer DDL rights to said schema or would additional privs be required to perform DDL?

Thanks in advance,
Roger Westbrook

View 1 Replies View Related

SQL 2005 Install Questions - CD Has Different Options Then DVD

Oct 13, 2006

I printed out several pages of documentation regarding the install of 2005. When I tried performing the installation from CD I double-click splash.hta, as indicated in "How to: Install SQL Server 2005 (Setup)". Under Install I see two options:

Server components, tools, Books Online, and samples
Run the SQL Native Client Installation Wizard

The documentation indicates I should be clicking on "Run the SQL Server Installation Wizard", which is not an option. If I select "Run the SQL Native Client..." it appears to be only installing the client and does not follow the remainder of the instructions. I can't find any information on Microsoft's site on how to perform an install from CD.

I'm guessing I should be using the DVD, but has anyone else noticed the "How to" documentation is a little off and have you found any other documentation that is more accurate?

Thanks, Dave

View 1 Replies View Related

2005 Memory Management Questions

Sep 17, 2007

I've read and noticed SQL 2005 handles memory differently then 2000. In 2000 if I told a server it had 6GB to use, it allocated the memory. In 2005 I have one 32-bit server with 6GB of memory and one 64-bit server with 32 GB. If Target Server Memory is the amount of memory SQL Server would like to have, how does that correspond to Maximum Server Memory? Also, how is Target Server Memory determined?

32-bit
Physical Memory = 8GB
Target Server Memory = 6GB (Willing to consume)
Total Server Memory = 690MB (Currently consuming)
Minimum Server Memory = 2GB
Maximum Server Memory = 6GB

For the 32-bit server the Target Server Memory matches Maximum Server Memory

64-bit
Physical Memory = 32GB
Target Server Memory = 28GB (Willing to consume)
Total Server Memory = 397MB (Currently consuming)
Minimum Server Memory = 4GB
Maximum Server Memory = 30GB

For the 64-bit server the Target Server Memory is less then the Maximum Server Memory

Lock Pages in Memory is set for the service account. Neither server above has yet to be released to production and only the 32-bit server has any users. In 2000 when SQL Server started I could count on it using about 1.72GB of memory immediately. Seeing the servers above consume only only 690MB and 397MB has me concerned. Is this just a case of SQL Server 2005 handling memory better then 2000?

Thanks, Dave

View 4 Replies View Related

Questions On LogFiles: SQL Express 2005

Jul 8, 2007

Note: Please refer to my previous message to see the current VS2005 C# code I am using to create my database.



This database will be used for short term operations. In otherwords, a user will create the database, generate a lot of data that will be created using:

SqlBulkCopy bcp;

Then, there will be 'activity'... updates, queries, deletes, etc for a few days and then the user will at a minimum remove all of the data and at some future point in time, will recreate the data and do the process all over.



In otherwords, I am not concerned about backups or transaction logging or recovery or any of these 'normal' issues of using a SQL database.



That said, how do I use SMO to keep the LDF limited in size and as small as possible (assuming I can't turn of the tranaction log to begin with).



2nd question is...I read soething about being able to log ONLY the exection of a Bulk Copy operation. How do I specify that? This is my SQLBulkCopy code.



SqlBulkCopy bcp;

SqlCommand sqlCmd = new SqlCommand();

sqlCmd.Connection = m_dbFiles.conMain;

bcp = new SqlBulkCopy(sqlCmd.Connection);

bcp.DestinationTableName = "tblMyTable";

bcp.WriteToServer(datatable);

View 1 Replies View Related

2 Questions (SQL 2000 To 2005 Database Conversion)

Aug 8, 2006

I have a db in SQL server 2000 developer edition. I am using Visual Studio 2005 standard, and also VWD Express. I would like to just access the database that is in SQL server 2000 so I can get on with developing the site, but VS2005 refuses to recognize the instance. It recognizes 2005 instances right away.The services are all running, the network protocols are enabled, uid's/pw all of that is correct. I am getting the "named pipes" error (the named pipes protocol is enabled).Any suggestions? I'd really rather just work with the db as-is in SQL 2000. But I can't get it to connect. I can connect to it if I export it to SQL 2005, (on the same development machine) but can't get the stored procs over to the 2005 db. So my web app is not finding the stored procs and won't run.Do I need to uninstall SQL 2005 from this box if I want to use SQL 2000?Thanks,--Donnie

View 13 Replies View Related

Where Do I Post Reporting Services 2005 Questions

Aug 28, 2007

Where do I post Reporting Services 2005 Questions

Thank you,

View 1 Replies View Related

Few Questions Regarding SQL Reporting Service 2005. (PageBreak)

Dec 9, 2007


Hi,

During last year, I developed more than 200 Reports using SQL Reporting Service. It is really fantastic and in many ways it has reduced lot of work.

But still I am not able to find out solution of following issues,

1) Where to set portrait or landscape printing mode? It takes based on paper size, if 8.5 x 11 then portrait else landscape.
Now I want to set myself in report irrespective of page size then HOW TO DO IT?
2) I want to set Height, Width and Merge cells options based on Expression like many other things we do, ex. Font, Text Align, Visibility, etc€¦ HOW TO DO IT?
3) I am not able to find out option for Vertical Cell merging? Is it available or is there any trick?
4) If entire group or table can be printed within a page then it is fine but if page break occurs then I want to print Entire Group or Table on next page.
In many cases you can€™t allow page break like, Pay Slip of Salary, Purchase Order Month Wise Schedules, etc€¦
So some option should be there like €œInsert Page break if table or group is not able to fit on current page€? HOW TO DO IT?
5) Is there any way to know that there is page break in this Table or Group?
6) Can I Insert Page Break based on Expression?

Theses problems really create headache. There must be some solutions.

Kindly Help,

Nilesh

View 2 Replies View Related

Few Simple (silly) Questions On SQL 2005 && CLR Integration.

Mar 2, 2007

Hi all,

I need few clarifications from you experts regarding SQL server 2005 & CLR integration ( my questions might be simple and silly, please bear with me).

A web service should be invoked from the SQL Server , Is CLR stored procedure only way to do that ?
Does SQL Server uses the CLR only when the CLR support is enabled ? OR SQL Server itself runs on top of the CLR no matter it is enabled or not ?
What are the major disadvantages of using CLR stored procedures instead of T-SQL?

Thanks in advance,

DBLearner

View 3 Replies View Related

Service Stop/start/restart Questions 2005 SP2

Oct 15, 2007

A few service stop/start/restart questions on SQL Server 2005 SP2, whichI'll call SQLS.It looks as if there are *potentially* 6 ways to start/stop SQLSServices like the engine itself, integration services, reportingservice, Agent..-SQLS Configuration Manager-SQLS Surface Area Configuration (for Services and Connections)-Mgmt Studio Local (on server)-Mgmt Studio Remote (on client)-Windows Control Panel->Admin Tools->Services-Command Prompt (ala net start MSSQLSERVER)By policy, I am /not/ Administrator on the server. But I am SysAdminrole in SQLS. I have had various levels of success starting/stoppingservices in the ways listed above. In some I get Access denied, and inothers I get no msg and it simply doesn't work.Is there some special non-Admin OS group I need to be in to start/stopservices? Is this handled differently in the different interfaceslisted above?It seems like my best success for starting/stopping the engine and Agentis in /local/ Mgmt Studio, but /not/ remote Mgmt Studio - the optionsare greyed out on a remote client. Is this by design? Is it a SQLSbug?I'm sure I'm not the only SQLS DBA who does not have Admin rights on hisserver who wants to start/stop services. Generally speaking, how isthis intended to work?Any help appreciated.Allen JantzenA freshly minted DQLS DBA

View 1 Replies View Related

SQL Server Row Locking

Jun 28, 2001

I have a table X with 61390 rows on it. IT is a crucial table which is being read and updated constantly. If I create a clustered index on the Primary Key (identity column) and run UPDATE x SET c1 = 1234 where PKCOL = 4321 the best lock I can get is a table Lock. If I create a compound non-clustered index on C1 and PKCOL the best lock I can get is a Page Lock. PAge Lock is OK but as this table is in High demand I want a row lock so others can carry on referenceing other parts of the table. WHy does it take a page lock and not a Row lock?

View 1 Replies View Related

Row Locking In SQL Server 7.0

Jul 7, 1999

Hi,

We are becoming increasingly more involved with SQL Server 7.0 development.
Can someone show me a good example of ROW LOCKING with exclusive and share
modes?
If I am starting a transaction with a SELECT and later an UPDATE, what is
the best way to handle locking?

Thank you for any help on this issue.
Steve

View 1 Replies View Related

Locking Cb On Server

Mar 6, 2007

is there a way of locking db on server. i am doing a overtime and pay system but there is a few members of IT staff that are very nosey and this is senstive information and i dont want them looking at the tables on the server can these be locked for only me to view

View 3 Replies View Related

SQL Server Locking

Mar 22, 2007

Hello,

I'm trying to determine if a row in a table is locked. First, I issue a lock on some rows. Then, I query the syslockinfo table to see which rows are locked. It tells me which rows are locked, but it returns a hashed resource value that, I guess, is somehow related to the key. How can I un-hash the value? Or, how can I hash my own key so that I can compare it with the hashed value? I have tried using the HashBytes function, but I don't know what is actually being hashed when the row is locked.

For example:

begin transaction

select * from test with (rowlock, updlock)

select * from master..syslockinfo

where rsc_objid = (select id from sysobjects where name = 'test') and req_mode = 4

returns:

rsc_text = (010086470766); rsc_bin = 0x000708001374FC020100010086470766

Thanks.

View 3 Replies View Related

Locking SQL Server

Apr 23, 2007

Hi



I have a setting where two Web Servers access the same SQL Server database. To gaurantee consistent data writes and reads I need to lock part of the database in special conditions.



I know exactly when I need particular tables of the database to be locked, but I am in doubt of how to do it. Does SQL Server 2005 have any mechanism for providing locks gauranteed to free the lock if one of the web servers crash - or if SQL Server itself crashes?



/Bezbos

View 1 Replies View Related

Record Locking In ADO.net/Sql Server

Feb 18, 2005

Currently I am working on asp.net Intranet system.I need some suggestion on records locking for Sqlserver & ASP.net.
I want to prevent two user to open the same record for modify.Means if some one has open one record (id=xxxxx) for modify then others should not be able to open same same record (id=xxxxx) for modify .otherwise if both user will open/update same record then information in database will not be updated correctly.
Any idea how we can do the record locking so that not two users can open same record(id=xxxxx) for modify.

Thanks in Advance
Arvind

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved