Hi
I would like to download SQL Server 2008 R2 Enterprise Edition, could anyone help me with the link
Hi
I would like to download SQL Server 2008 R2 Enterprise Edition, could anyone help me with the link
Hi All,
I have a query which contains Order quantity, order date and Row_number as Id. The below code produces 15 records as well as row_number for those 15 records. But I need row number for the next 12 months too. That means I need 12 more records with row_number and Order month and order quantity empty.
use [AdventureWorksDW2012]
go
SELECT
SUM([OrderQuantity]) As OrderQuantity
,CONVERT(DATE,[OrderDate]) As OrderDate
,LEFT(d.[EnglishMonthName],3) + '-' + CONVERT(CHAR(4),YEAR([OrderDate])) As OrderMonth
,ROW_NUMBER() OVER(ORDER BY([OrderDate])) As Id
FROM [dbo].[FactResellerSales] f
JOIN [dbo].[DimProduct] p ON f.ProductKey = p.ProductKey
JOIN [dbo].[DimDate] d ON f.OrderDateKey = d.DateKey
WHERE OrderDate >= '2006-04-01' AND EnglishProductName = 'Road-650 Red, 60'
GROUP BY p.[ProductKey], [OrderDate],[EnglishMonthName]
How can I achieve it?
Regards,
Julie
Hi Everyone!
Please help me to restore a backup from a server to another server.
Production Database used SQL Server 2000. We used SQL server 2012 in the office for the backup of data. According to google I need to restore first the backup DB from 2000 to 2008 R2, then make a backup using 2008 R2, done. Then restore the 2008 R2 backup DB to 2012, done. I restored backup DB from SQL server 2000 to 2012.
I used FULL BACKUP of the DB in the above steps.
PROBLEM: What if the backup data from the production site is in Incremental data backup and it will be transferred using FTP? I have no idea in this type of backup.
How to restore it from 2000 to 2012?
Your help will be much appreciated! CHEERS! :))
-Gerger
Hi
I have recently upgraded my SQL server to 2014 express from 2012. I coped out a database .mdf so that i could attach it after. It attaches ok and i can view the database inside SQL server no problem but whwn i make a data connection to it through visual studio 2013, i get this error-
During the Data connection wizard, i click "Test Connection" and it succeeds just fine. Im guessing it somethingto do with 2014 being Version 12 and my database being version 11.
How can i get this database connection to work?
Thanks
Nigel
Nacho is the derivative of Nigel "True fact!"
I am fairly new to MS SQL and SSRS and am hoping to get some info on the correct steps to take while moving forward.
I was provided with MS SQL server 2008 R@ as part of project along with the SSRS functionality to fulfill a reporting need that i had on this project.
I was a little confused with the lack of options in the Visual studio 2008 that was part of this package, but was reassured by those who provided it that it would do everything i needed. I therfor econtinued to move forward.
I successfully set up the databases and tables and have created about a dozen or so reports with SSRS. Once this was done i had a need to create a user interface for some data manipulation as well as manual data entry. The visual studio version i have, that came with MS SQL Server 2008 did not have these features. I was trying to use c#.
I was told to get a free version of C# by downloading Visual studio Epxress 2013. I did this, and used C# to crate a few Windows forms for the above requirements.
Once the forms were done and the all the data was verified i felt it was a good time to set-up automatic back-ups on my database now that it was actually being used. I found that the "free" version did not supprot automatic back-ups and i would need to purchase an licensed version. I was recommended ot purchased MS SQL Servers 2014 and i am now installing that.
While I was waiting for this purchase to take place ( i work for the government ;-(, i figured i would take a look at my options for setting up the subscriptions on SSRS to auto dispatch my reports on a schedule. I found out that that feature is not supported on the Free version that i received with MS SQL 2008.
I stopped working on this and figured i might as well set up the SSRS manager and get the reports on our network so they can be used, no problem there, except that i have so functionality for printing the reports or viewing them in page view, or e-mailing them. I am assuming this is due to the "Free" software.
Since this was not working, i decided to jsut try and link my Win Form to the SSRS and use it to print them, and i now know that the express version does not have the ability to work with SSRS.
Long story longer, all this "free" software and advice is getting old and i would like to just buy what i need
I know i need the following "features":
Back-up feature for MS SQL (hoping that this is being taken care of with the update to 2014)
One Visual studio software that will let me use SSRS to create reports as well as use C# to create Win forms, but also offer some flexibility in the future with new requirements. I don't know what those requirements might be since i am fairly new at this, but i don't mind buying a little more than i need at this point, since the "free" stuff is only giving me headaches.
Ability to trigger report printing via a Win Form as well as create small reports in a win Form.
Will the SSRS that comes with my new "licensed" 2014 version of MS SQL Server allow me to have the full functionality of SSRS, for example access to subscriptions, email protocol to e-mail reports and access to the basic buttons on the Web banner that let me view reports in page view as well print and the other basic features that i got used to using when i was in preview mode in VS 2008 while i was building my reports.
Thank You in advance to anyone who can offer some direction or advice.
My disk is running out of space and as a result I decided to free some space by deleting old data. I tried to delete 100,000 by 100,000 as there are 240 million records to be deleted. But I am unable to delete them at once and shrinking the database doesn't free much space. This is the error im getting at times.
The transaction log for database 'TEST_ARCHIVE' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases
How can I overcome this situation and delete all the old records? Please advice.mayooran99
Hi All,
I'm trying to automate the "Maintenance plan". I was able to do it through GUI by logging into SQL studio.
But, I'm supposed to automate by embedding the SQL command into jython.
Would be greatfull if somebody can provide me complete steps for maintenance plan.
Below is the Maintenance plan I'm expecting for:
DBE – Full BackupMy question is related to the definition of “device” as this term is used in the PUR for SQL Server 2014 Standard. We are currently using per-core licensing but would like to find out if Server+CAL would be appropriate.
Our system includes a server (Linux based) that collects data from utility meters, such as residential and commercial electric, gas and water meters. This Linux-based server then loads the collected data into a SQL Server database using a batch process.
Question: are these meters considered ‘devices’ for the purpose of PUR and do they require a CAL for each meter?
Thanks,
Vlad
HI
I hope you're having a great day today.
I have installed SQL Server 2008 Express edition today and I would connect it to my web site project with is running on Visual web developer 2008 but I couldn't do it. When I press connect to database a new windows opens and then I should choose Microsoft sql server and then in other new window so I must choose server name which is exact my problem and I cannot see my computer's name so I am not able to add this tool to my site. I attached some pic so you can understand me easier.
If you clikck the below link so you can see the screen shot what I mean exactly.
http://up.vbiran.ir/uploads/38758142791273915659_Snapshot_2015-04-01_185800.png
Dear All,
i am migrating from SQL server 2008 r2 enterprize edition to 2014 express with advanced service..
Please, guide me what will be consideration points ..
Regarding Reporting Services ..
also TSQL support ..
Help must appreciated ..
Dilip Patil..
I understand how to use EXCEPT and INTERSECT BUT how Do use it with two different servers? I have the production database on server1, the conversion database on server2. The databases are identical EXCEPT there is more (new) data in CONVERSION.
I want one query that properly coded returns the differences between production and conversion. I expect to run EXCEPT first (PRODUCTION on left, CONVERSION on right), then I will run INTERSECT (PRODUCTION on left, CONVERSION on right).
How do I get the full network path: SERVER/DATABASE/TABLE?
USE SERVERNAME1.PRODUCTION; SELECT person_id ,person_name FROM person_detail AS x USE SERVERNAME2.CONVERSION; SELECT person_id ,person_name FROM person AS y GO SELECT * FROM x EXCEPT SELECT * FROM y;
I've come across an issue where large numbers of statistics (some user created, some auto created) in a database have no Updated value when using the SHOW_STATS system function, but do exist when I search for them in sys.stats. These statistics sometimes belong to non-clustered indexes on the table, and sometimes don't (i.e., they just belong to the columns). Additionally, if I run DBCC SHOW_STATISTCS no data is returned for these particular stats. They exist, but have no zero statistical data and I can't tell if they were ever updated.
Couple question:
1) How does this happen?
2) Is this an indication of a problem (i.e., are these "orphaned statistics")?
3) Does this suggest they should be dropped since they clearly serve no purpose.
Thanks!
Hi
I need to run the debug to a store procedure in sqlserver, but from remote server (database server), if the database is local not problem, but if the database is in other server throw an error of debug.
What can i do?
thank you
Hi following is a working code
declare @dte as datetime='2015-04-01' declare @StDt as Datetime = DATEADD(mm,DATEDIFF(mm,0,@dte), 0) declare @EnDt as datetime = DATEADD( DD, -1, DATEADD(mm,DATEDIFF(mm,0,@dte) + 1, 0)); DECLARE @query AS NVARCHAR(MAX); create table #bus_master(bus_id int,bus_name varchar(50),uname varchar(50)) insert into #bus_master values(100,'A','lekshmi') insert into #bus_master values(101,'B','lekshmi') insert into #bus_master values(102,'C','lekshmi') insert into #bus_master values(103,'D','krishna') insert into #bus_master values(104,'E','krishna') insert into #bus_master values(105,'F','krishna') create table #busdetails( bus_id int,tour_date datetime,status varchar(10)) insert into #busdetails values(103,'2013-10-01','booked') insert into #busdetails values(102,'2013-10-01','booked') insert into #busdetails values(100,'2013-10-02','booked') ;WITH Dates AS( SELECT DATEADD( DD, ROW_NUMBER() OVER( ORDER BY (SELECT NULL)) - 1, @StDt) Month_date FROM (VALUES(0),(0),(0),(0),(0),(0))E(N), (VALUES(0),(0),(0),(0),(0),(0))E2(N) ) SELECT @Query = 'SELECT m.bus_id as ID ' + CHAR(13)+ (SELECT CHAR(9) + ',MAX( CASE WHEN tour_date = ''' + CONVERT( CHAR(8), Month_date, 112) + ''' THEN status END) AS ' + QUOTENAME( CONVERT( char(2), Month_date, 103)) + CHAR(13) FROM Dates WHERE Month_date BETWEEN @StDt AND @EnDt ORDER BY Month_date FOR XML PATH(''),TYPE).value('.','varchar(max)')+ ' FROM #bus_master m LEFT JOIN busdetails b ON m.bus_id = b.bus_id GROUP BY m.bus_id ' execute(@Query) drop table #bus_master drop table #busdetails
iam getting the ouput correctly
my requirement is i want to write a condition
here
JOIN busdetails b ON m.bus_id = b.bus_id
i want to write this statement as
JOIN busdetails b ON m.bus_id = b.bus_id and m.uname='lekshmi'
when i tried this code iam getting error
how to solve this
I'm trying to upgrade from SQL Server 2008 Express to SQL Server 2008 R2 Enterprise. The installation is failing. I get two log files. The first appears to be a summary. The second is an MSI install log file. The MSI log is too large to paste in here and I cannot attach files, so I included the section where it appears to fail. Based on the log contents below, how can I fix this?
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2068024447
Exit facility code: 1212
Exit error code: 29569
Exit message: Failed: see details below
Start time: 2015-04-06 21:07:14
End time: 2015-04-06 21:13:54
Requested action: Upgrade
Log with failure: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20150406_210629\sql_engine_core_inst_ctp6_Cpu64_1.log
Exception help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.50.1600.1
Machine Properties:
Machine name: DAD-PC
Machine processor count: 12
OS version: Windows 7
OS service pack: Service Pack 1
OS region: United States
OS language: English (United States)
OS architecture: x64
Process architecture: 64 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID
Feature Language
Edition Version Clustered
Sql Server 2008 SQLEXPRESS MSSQL10.SQLEXPRESS Database Engine Services
1033 Express Edition 10.3.5500.0 No
Sql Server 2008 SQLEXPRESS MSSQL10.SQLEXPRESS SQL Server Replication
1033 Express Edition 10.3.5500.0 No
Sql Server 2008
Management Tools - Basic 1033 Express Edition
10.0.1600.22 No
Package properties:
Description: SQL Server Database Services 2008 R2
ProductName: SQL Server 2008 R2
Type: RTM
Version: 10
SPLevel: 0
Installation location: H:\x64\setup\
Installation edition: ENTERPRISE
User Input Settings:
ACTION: Upgrade
AGTDOMAINGROUP: <empty>
BROWSERSVCSTARTUPTYPE: Disabled
CONFIGURATIONFILE: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20150406_210629\ConfigurationFile.ini
CUSOURCE:
ENU: True
ERRORREPORTING: True
FAILOVERCLUSTERROLLOWNERSHIP: 2
FARMACCOUNT: <empty>
FARMADMINPORT: 0
FARMPASSWORD: *****
FTSVCACCOUNT: <empty>
FTSVCPASSWORD: *****
FTUPGRADEOPTION: Import
HELP: False
IACCEPTSQLSERVERLICENSETERMS: False
INDICATEPROGRESS: False
INSTANCEID: SQLEXPRESS
INSTANCENAME: SQLEXPRESS
ISSVCACCOUNT: NT AUTHORITY\NetworkService
ISSVCPASSWORD: *****
ISSVCSTARTUPTYPE: Automatic
PASSPHRASE: *****
PCUSOURCE:
PID: *****
QUIET: False
QUIETSIMPLE: False
RSCATALOGSERVERINSTANCENAME: Unknown
RSUPGRADEDATABASEACCOUNT:
RSUPGRADEPASSWORD: *****
SQLDOMAINGROUP: <empty>
SQMREPORTING: False
UIMODE: Normal
X86: False
Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20150406_210629\ConfigurationFile.ini
Detailed results:
Feature: Database Engine Services
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: SQL Writer
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: SQL Browser
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: SQL Server Replication
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: SQL Compact Edition Tools
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: Management Tools - Basic
Status: Passed
MSI status: Passed
Configuration status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20150406_210629\SystemConfigurationCheck_Report.htm
PARTIAL MSI LOG BELOW
Action start 21:13:47: AppSearch.
MSI (s) (40:00) [21:13:47:914]: Note: 1: 1325 2: v2.0.50727
MSI (s) (40:00) [21:13:47:914]: Note: 1: 1325 2: EventLogMessages.dll
MSI (s) (40:00) [21:13:47:914]: PROPERTY CHANGE: Adding ASPNET_EVENTLOGDLL property. Its value is 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727\EventLogMessages.dll'.
MSI (s) (40:00) [21:13:47:915]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\\Setup 3: 2
MSI (s) (40:00) [21:13:47:915]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FBD367D1-642F-47CF-B79B-9BE48FB34007} 3: 2
MSI (s) (40:00) [21:13:47:915]: PROPERTY CHANGE: Adding INSTALLSQLSHAREDDIR_32 property. Its value is 'C:\Program Files (x86)\Microsoft SQL Server\'.
MSI (s) (40:00) [21:13:47:916]: PROPERTY CHANGE: Adding INSTALLSQLSHAREDDIR_64 property. Its value is 'C:\Program Files\Microsoft SQL Server\'.
MSI (s) (40:00) [21:13:47:916]: PROPERTY CHANGE: Adding DEVENV_IDE8 property. Its value is 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\'.
MSI (s) (40:00) [21:13:47:917]: PROPERTY CHANGE: Adding SQLSETUPARPWRAPPER property. Its value is 'C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release\x64\SetupARP.exe'.
MSI (s) (40:00) [21:13:47:917]: Doing action: RestoreSetupParams_64
Action ended 21:13:47: AppSearch. Return value 1.
MSI (s) (40:00) [21:13:47:920]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'RestoreSetupParams_64'
MSI (s) (40:C0) [21:13:47:921]: Invoking remote custom action. DLL: C:\Windows\Installer\MSICCED.tmp, Entrypoint: RestoreSetupParams
Action start 21:13:47: RestoreSetupParams_64.
<Func Name='LaunchFunction'>
Function=RestoreSetupParams
<Func Name='SetCAContext'>
<EndFunc Name='SetCAContext' Return='T' GetLastError='203'>
Doing Action: RestoreSetupParams
PerfTime Start: RestoreSetupParams : Mon Apr 06 21:13:47 2015
<Func Name='RestoreSetupParams'>
Error Code: 0x80077381 (29569)
Windows Error Text: Source File Name: sqlca\sqlcax.cpp
Compiler Timestamp: Thu Jul 3 22:23:09 2008
Function Name: RestoreSetupParams
Source Line Number: 190
Error Code: 29569
MSI (s) (40!D0) [21:13:51:016]: Product: Microsoft SQL Server 2008 Database Engine Services -- Error 29569. SQL Server Setup failed to restore the instance id.
Error 29569. SQL Server Setup failed to restore the instance id.
<Failure Type='Fatal' Error='29569'>
<EndFunc Name='LaunchFunction' Return='29569' GetLastError='203'>
CustomAction RestoreSetupParams_64 returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Ram utilization very high for SQL Server
hi,
I have encountered a doubt while I was reading about dynamic management objects.how would we relate these objects into practical usage.
select *from sys.dm_os_schedulers;when i have executed the above queries ,the textbook suggested me to look for some particular columns but how could i remember them and practice towards a realtime application....could anyone help me out with this..?
thank you.!!!
Version: SQL 2008 R2
Problem: I have a user who wants to remove table, but when she tries to remove it ( drop the table), she gets an error:
===========================================================
MSG 3724, Level 16, State 2, Line 6: Cannot drop the table, 'dbo.<table name>' because it is being used for replication.
MSG 2714, Level 16, State 6, Line 2
There is already an object named '<table name>' in the database.
============================================================
To investigate, I saw the following:
In the SSMS---> Replcation---> Local Publication--> [XYZ].Pub_XYZ
[SERVER Name].[XYZ_Replication]
Local Subscriptions:
[Reference DB].[Server\Instance].[Instance Name]:ABC.ABC_TO_XYZ.Reference DB).
How do I remove that table? Do I need to edit Replication? How? Which one?
Thanks for your help.