[SQL Server 2008 issues] Performance of principal db in Mirroring |
- Performance of principal db in Mirroring
- Upgrade form Sql2008 Standard to Enterprise Edition
- SQL Server monitoring ideas
- problem
- Error message while adding Clustered Index
- Replace database with same database id
- Identical SP calls from different SPIDs
- Use of global table in SSIS package/bcp utility
- SSIS FTP Task
- SQL Server 2008 R2 AND VMware vSphere 5
- Data import
- Error changing SQL Server account user
- SSIS 2008 & Excel Header Row
- Capture stored procedure/queries from SQL Profiler
- SSRS Dynamic report exporting issues
- SSRS Dynamic report exporting issues
- Trying to get one record out of multiple records that are caused by case when statements
- Linked server restirction
- How is free space in a database re-used after deleting data?
- What is the easiest way to alter fields' default
Performance of principal db in Mirroring Posted: 02 Aug 2013 06:55 PM PDT HiAccording to http://technet.microsoft.com/en-US/library/cc917680 in database mirroring,"As the principal server hardens its principal database log records to disk, it also sends them to the mirror. The principal then waits for a response from the mirror server. The mirror responds when it has hardened those same log records to the mirror's log disk."I want to know if this behavior causes problem in performance of principal database because of these waits? |
Upgrade form Sql2008 Standard to Enterprise Edition Posted: 02 Aug 2013 09:06 AM PDT Hello,We have currently build new Server 2008R2 with 8 core CPU with 32 GB Memory and currently working to get license for sql server 2008R2 Enterprise edition.We have currently sql 2005 standard and planning to migrate to new server as mentioned above.1) If I upgrade 1st using sql standard edition and later upgrade to Enterprise with using 8 core CPU with 32 GB Memory will be ok?Can we upgrade form Sql2008 Standard to Enterprise Edition?Let say we have sql 2008/sql 2008R2 already running and I would like to upgrade to sql 2008/sql 2008R2 Enterprise Edition.Is it just upgrade instance wizard I have to follow?Reading from the articles, little confused that is it we need to do another backup/restore too?If I install just cd and run the upgrade Instance wizard will be work or any other procedure I have to follow?I think I just need to restart the service and server, correct?2) I have another question is that if I download from the technet for testing then if I have to upgrade it using production licensed key, can we do and is it the same way?Thanks, |
Posted: 02 Aug 2013 04:55 AM PDT Hi guys,For the last 4 days I've been working on setting up SQL Server monitoring jobs & passing the values to Oracle for them to be displayed on the Intranet. The result is as follows: [url=http://www.pasteall.org/pic/show.php?id=56700]http://www.pasteall.org/pic/show.php?id=56700[/url] I have this for the 13 databases so far as well as drill down pages (full growth history graph instead of most recent 5; all jobs & backups collected etc).My next table I plan to include is an Alerts/Issues table containing things that may need to be looked at. Some ideas I have are:- TLog > n% of the database- No backup in n days- db is in bulk_logged- db is in full but no tlog backup for n days (we had one unknowingly in Full then a 120gb tlog for a 1.5gb db)I can't remember if I jotted down more on my paper at work. Does anybody else have ideas of what could be included? My jobs currently run hourly (recent changes), daily (backup, job & file info) & weekly (the db size, it will be weekly soon at least).Anyone have any other ideas of things that could be monitored? I plan to add more sp_config values for the top table (server info) and probably collect some stats like buffer cache hit ratio maybe which could be graphed.Any ideas welcome :) |
Posted: 02 Aug 2013 05:58 AM PDT DateTimevalue1= (given)DatetimeValue2=?I need to find out DatetimeValue2 from a source table in remote server using these values and pull data between DateTimevalue1 and DatetimeValue2.Dateime2 will be a column in the source table based on some calculation and greater than DateTimevalue1.I am trying to get these values to variable values in ssis and use them as parameters in dataflow task and pull data between the two date ranges – how can this be achieved? Thanks. |
Error message while adding Clustered Index Posted: 02 Aug 2013 06:26 AM PDT Hi everyone..I am getting following error message while adding Clustered Index to my table..[code="sql"]CREATE CLUSTERED INDEX [xIK_Style_ROLLUP_MONTHLYTIMEKEY] ON [dbo].[Style_ROLLUP]( [MONTHLYTIMEKEY] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)GO[/code]Error:The statement has been terminated.Msg 1105, Level 17, State 2, Line 3[b]Could not allocate space for object 'dbo.SORT temporary run storage: 482346876993536' in database 'RPDB' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.[/b]Database RPDB already has auto growth by 10% for max Unlimited size on File property. Disc has 80% space available as well., What should I do??? I am not getting any error while creating Non Clustered index!!! |
Replace database with same database id Posted: 02 Aug 2013 05:40 AM PDT I have to replace XX database from backup in production. The third party tool and reporting services have been configure to database id so I want to restore database without breaking database id. Can I know simple overwrite restores database with same database id? or any other method is there to restore keeping same database id. |
Identical SP calls from different SPIDs Posted: 02 Aug 2013 01:30 AM PDT I have a stored procedure that takes a number of parameters. It will first check to see if a record exists based on the parameters. If a record exists, it will be updated with the values passed in. If a record doesn't exist, one will be created with the values passed in. Each record has a primary key/clustered index to prevent the same record from being inserted more than once.Also, there's a C#/ADO.NET/webservice that calls the SP.In our production environment I'm getting errors. There errors are because the same record is trying to be added more than once. It doesn't happen very often (about 1 for every 100,000 calls). I have never been able to duplicate this error in a test environment. I did one time catch this error while doing a profile.What's happening is there are 2 SPIDs making the EXACT same call to the SP. So when the SPs execute they both think a record needs to be created. This first one works and the second one fails.I'm trying to figure out why there are 2 SPIDs making the exact same SP call.Any ideas or suggestions?Thanks! |
Use of global table in SSIS package/bcp utility Posted: 01 Aug 2013 10:46 PM PDT We have a process to send files to a customer through the bcp queryout process. Before we do that, we have in the SSIS package a SQL task to populate a global table with Personal IDs. The next step in the SSIS package is a bcp queryout process to bounce against a field in the table that is eventually a script to do a query that joins to the global temp table for the Personal IDs and that output is to go to a text file.We have a table with 114 scripts that are written to the files. But, for some reason, it stops after 54 files.Testing the SQL script with the global table being populated first and then the bcp output works.I need to let my management know why the current process bombs out. Does anyone know if there is a limit to the number of uses of a global temp table?Bottom line I have fixed the process by actually populating a real table and have the bcp reference that. To which it works. But I still need to know why.Should I run a SQL trace when the job runs to see if anything there picks up? In the testing, I got no error messages.Thanks |
Posted: 02 Aug 2013 03:26 AM PDT When I run MY dtsx package in BIDS The FTP Task downloads a zip file that is 10MBs. Which is correct.When I execute the dtsx package from a SQL agent job the FTP task downloads a zip file which is only 1kb and the zip file is corrupt. Which of coarse causes my dtsx package to error out.Has anybody had this problem before? Any fixes? |
SQL Server 2008 R2 AND VMware vSphere 5 Posted: 02 Aug 2013 02:51 AM PDT Currently if the organization has only physical production environment. Can they have staging and testing environment on VMware the virtual machines. Can we also have the cluster environment in VMware? does any one know the best practices site to use vmware for sql 2008r2 environment? thanks |
Posted: 31 Jul 2013 12:51 AM PDT Greetings friends,I have a .dta file that's formatted in a strange way and I would like to discuss ways of importing into a staging database.The first field of each record consists of a record type. For each entity there will be one record of type 01. Also, for each record type 01 there will be one or more record type 02. There maybe zero or more record type 03, 04, 05 and 06For example[quote]01*9517469000*117844165*0335*The Occupier* CRICKET CLUB***02*1*Ground*Tea Room*35.40*9.50*33602*2*Ground*Changing*28.00*9.50*26602*3*Ground*Kitchen*16.40*9.50*15602*4*Ground*Scorer*3.80*9.50*3602*5*Ground*Mower Shed*15.00*2.38*3603*Cricket Square*2.0*100.00*+20003*Cricket Ground*2.0*850.00*+172601*9517470000*200027165*0335*The Occupier* CRICKET CLUB***02*1*Ground*Club Room*32.60*19.00*61902*2*Ground*Changing Room*21.60*12.67*27402*3*Ground*Internal Storage*2.80*9.50*2702*4*Ground*Bar*13.90*19.00*26403*Cricket Square*1.0*100.00*+10003*Cricket Pitch*2.8*500.00*+142001*9517471000*203509165*0335*The Occupier*CRICKET & FOOTBALL CLUB***02*1*Ground*Pavilion*86.20*20.00*172402*2*Ground*Garage*23.40*10.00*23402*3*Ground*Changing Room*25.00*13.33*33303*Cricket Square*1.0*100.00*+10003*Playing Field*1.8*500.00*+91001*9517472000*200736165*0335*The Occupier*PT GNDOUSE****ROWOSE*02*1*Ground*Kitchen*37.14*16.67*619[/quote]I would like to create 6 staging tables to hold the different types but I'm not sure if it's best to load all the data into SQL first then split it out or go down the SSIS route for this kind of thing? Obviously once the data is split there must be a unique ID which links the records together. Any suggestions?Thanks in advance. |
Error changing SQL Server account user Posted: 02 Aug 2013 02:49 AM PDT I need to change the user that SQLServer runs under, currently it runs under the "LocalSystem" account. When I go under the SQL Server Configuration Manager and change SQL Server's login account, I received the following error: WMI Provider Error [call to WM I Provider returned error code: 0x800742a2].Currently, our SQL Server is not behind a DC.Any ideas why I would be receiving this error would be greatly appreciated. |
Posted: 19 Dec 2011 11:08 PM PST This is posted here for lack of a better place to put it.I am populating an Excel sheet with a report that uses different column sizings. There is a header row with a single column, a detail row with 4 columns, and a footer row of a single column. Here's an example:Report Covers January 1, 2011 through March 3, 2011 <- header rowCName CZip Program SignUpDate <- data rowBoss Hoss 55124 Doodah 01/10/2011 <- data rowJethro Gibbs 12345 NCIS 02/27/2011 <- data rowTotal Customers on the Program: 2 <- Footer rowI can't use a .csv because when I rename it to Excel, it doesn't import the detail data into 4 columns. It imports it into one and the receiver of this data requires properly formatted Excel. I managed to get my header, detail, and footer detail pulled from a proc where I stuck the header & footer in column one and put spaces in the other 3 columns. But now I'm running into an issue where I have an extra header on the spreadsheet. I am using an Execute T-SQL task to create the Excel Sheet. This task works fine, but it creates Sheet1 with the below names in the first row of the sheet. In other circumstances, I would be happy with this, but not today.[code]CREATE TABLE `Sheet1` (CName LongText,CZip LongText,Program LongText,SignUpDate LongText)GO[/code]Now my spreadsheet looks like this:CName CZip Program SignUpDate Report Covers January 1, 2011 through March 3, 2011 <- header rowCName CZip Program SignUpDate <- data rowBoss Hoss 55124 Doodah 01/10/2011 <- data rowJethro Gibbs 12345 NCIS 02/27/2011 <- data rowTotal Customers on the Program: 2 <- Footer rowI need to get rid of this first row (the faux header created by the T-SQL task) before I send everything to the customer. Any thoughts? |
Capture stored procedure/queries from SQL Profiler Posted: 02 Aug 2013 12:32 AM PDT I need to capture all the stored procedures and queries that takes more than 20 seconds to run from SQL Profiler.Please guide? |
SSRS Dynamic report exporting issues Posted: 02 Aug 2013 01:32 AM PDT We are getting timeout error while exporting Dynamic reports (SSRS2008) into excel with 11000 rows and 51 columns.please help |
SSRS Dynamic report exporting issues Posted: 02 Aug 2013 01:28 AM PDT Hello,We are getting Timeout problem while exporting Dynamic SSRS report (which is having 51columns and 11000 rows ) into excel through .net web application. We are running into this problem quite long time..please help its little bit urgent.Many thanks in Advance! |
Trying to get one record out of multiple records that are caused by case when statements Posted: 01 Aug 2013 11:55 PM PDT Each patient in the table, TEST, can have more that one Ethnicity but, I would like all the data to show on only one record. Here's my query, along with some sample data.[code="sql"]declare @StartDate datetime, @EndDate datetimeset @StartDate='2013-05-01'set @EndDate='2013-06-30';with Patientsas(select SourceID, PatientID, AdmitDateTime, LocationID from AbstractData awhere a.PtStatus='IN' and a.AdmitDateTime>=@StartDate and a.AdmitDateTime<datediff(d, -1, @EndDate) and a.LocationID!='A3/TCU')select a.PatientID as 'Identifier', a.AdmitDateTime, month(AdmitDateTime) as 'MonthAdmitted', b.City, b.PostalCode as 'Zip', a.LocationID as 'InPatientUnit', b.RaceName as 'Race', c.Response as 'PrimaryLanguage', d.Response as 'PreferredLanguage', e.Ethnicity, e.Ethnicity2, e.Ethnicity3from Patients ainner join MriDrcPatients b on a.SourceID=b.SourceIDand a.PatientID=b.PatientIDleft join (select SourceID, PatientID, Response from MriPatientClinicalQueries where QueryID='COMMBARR') c on a.SourceID=c.SourceIDand a.PatientID=c.PatientIDleft join (select SourceID, PatientID, Response from MriPatientClinicalQueries where QueryID='COMMBARR3') d on a.SourceID=d.SourceIDand a.PatientID=d.PatientIDleft join (select SourceID, PatientID, case when QueryID='ETHN1' then Response end as 'Ethnicity', case when QueryID='ETHN2' then Response end as 'Ethnicity2', case when QueryID='ETHN3' then Response end as 'Ethnicity3' from MriPatientClinicalQueries where QueryID in ('ETHN1', 'ETHN2', 'ETHN3') and Response is not null) e on a.SourceID=e.SourceIDand a.PatientID=e.PatientIDorder by a.PatientID, month(AdmitDateTime)[/code][code="sql"]create table TEST(Identifier varchar(10),Race varchar(10),AdmitDateTime datetime,MonthAdmitted int,City varchar(100),Zip varchar(10),InPatientUnit varchar(5),Race varchar(10),PrimaryLanguage varchar(8),Ethnicity varchar(50),Ethnicity2 varchar(50),Ethnicity3 varchar(50))insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '100276','WHITE','ENGL','ENGL','OTHOTHER','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '100276','WHITE','ENGL','ENGL','NULL','NULL','ALBANIAN')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '100328','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '100328','WHITE','ENGL','ENGL','NULL','NULL','SWEDISH')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '101163','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '101382','WHITE','ENGL','ENGL','ITA2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '101382','WHITE','ENGL','ENGL','NULL','IRI2108-9','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '101382','WHITE','ENGL','ENGL','ITA2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '101382','WHITE','ENGL','ENGL','NULL','IRI2108-9','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '101726','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '101773','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '10227','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '10272','UNKNOWN','ENGL','ENGL','IRI2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '103092','WHITE','ENGL','ENGL','IRI2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '104654','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '1052','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '105307','WHITE','ENGL','ENGL','IRI2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '105307','WHITE','ENGL','ENGL','NULL','AMEAMERCN','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '105410','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '105410','WHITE','ENGL','ENGL','NULL','IRI2108-9','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '107139','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '107466','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '108584','WHITE','ENGL','ENGL','SPA2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '111168','WHITE','ENGL','ENGL','OTHOTHER','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '111168','WHITE','ENGL','ENGL','NULL','NULL','JEWISH')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '11173','WHITE','ENGL','ENGL','PORPORTUG','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '11173','WHITE','ENGL','ENGL','PORPORTUG','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '112026','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '112821','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '113118','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '114061','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '115492','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '115492','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '11573','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '115744','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '11617','WHITE','ENGL','ENGL','ITA2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '11617','WHITE','ENGL','ENGL','NULL','AMEAMERCN','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '11617','WHITE','ENGL','ENGL','ITA2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '11617','WHITE','ENGL','ENGL','NULL','AMEAMERCN','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '116456','BLACK','ENGL','ENGL','AFR2058-6','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '116902','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '116927','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '117034','BLACK','ENGL','ENGL','AFR2058-6','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '117858','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '118817','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '119170','BLACK','ENGL','ENGL','AFR2058-6','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '119399','BLACK','ENGL','ENGL','AFR2058-6','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '120155','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '120495','WHITE','ENGL','ENGL','ENG2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '120547','WHITE','ENGL','ENGL','ITA2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '120774','WHITE','ENGL','ENGL','PORPORTUG','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '121387','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '121571','BLACK','ENGL','ENGL','AFR2058-6','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '12281','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '123138','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '123138','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '123138','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '125713','WHITE','ENGL','ENGL','GRE2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '125748','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '125901','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '126237','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '126308','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '126308','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '126443','BLACK','ENGL','ENGL','AFR2058-6','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '126993','WHITE','ENGL','ENGL','IRI2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '12822','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '128262','WHITE','ENGL','ENGL','POLEASTEU','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '128705','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '12911','WHITE','ENGL','ENGL','IRI2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '130487','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '130487','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '130804','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '130804','WHITE','ENGL','ENGL','NULL','IRI2108-9','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '131334','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '131702','WHITE','ENGL','ENGL','IRI2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '131702','WHITE','ENGL','ENGL','NULL','ITA2108-9','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '133413','BLACK','ENGL','ENGL','AFR2058-6','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '134153','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '134544','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '134544','WHITE','ENGL','ENGL','NULL','NULL','ARMENIAN')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '134803','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '134806','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '13605','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '136260','WHITE','ENGL','ENGL','ITA2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '136631','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '137608','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '138255','WHITE','ENGL','ENGL','EASEASTEU','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '139187','WHITE','ENGL','ENGL','ENG2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '139878','UNKNOWN','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '140051','WHITE','ENGL','ENGL','SCO2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '140200','WHITE','ENGL','ENGL','PORPORTUG','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '140252','UNKNOWN','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '141678','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '141685','WHITE','ENGL','ENGL','ENG2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '141905','WHITE','ENGL','ENGL','IRI2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '142028','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '142290','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '142290','WHITE','ENGL','ENGL','NULL','SCO2108-9','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '142414','WHITE','ENGL','ENGL','IRI2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '142414','WHITE','ENGL','ENGL','NULL','AMEAMERCN','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '143156','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '144571','WHITE','ENGL','ENGL','ENG2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '144571','WHITE','ENGL','ENGL','NULL','FRE2108-9','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '144571','WHITE','ENGL','ENGL','NULL','NULL','AMERICAN')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '145313','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '146018','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '146018','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '146352','WHITE','ENGL','ENGL','ITA2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '146352','WHITE','ENGL','ENGL','NULL','FRE2108-9','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '146402','WHITE','ENGL','ENGL','ENG2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '146402','WHITE','ENGL','ENGL','ENG2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '146842','WHITE','ENGL','ENGL','IRI2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '146842','WHITE','ENGL','ENGL','NULL','ENG2108-9','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '146842','WHITE','ENGL','ENGL','NULL','NULL','ITALIAN')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '147660','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '149444','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '149444','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '149444','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '149990','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '149990','WHITE','ENGL','ENGL','AMEAMERCN','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '150031','WHITE','ENGL','ENGL','FRE2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '150031','WHITE','ENGL','ENGL','NULL','AMEAMERCN','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '150362','WHITE','ENGL','ENGL','IRI2108-9','NULL','NULL')insert into TEST(Identifier, Race, PrimaryLanguage, PreferredLanguage, Ethnicity, Ethnicity2, Ethnicity3) values( '151270','WHITE','ENGL','ENGL','ENG2108-9','NULL','NULL')[/code] |
Posted: 02 Aug 2013 12:51 AM PDT hi friends,Is there a way to restrict linked server access for a particular login in sql server 2008r2.Thanks in advance. |
How is free space in a database re-used after deleting data? Posted: 02 Aug 2013 12:48 AM PDT Hi All, I have 80gb of free space in a database after unused tables/index and old table data was deleted. I am hoping the data file size does not increase anymore and will use this available free space. Is that safe to assume, if any new data is added to existing tables, the database will use this available free space first?Thanks for the input. |
What is the easiest way to alter fields' default Posted: 01 Aug 2013 11:54 PM PDT I have a database with tables to be updated so that all varchar fields will be given a default '' value and all bit fields will be given 1I am doing this way but am having some issue:1. Loop each table2. Loop each column3. set @sql = 'ALTER TABLE ' + @TableName + 'add constraint df_Constraint' + @ColumnName + ' DEFAULT ' + '''' + '''' + ' FOR ' + @ColumnNameThe problem is it fails when there is already existing constraint for a column.And even if it is working, I am still wondering if there are better ways to do this?Thank you in advance. |
You are subscribed to email updates from SQLServerCentral / SQL Server 2008 - General / SQL Server 2008 To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment