How To Get Server Name And Databases Name From A Server Using SQL Command...

Jul 26, 2007

can anyone tell me
How to get server name and databases name from a server using SQL Command...
i m using sql server 2000(T-SQL)

View 2 Replies


ADVERTISEMENT

SQL Server 2000 Databases To SQL Server 2005? Enterprise Manager And Management Stuio At The Same Server?

Feb 13, 2008

When I proposed start to use SQL Server 2005 for new VS 2005 web sites, one of my co-workers responded that
we will update the old SQL Server 2000 databases to SQL Server 2005 when we are ready to use 2005 SQL Server.

Questions:
1. Any expected problems to upgrade old 2000 databases to new 2005 SQL Server?
2. I have installed both 2005/Management Studio Express and 2000/Enterprise Manager in my PC. Any expected
problems when running both 2000 and 2005 SQL Server at the same database server?
3. What is the best configuration for running SQL Server 2005 when we have old 2000 databases? Upgade or not upgrade?

TIA,
Jeffrey

View 4 Replies View Related

How Read CSV File In Other Server Using Bulk Insert Command In Sql Server In Different Server...

Mar 24, 2008

Hi All,
 Please some one help me...
I have to insert a csv into one table in sql server. But the problem is the file is in one server and SQL SERVER 2005 is in other server..
 how do i insert the file....
please help me.....
 

View 1 Replies View Related

SQL Command To Show Only Databases That Contain A Particular Table

Dec 5, 2007

I have several databases that are used to collect data for differentclient-projects. My intention was to collect the data, and administermySQL so each client could see only their data. Each of thesedatabases used to collect data have the same tables. There are otherdatabases which are available to all the users which contain commoninformation.The command "show databases" lists all of the databases (visible tothe particular user) and not the one's I would like to display (thedatabases used to collect data). Is there a way to nest a singlemySQL command to show only the databases that have the same particulartable?

View 1 Replies View Related

Other Way To Execute The Xp_cmdshell Command On Remote Databases From Local?

Nov 14, 2007

Hi all,


Criteria:

We connect to the remote database servers through the network from loca by using Query Analyzer.
Previously we were able to execute the xp_cmdshell command from local Query Analyzer to fetch the remote databases data.
But now we are unable to execute the xp_cmdshell command on remote databases from local Query Analyzer
We do not know what happened but i think due to network updates this command is not able to execute...


For ex:
Previously i was able to execute master..xp_cmdshell 'net start' from local Query Analyzer.But now not able to execute


Now my question is, is there any other way(Directly or indirectly) to execute the xp_cmdshell command on remote databases from local?


Note : we are able to execute this command on remote Query Analyzer but not from local QA

Any suggestions would be very very helpful to me?


Thanks in advance,



View 6 Replies View Related

SQL Server 2000 SQL Agent Error [393] Waiting For SQL Server To Recover Databases

Jan 30, 2007

While I was out of the office the Lan Team moved one of my SQL Server2000 servers to a new network domain. Since then the maintenance jobhas not ran.The error log for the SQL Agents has the message listed in the subjectline. I have not found any useful articles on the MS SQL Serversite. Anyone know what might be wrong and how to fix it.HTH -- Mark D Powell --

View 4 Replies View Related

SQL Server Management Studio Express Won't Open SQL Server Compact 3.5 Databases

May 7, 2008

Hi all

Which tool can I use for structure editing of SQL Server Compact 3.5 databases? I'm installed SQL Server Compact 3.5. I have SQL Server Management Studio Express which was installed with SQL Server 2005 Express. Unfortunately this SSMS can create and open only 3.1 databases.

View 5 Replies View Related

SQL Server 2005: Copying Tables And Stored Procedures Between Databases On Same Server

Mar 5, 2008

This question is about SQL Server 2005:
I have been trying to figure out how to copy tables and stored procedures between 2 databases (on the same server) using SQL Server Management Studio. I have tried right clicking on the table name, "script table as", "drop to", "clipboard", then I click on the 2nd database, and then click on the "tables" . I change the name of the database and click "execute". This creates the table but does not copy the data. I have also tried "create to" "clipboard" and "insert to" "clipboard" and cannot seem to be able to figure out how to get the results that I want. I am new at this but need to get the tables with the data copied along with the stored procedures, even if I have to do them one at a time. When I was using SQL Server 2000, I was able to use DTS to copy objects to other databases easily. Can someone please tell me a way to accomplish what I need to do? I have gotten information here before that was very useful and was hoping that someone can help me again.Thank you so much. Carol Quinn

View 9 Replies View Related

SQL 2012 :: TDE Encrypted Databases On 2 Different Server To Be Restored On Single Dev Server

Apr 29, 2015

have a Prod Server A having TDE enabled on 2 of those databases. I have a Prod Server B having TDE enabled on 3 of those databases. Now I have to create a single Dev server Server C for all the above 5 databases residing on the two servers. So how can I restore all the 5 database backup files on server C.

Does it mean that I need to copy the certificates and Keys from both the Prod server to this Dev Box and then restore the backup files. Once done, I can enable the encryption ON on those 5 database on Dev box or is there any different approach.Also how will tempdb behave in this scenario.

View 5 Replies View Related

Restoring SQL Server Databases After Uninstalling And Reinstalling SQL Server.

Mar 11, 2004

Hi

I have another question : 1) Restoring SQL Server Databases after uninstalling and reinstalling SQL Server.

Two days ago there was some problem with Norton Antivirus, so Windows 98 restored itself to a previous state. The SQL Server name was not available when I tried to start again, so I had to uninstall and reinstall SQL Server. I started a new Database just a week before this happened (the change from Access to SQL Server as I stated in the other thread http://www.dbforums.com/showthread.php?threadid=987880) and after reinstallation I could not access the Database any more - even while it is in the Data directory. I did not have any backup to restore from - I just started creating tables, so there was only the Log file created and the MDF database file. I tried to import it for a while to the new server, but as the database is not shown in the new server, it was unable to import like I hoped. So how do you restore it back to SQL Server when you have no backup and only the (undamaged) MDF database file if you only have one server? I had to recreate the Database from scratch again - I don't want it to happen again.

Regards

Corné

View 4 Replies View Related

Upgrading Sql Server 2000 Databases To Sql Server 2005

Aug 8, 2007



I don't have any idea about upgrading databases.I am been given this task.
It would be great if you let me know what are all the things to be considered upgrading the sql server 2000 databases to sql server 2005.

Please let me know

Thanks

View 1 Replies View Related

Restore A Set Of Databases From A SQL2000 Server To A SQL2005 Server

Nov 3, 2006



I can restore databases one by one, setting .mdf and .ldf destination paths.

How can I restore all my Databases at the same time?

Thanks

G. Zanghi

View 7 Replies View Related

Question: Migration SQL Server (Databases) To Another SQL Server.

Aug 19, 2004

Hello ppl,

I’m curious what’s the best way to migrate all SQL databases (with all users) to another server.

Are there tools to do a migration like this or must I do it manual?

Thanks for your time and answer.

With kind regards,
Pedro

P.S. Its SQL 2000 on a Windows Server 2003 OS

View 2 Replies View Related

Moving My SQL 7.0 Databases To A New Server To Replace The Old Server

May 5, 2006

My existing SQL server is an old box that can no longer cope with the load. I need to replace it with a brand new box.

I am looking for a comprehensive set of steps that I could follow to ensure that the transition to the new server goes well.

I'm looking to transfer all my user databases but I'm not so sure whether I have to backup and restore my system databases to the new server as well.

I want to name the new server the same as the old server since I will be taking the old server out of production but I'm not sure whether I should rename the server AFTER I move over all the database and how that would affect SQL. Or should I first rename the old server, remove it out of the domain, then name my new server with the same name as my old server, and then proceed with the SQL installation and the moving of the databases.

Also, I do have a maintenance plan, DTS packages and some jobs set up on my old server that I would also like to move to the new server.

Is there a web page that explains all the steps in granular detail ?



View 1 Replies View Related

Moving Databases From One SQL Server To Another SQL Server

Apr 19, 2001

what is the easiest way to move a database on one SQL server to another SQL server?

View 2 Replies View Related

Transfering Databases From One Sql 7 Server To Another Sql 7 Server

Aug 1, 2001

can anyone help me get around the following error I am trying to transfer a database from one sql 7 server to another but keep recieving this problem when I attempt a restore of the backup file. Is anyone able to give us any advice tips etc. Any other ways to transfer the db would be good as well!thanks guys!
"The database you are attempting to restore was backed up under a different sort order ID(51) than the one currently running on this server (52), and at least one of them is non binary sort order. Backup or restore operation terminating abnormally."

View 1 Replies View Related

Bcp Command In SQL Server 6.5

Jun 22, 1998

Hi, there,

In Unix, there is dump utility "dd" which can dump unformated text file into a fixed length text file, which, in tern, can read into Access database. I don`t know if SQL Server has a similar functionality. Does the "bcp" command work
in a simialr way? Is any successful experience can be shared?

Thanks in advance.


Eugene Shi
L. Robert Kimball & Associates
return e-mail: shieug@lrkimball.com

View 1 Replies View Related

Connecting SQL Server Through MS Doc Command

Apr 26, 2001

Can anyone tell me how I can connect database of SQL Server through MS Command prompt?

For example, if it is Oracle, the following works.

sqlplus userid/password/dbname

Is there any command which is equivalent as above in SQL Server?

Thank you.
H.

View 1 Replies View Related

Connecting SQL Server Through MS Doc Command

Apr 26, 2001

Can anyone tell me how I can connect database of SQL Server through MS Command prompt?

For example, if it is Oracle, the following works.

sqlplus userid/password/dbname

Is there any command which is equivalent as above in SQL Server?

Thank you.
H.

View 2 Replies View Related

Rolling Back SQL Server 2005 Databases Back To SQL Server 2000

Sep 22, 2006

Does anybody know of a way to rollback SQL Server 2005
databases back to SQL Server 2000? Is there a way of doing it without
resorting to Copy Database Wizard? I love to find a way of attaching a SS 2005 database
to a SS 2000 instance without any issues.



I recently upgraded to SS 2005 and I am very unhappy with the SS 2005 and I
want to rollback to SS 2000, which was a lot more stable. I am having
several major issues that are affecting my whole company's day-to-day
operations and the managers are not happy. Some of the issues include
night time batch running very sluggish for no apparent reason. This is a
biggest problem because it only occurs once or so a week and causes a disturbance
with the daily activities when the night time processing isn€™t completed on
time. The rest of the time, the batch processing runs great, even a little better then on SS 2000. I
don't believe it is a matter of my application needing to be retuned because if
that was the case, then why isn't it running sluggish every night? Also,
it's never the same day that the sluggish behavior occurs. If it was occurring
on the same night, then I would have something to investigate within our
application, but it doesn't. Another issue that I am having involves a
night time job that restores a copy of the production database to the Data
Warehouse server to be used for updating the data warehouse. Again, most
of the time it runs great (~2 1/2 hours), but once or twice a week, it goes
stupid and takes 6 1/2 hours for no apparent reason. Again, it is not happening
the same day either, which could give me something to invesigate. On SS 2000, this same job ran flawlessly. Never I did I run into situation that the
database restoration took that long to run. Even another issue involves a SQL Server Agent Job that was put into suspended
state. What's a suspended state and how can I get it out of suspended
state? I can find no information about suspended state in BOL. I
did a Google and nothing came up. If this suspended state was put
in for security reasons, great, but then tell me how I can remove the suspended
state. I am also not happy with the
fact that I can't get accurate information about the queries that are actively
running at that particular moment. In SS 2000, when I noticed high CPU
usage on the server, I would run the sp_who2 active stored proc and it would
show me all the active thread and how much CPU it was consuming. I would
then find the running threads with the highest CPU numbers and investigate the
query and see if we could improve it. Now in SS 2005, I get in the same
situation and run the sp_who2 stored proc, and there is no smoking gun.
All of the active threads are showing very little CPU usage, which I am very
suspect of. What the heck happen to sp_who2? I looked at some of
the other ways of looking at running processes (i.e... sys.sysprocesses) and
they don't appear to be giving the information that I need.



I am very unhappy and I just want to roll back to SS 2000 and wait a couple of
years before I upgrade to SS 2005.


Dave Brown

View 1 Replies View Related

SQL Server 7.0 Top Command Convert To Oracle 8i

Jul 26, 2000

I'm trying to convert a simple SQL Statement over to Oracle...

Select top 25 * from Customers

Is there a way to just select the top 25 in Oracle??

Thanks

View 1 Replies View Related

Running Sp From The Command Prompt (of Another Server)

Jan 23, 2001

I have created linked servers and successfully run the following stored procedure.

exec [db-2001server].sales..sp_test

Can anyone give me the exact syntax for running the same from command promt(without using the query analyzer).I am new to isql/osql.So,please help me with the syntax.
Thanks!!

View 1 Replies View Related

Import CSV To Server From Command Line

Mar 26, 2015

I want to import a huge .csv file in my sql server database.

There are about 10000 rows and 30 columns

My file looks like this:
Attributname1; Attributname2; Attributname3; ...
data; data; data;...
data; data; data;...
data; data; data;...

Now my idea is to do this on the command line/batch script. I have found different ways to do this job but the problem is i have to create a table in the database first. The entries in the first line of the csv file are the attribute names.

After creating the table with attributes i must write the data in the database.

View 1 Replies View Related

SQL Server: Command Line Support

Jul 23, 2005

Hello,I would like to know whether it is possible to execute DTS(Data Transformation Services) packages created from withinthe EM (Enterprise Manager) user interface, from the commandline. That is, is it possible to execute a command at the DOSprompt which will execute, and optionally also reconfigure,the DTS package? This would allow invoking DTS packagesfrom within scripts.Thank you for your replies,Neil

View 2 Replies View Related

SQL Server Express Command Line

Feb 16, 2008

I can't find a command line where to write the queries for SQL Server express.
Can someoane give me a link with some documentation?

Thank you.

View 1 Replies View Related

Using The Command Prompt Via SQL Server Agent

Jun 4, 2007

I need to verify a csv file exists before I call a stored procedure to complete a bulk insert. The first step in the SP will be to verify the file exists (that particular "Job" step did not fail). I have only one step in the job that I have set the type as "Operating System (CmdExec)" and the Command is "Dir C:NAFCDMDataShipmentsCooperShipments.csv". When I execute the job manually to verify the proper operation I receive the error listed below. I know the path and file name are correct as I originally typed in the UNC, when it failed I copied it from the Address bar. I attempted to move the file to the root location without success. I attempted to use another file. I have attempted to rename the file. The DBAs will not allow me to use the SP_cmdshell stored procedure (that was my first thought).

I added 'Everyone' with Full Access to the root folder and propagated these permissions to all containing folders. This again did not allow the job to run. I changed the statment to "REN C:NAFCDMShipmentsShipment.csv Shipment1.csv". I continue to get the same error. Can someone Please point me in a direction to fix this problem?



"The process could not be created for step 1 of job 0x71D51027F920A140A2913234DB7FF509

(reason: The system cannot find the file specified). The step failed.

The job failed. The Job was invoked by User sa. The last step to run was step 1 (Verify the File's Existance)."

View 1 Replies View Related

Spool Command In SQL Server 2005

Feb 23, 2007

Hi

Can i have the output of my queries on the console window as well as in a text file at the same time something that Oracle's SPOOL command does.

Regards
Salil

View 1 Replies View Related

Pivot Command In SQL SERVER 2005

Mar 3, 2008



Can we PIVOT on more than 1 column in SQL SERVER 2005? For eg,
I have this select using Pivot, but I need to pivot on a second column too. I need to see a fourth column, in the output, that will be the TOTAL across for each requesters.
How can I do that.


select case when requester is not null then requester else 'Unknown' end as Requester,
[Pending],[PENDING - RECORDING INFORMATION] from
(select case when requester is not null then requester else 'Unknown' end as Requester,
case when AMPSSTATUS is not null then ampsstatus else 'Null'end as Ampsstatus,loannum
from TABLEA
)p pivot (count(loannum)
for AMPSSTATUS in
([Pending],[PENDING - RECORDING INFORMATION])) as pvt

View 2 Replies View Related

How To Pass The IP Address As A Server Name In Command

Jun 8, 2007

Hi, there,



I am creating a job, which will run a DTS package (SQL 2000), Due to the way it set up, I need to pass the IP address as the server name,



for example, say the IP address is 64.84.50.11

User name is sa

password is webpass

package name is datadump1



I used the command



EXEC master..xp_cmdshell 'dtsrun /S64.84.50.11 /Usa /Pwebpass /Ndatadump1'



when I run it in query analyzer, it returns an error,

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '/'.



Is there anyone know what's wrong with my command?



Thank you very much

View 1 Replies View Related

Why SQL Server Over Other Databases?

Jun 21, 2007

Hi

We have a server hosting about 150/200 webpages. The webpages content are provided by Access databases. Now we are planning to change to other platform, but we are not sure about the most suitable solution to our business in cost/performance terms.

We work in .NET platform, so in a first sight the most suitable database to work is SQL Server. The licenses for this platform costs nearly 6000 $ per CPU (our server is built with 4), so it's necessary to evaluate if really other cheaper or even free databases (as Firebird, MySQL, Oracle -don't know how cost this platform-) could be suitable for our server.

Which advantages have SQL Server 2005 over the rest of databases?. You think the budget necessary for Microsoft's database could be profitable at long range?

Thanks in advance.

View 14 Replies View Related

SQL Server Not Seeing Databases

Oct 3, 2005

Hi
I have been a bit of an idiot. I was using MSDE. I de-installed it and installed SQL Server Developer Ed 2000. I then copied my MSDE databases to the SQL Server data folder, but the SQL SErver cannot see them. Can anybody tell me how to sort this out please.

Regards
Carriolan

View 1 Replies View Related

Two Databases - Same Server

May 30, 2007

Does anyone know of any performance considerations when dealing with data that resides in two databases on the same server?

We use one database as a staging area for bulk loaded data. Once we are happy with the data we insert or update the equivalent tables in the "real" database but performance is terrible when the tables are joined across the databases. The execution plan indicates that the clustered key is used on the real database and a covering index on the staging database.

Are there any rules of thumb or gotchas that I should remind myself of when joining between databases?

TIA

=======================================
If Tyranny and Oppression come to this land, it will be in the guise of fighting a foreign enemy. -James Madison, fourth US president (1751-1836)

View 1 Replies View Related

Get Databases Available In Server

Dec 7, 2007

I'm trying to list off all the Databases available in a Server, preferrably a sql query which is provider independant e.g. using INFORMATION_SCHEMA

I've tried using 'select * from INFORMATION_SCHEMA.SCHEMATA' on the servers master db but it only returns a list of entries all of which are 'master'.

How can this be done?

View 20 Replies View Related







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