Quantcast
Channel: Forum Getting started with SQL Server
Viewing all 8979 articles
Browse latest View live

Restore a Database

$
0
0

SQL Server: 2008R2Method of RestoreError Message

Hi,

I am trying to restore a refresh copy of a Database from one server to another. But I keep getting errors. I will attempt to upload the screen shots of my procedure and error.

#1: Method of Restore

#2: Error Message

I would appreciate any help.

Thanks.



New install of older version on new machine questions (2008 R2 Express)

$
0
0

Hi,

I want to setup SQL Server 2008 R2 Express to an i5 machine running window 8.1. This should include ssis, ssrs, ssas, and the management studio. The instructions say to:

Step 1: Install Microsoft .NET Framework 2.0 or later from theDownload center

Step 2: Download SQL Server Express by clicking the SQLEXPR.EXE or SQLEXPR32.EXE link on this page. To start the installation immediately, click Run. To install SQL Server Express at a later time, click Save.
Note: SQLEXPR32.EXE is a smaller package that can be used to install SQL Server Express on 32-bit operating systems only. The SQLEXPR.EXE package supports installing onto both 32-bit and 64-bit (WOW install) operating systems. There is no other difference between these packages.

Step 3: Follow the installation instructions provided in the Readme. Known issues may be found in the release notes.

How do I do this on a new operating system without messing up the operation of other programs?

Is there any downside to loading the 64 bit version?

There are 9 files in the download section, none exactly the same name?

Does this also require installation of Visual Studio? If so which ver.?

I could not find a way in 8.1 to see the version of .net framework but is it likely higher than the required 2.0?

Sorry for my lack of understanding these basics, I have been siloed doing VBA for Access and Excel. The last I wrote any T-SQL was ver. 2000 about 8 years ago and need to expand my skills for a new assignment.

Thanks for any assistance,

alr0

What is the choice of predicate in the ON or WHERE caluse?

$
0
0

Hello,

Can anyone tell me what is the choice of the side (left/right)  of predicate in ON or WHERE clause?

Suppose there is a select statement

select * from table1 t1

inner join table2 t2 on t1.column1=t2.column1

left join table3 t3 on t3.column1=t2.column1

On what scenarios should we change the left/right side predicate order.

i.e when should we put the order of predicate the other way

1) t2.column1=t1.column1 

2) t2.column1=t3.column1

Does it affect performance of a query in any way?

Regards


Regards

BCP Utility Comma

$
0
0
I have the following problem. I need to create a .csv file with SQL (with the bcp utility). I can create this .csv file and the following data is inserted:
1","ad","dsa","333","","2","0","","","","""

I want to avoid this double quotes. I want only double quotes if there is a comma in one field. For better understanding, the following 3 cases must be done.

Fields containin commas can be surounded by quotation marks, these must be double quotation marks (“ ”) and not single (‘ ’) e.g.

“a, b, c” would be accepted as 1 single field but a, b, c would be 3 separate fields.

In adition, any double quotation marks which need to be displayed in a field must also be surounded by double quotation marks e.g.

If an address should display as “The Street”, this should be sent as ““The Street””

Apostrophes can be sent in the file e.g.
A client with surname O’Clay and forename Jenny with a free text field holding “comma, example” would be sent in the file as O’Clay,Jenny,”comma,example”.


This is my code:
bcp TESTPROJECT.dbo.table out c:\aa.txt -c -t"\",\"" -r"\"\n\"" -S .\sql2014 -U username -P password

So the problem is in the -t"\",\"" -r"\"\n\"" part but how I can do this?

Run as different domain user.

$
0
0

Hi, 

Need to test a new Windows login in SSMS.  

I setup a shortcut as below but I seem access SSMS using the domain account I specified in the shortcut, even though I have been prompted for the password. 

C:\Windows\System32\runas.exe /netonly /user:rkh\sqlmonitor "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe" 

Any ideas? 

How much data is consumed when we connect to SQL server DB remotely?

$
0
0

Hello,

How much data is consumed (kbps/sec or mbps/sec) when we connect to remote sql server database (i.e connecting from my server at  home to sql server database at my office). The size of my DB in the server in 10 gb. As i have limited data policy from my inertent service provider, i am confused whther to download the db completely and use it offline or access it online every time from my home?

Regards


Regards


Make the database drop down wider?

$
0
0
I've tried grabbing this and dragging it left/right to see if it would increase in size, but I could only move it side to side.  Is there a way to make the drop down in SSMS that displays the databases attached to the current instance wider?

Intellisense Stopped Working

$
0
0

A day or two ago, IntelliSense stopped working on my computer. Specifically, it doesn't capitalize built-in function names and it doesn't list the available tables in the same way. I am using MS SQL Server Management Studio 2008 R2. I've tried the following fixes:

  • In Tools > Options > Text Editor > Transact-SQL > IntellisSense, every box has a check in it and "Casing for built-in function names" says "Upper case".
  • IntelliSense is enabled (Query > IntelliSense enabled).
  • I ran Edit > IntelliSense > Refresh local cache several times.

Can anyone help me? Thanks!


How to find what app server the database is connected to in Mgmt Studio

$
0
0

Hi all,

First time using this forum...I have question for SQL Mgmt Studio...forgive my ignorance I know nothing about SQL other a few basics.  Anyway, I have been tasked with setting up documentation to show which database is connected to which application server.  Some of these my DB admin does not even know as it was there before them.  So my question is...is there a way within the Mgmt Studio gui (which I DO have proper access) to find this out?  When I click on a DB and go to properties it tells me alot about the db itself but there is nothing about where the front end is that's connecting to it. 

Any help would be great, thanks!  BTW using SQL server 2008 Mgmt Studio version 10

Software Assurance is required

$
0
0

My customer has a private windows domain with 2 locations, main and the branch. The main office has 2  VMWare host servers that are utilizing shared storage. It is hosting a virtual domain controller, virtual file server, virtual email server and a Virtual SQL server.  On physical host “A”, They have a domain controller and SQL server. On physical host “B”, They have a file server and email server. They have the high availability capacity in VMware to move all virtual servers from host “A” to host “B” in the event of a hardware failure. They have to purchase SQL 2014 Standard Edition. I am told I have to purchase software assurance for their scenario. Is this correct?

database mail configuration

$
0
0

hi, 

  please tell how to configure database mail through smtp, can i configure it with hot mail account and what server name i should give, if i configure with hot mail.

Able to Restore DB through GUI even the DB is in offline state.

$
0
0

Hi,

I made the DB offline and right click on the database and found the restore option greyed out and it wont allow to perform the restore operation.

But before making the database offline if I launch the restore operation and donot hit run (Right click on the DB--Task--Restore--selected the option to restore) and minimize the Restore GUI and then put DB offline and bring up the minimized restore window and hit OK,I am able to restore the DB.

So is this a bug that when we make the DB offline and look for the Restore option on GUI,the option is greyed out and doesnot allow us to restore where as before making the database offline, launch the restore operation and donot hit run (Right click on the DB--Task--Restore--selected the option to restore) and minimize the Restore GUI and then put DB offline bring up the minimized restore window and hit OK,I am able to restore the DB?

Thanks,

Deepak Sahu.


SQL Server 2014 Express, missing Data Type

$
0
0
My problem is a simple one. When I create a new column and give it a Data Type, my options do not inlcude the "time" type. I found the documentation about available data types, and time is listed as one for SQL 2014. My desire is to have a data type that fits the HH:MM:SS format, excluding the date part that datetime offers. Any assistance is greatly appreciated.

Decommissioning SQL Server 6.5 -- ODBC drivers, etc.

$
0
0
I'm a software consultant who's been hired to extract the data from a SQL Server 6.5 database and put it into something...anything, more modern, just so they can look at historical data once in a blue moon. It's been a very long time since I've worked with a SQL 6.5 version server. As an Action Pack subscriber I've got access to all of the modern SQL Server tools.  Is DTS even an option? I'm guessing I might need to have that version of ODBC driver to work with this version of server, or would the newer ones be backward compatible? If I need an old ODBC driver, does anybody know where I can get one? Some insight of what I might be up against would be helpful.

Combining "AND" and "OR" statements in SQL

$
0
0

I'm used to Visual FoxPro (VFP) coding and am just learning SQL.  In VFP, I can say: SELECT name FROM table1 WHERE city = "Chicago" AND (street = "Elm" OR street = "Maple")    with the parentheses in those positions.  How would I combine this statement in SQL?  - Thanks.


Jim Fuchs, Davenport, IA


guest account

$
0
0
Is there anyway to query via TSQL, to list all databases in a SQL instance (2000, 2005 and 2008) to list if the guest account has access to the database?

Print data in same line

$
0
0

Hi,

i have loop like printing number from 1 to 5.

But i want to print those output in the same line. What i am getting is 1 and on next line 2 and goes on.

Sample:

while @i<5

begin

print @i;

set @i=@i+1;

end

I know that it can be done like concating the data in a string variable. and finally to print it. But i am eager to know is there any function to achieve this.

Thanks in advance.



NANDAKUMAR.T

Problem with the SELECT statement

$
0
0

I wanted to create a view from ms. access. So I used the following code

CREATE VIEW  Teaches (DayId,DayName,Period,SubName) AS
SELECT D.DayId,D.DayName,P.Period,S.SubName
FROM Day AS  D,Period AS  P, Subject AS  S,Teaching AS  T
WHERE T.DayNo=D.DayId AND T.PeriodNo=P.PerId AND T.SubNo=S.SubId
ORDER BY D.DayId ASC;

But its saying that there is a problem at the FROM statement. Can anyone tell me why this doesn't work?

Split single row in multiple rows based on date range

$
0
0

I need sql script that can split single row in multiple rows based on start date and end date column in table.

Thank you


Login Failed, Error State 8 Password Mismatch For the Client [xx.xx.xx.xx]

$
0
0

Hi Experts,

Sql error log I could notice that "Password Mismatch for the login from the client [WebServer IP Address]", the error occuring too many times in a minute say for example in 1 Min nearly 140 errors.

Web server application is working fine I just wants to find the exact application name and calling funtions which trying to connect to SQL with wrong password.

Can I use Trace or Profiler to get more detials about the login Password mismatch error.?

Thanks,

Nandhu

Viewing all 8979 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>