OnLine Code Formatter

Nov 15, 2007

I am sure that most of you will have seen this but for those of you who haven’t, its basically a dialog box where you dump you T-SQL and then tell it which system your using (ie. MS SQL). When you press the format button, it returns an almost perfectly formatted version. The link is:

http://www.sqlinform.com/

Hope it helps

Steve

View 5 Replies


ADVERTISEMENT

Free Online SQL Formatter

Jun 10, 2005

We have just release a free Online SQL Formatter
which can beautify different sql dialects for you on the fly,
and translate to other languages such as C#, Java,Delphi with many format options.

Try it here:
http://www.wangz.net/gsqlparser/sqlpp/sqlformat.htm

View 14 Replies View Related

Code To Check If DB Is Online

Apr 4, 2008

I want to check whether or not a DB is online when a report is run. If it is offline I would like to display a friendly message.

Currently my users get error messages when they run a report against a database that is offline. They get incomplete reports if they run a report while the database is being restored.

How can I detect the state of the database and display the appropriate friendly message? Is there a property to check or an event where I should write some code?

I look forward to your response.

View 2 Replies View Related

Recovery :: Server Cluster Resource Fails To Come Online And Pending Online State

Nov 3, 2015

We have SQL cluster installed on top of windows cluster on VM environment. Node1 and Node2 under Windows Failover Cluster. SQL instance is currently on node2 the instance is up and running, but SQL Cluster service remains online pending and it restarts the instance on every 5 minutes.

SQL Browser service are running successfully.TCP/IP ports are enabled and configured.If we start the SQL server agent it is on for seconds and stopped immediately  .Cluster Service is attempt to connect to the SQL service every few minutes (setting in SQL cluster resource) for the IsAlive check, if this fails then the SQL resource is restarted even if the instance was online. Hope this is what happening exactly.

[sqsrvres] ODBC Error: [08001] [Microsoft][SQL Server Native Client 11.0]SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].  (268435455)
00001024.00053314::2015/10/30-19:57:50.772 ERR   [RES] SQL Server <SQL Server (SIMAH_COMMDB)>: [sqsrvres] ODBC Error: [HYT00] [Microsoft][SQL Server Native Client 11.0]Login timeout expired (0)
00001024.00053314::2015/10/30-19:57:50.772 ERR   [RES] SQL Server <SQL Server (SIMAH_COMMDB)>: [sqsrvres] ODBC Error: [08001] [Microsoft][SQL Server

Native Client 11.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books

Online. (268435455)
00001024.00053314::2015/10/30-19:57:50.772 INFO  [RES] SQL Server <SQL Server (SIMAH_COMMDB)>: [sqsrvres] Could not connect to SQL Server (rc -1

View 5 Replies View Related

SQL Formatter Tool !!!!!!!!!!!!!!

Jun 27, 2002

1) Is there a tool out there that formats sql code for (SQL 2000) ?

2) if you have a date split into year = 2002, month =1 and day= 22
how can l combine it or rather concatenate it so it looks like
'2002-01-22'

View 1 Replies View Related

T-SQL Formatter In SQL 2000

May 3, 2006

Hi,

Does anybody know of A T-SQL formatter?
If so, are there any good formatters :-)

TIA

Regards,

Sander

View 1 Replies View Related

Get Db Online

Mar 16, 2006

Hi

I have made a small mistake while restoring the DB I selected the 3rd option in the em

Leave the DB read-only and able to restore additional transactional logs

I have just realized that all I have is a complete back up to restore & no transaction logss...

I see the Db in a Read-only state & when I try to get it online It says
Error 5063 : Db is a warm standby. A warm standby db is read-only
Alter DB statement failed.
sp_dboption command failed

Please Help

View 5 Replies View Related

Help With Converting Code: VB Code In SQL Server 2000-&&>Visual Studio BI 2005

Jul 27, 2006

Hi all--I'm trying to convert a function which I inherited from a SQL Server 2000 DTS package to something usable in an SSIS package in SQL Server 2005. Given the original code here:
Function Main()
on error resume next
dim cn, i, rs, sSQL
Set cn = CreateObject("ADODB.Connection")
cn.Open "Provider=sqloledb;Server=<server_name>;Database=<db_name>;User ID=<sysadmin_user>;Password=<password>"
set rs = CreateObject("ADODB.Recordset")
set rs = DTSGlobalVariables("SQLstring").value

for i = 1 to rs.RecordCount
sSQL = rs.Fields(0).value
cn.Execute sSQL, , 128 'adExecuteNoRecords option for faster execution
rs.MoveNext
Next

Main = DTSTaskExecResult_Success

End Function

This code was originally programmed in the SQL Server ActiveX Task type in a DTS package designed to take an open-ended number of SQL statements generated by another task as input, then execute each SQL statement sequentially. Upon this code's success, move on to the next step. (Of course, there was no additional documentation with this code. :-)

Based on other postings, I attempted to push this code into a Visual Studio BI 2005 Script Task with the following change:

public Sub Main()

...

Dts.TaskResult = Dts.Results.Success

End Class

I get the following error when I attempt to compile this:

Error 30209: Option Strict On requires all variable declarations to have an 'As' clause.

I am new to Visual Basic, so I'm on a learning curve here. From what I know of this script:
- The variables here violate the new Option Strict On requirement in VS 2005 to declare what type of object your variable is supposed to use.

- I need to explicitly declare each object, unless I turn off the Option Strict On (which didn't seem recommended, based on what I read).

Given this statement:

dim cn, i, rs, sSQL

I'm looking at "i" as type Integer; rs and sSQL are open-ended arrays, but can't quite figure out how to read the code here:

Set cn = CreateObject("ADODB.Connection")

cn.Open "Provider=sqloledb;Server=<server_name>;Database=<db_name>;User ID=<sysadmin_user>;Password=<password>"

set rs = CreateObject("ADODB.Recordset")

This code seems to create an instance of a COM component, then pass provider information and create the recordset being passed in by the previous task, but am not sure whether this syntax is correct for VS 2005 or what data type declaration to make here. Any ideas/help on how to rewrite this code would be greatly appreciated!

View 7 Replies View Related

How To Show Description In Report Instead Of Code (Desc For Code Is In Master Table)

Mar 28, 2007

Dear Friends,



I am having 2 Tables.

Table 1: AddressBook
Fields --> User Name, Address, CountryCode



Table 2: Country
Fields --> Country Code, Country Name


Step 1 : I have created a Cube with these two tables using SSAS.



Step 2 : I have created a report in SSRS showing Address list.

The Column in the report are User Name, Address, Country Name



But I have no idea, how to convert this Country Code to Country name.

I am generating the report using the Layout tab. ( Data | Layout | Preview ) Report1.rdl [Design]



Anyone help me to solve this issue. Because, in our project most of the transaction tables have Code and Code description in master table. I need to convert all code into corresponding description in all my reports.




Thanks in advance.





Regards
Ramakrishnan
Singapore
28 March 2007

View 4 Replies View Related

Can You Use SQL For Online Games?

Jan 8, 2008

I know MMORPGs take tons of special servers, but what about a simple 2D minorly-multiplayer online game, say with 3-5 players- could that be run through an SQL database or is it still too slow?

View 2 Replies View Related

SQL Reference Online?

Jan 21, 2004

Hi,

I'm looking for a good reference guide online as I am more used to mysql (and stil quite limited vocab at that)

I create table outside of a database by accident and I'm now looking for the sql syntaxt for moving tables, but I can't find it anywhere?

most simple guides don't seem to provide the syntax to do this. :(

View 11 Replies View Related

Best OnLine Backup

Sep 29, 1999

Can someone share with me their experience or thougts on whether it is better to :
1) backup db to the disk first, then to the tape OR
2) use online backup which backup the database on realtime basis to the tape.

Any excellent software for online backup?

View 1 Replies View Related

Make SQL Available Online

Sep 28, 2005

Can anyone tell me how I would go about making my SQL server accessable from the Internet, or know of any good tutorials to get me started, I haven't had much luck looking on google.

I need to access an SQL database from one server on another server for a web application.

Thanks

View 4 Replies View Related

Need Online Tutor

Jul 1, 2007

Dear fellows,

I need online database tutor whom I can pay and he makes my database concepts from scratch. Is there any such facility available

Regards

View 4 Replies View Related

Online Sql Interpreter

May 16, 2008

Hi,

I have started to learn SQL, I need to practise those commands through online sql interpreter. Is there any web page available to do so? or where can i down load it for free?

View 5 Replies View Related

Books Online

Aug 10, 2005

How do you use BOL? I've heard time again that there is much info in BOL but when i look at it it seems too brief and not detailed. I find it hard to find what i'm looking for anyway. How do you use it?

Thanks!

View 13 Replies View Related

Online Graphics

Dec 15, 2007

Hello all! Im new to SQL2005. If it is possible to see realtime graphs from tables? For example current sales result?

Thanx

View 1 Replies View Related

SQL Online Backup...

Jul 20, 2005

Dear Friends,I don't know anybody has asked this question before or not.But I needa support urgently.How to take online backup in MS Sql server 2000.ThanksArijit Chatterjee

View 2 Replies View Related

How To Get Datafile Online Again?

May 23, 2007

Hi need to something like this:

"alter database modify file (name=<name>, ONLINE)",

but it isn't possible.



Here what I did:

alter database bdj add file (name ='bdjfg1', filename='d:db
djfg1.ndf' )
to filegroup bdjfg;


alter database bdj modify file (name='bdjfg1', OFFLINE);


alter database bdj modify file (name ='bdjfg1', filename='d:db
ewdestdjfg1.ndf' );
--Msg 5056, Level 16, State 4, Line 1
--Cannot add, remove, or modify a file in filegroup 'bdjfg' because
the filegroup is offline.


alter database bdj modify filegroup bdjfg READWRITE;
--Msg 5056, Level 16, State 3, Line 1
--Cannot add, remove, or modify a file in filegroup 'bdjfg' because
the filegroup is offline.



Yes, yes and should have read the cautions section saying:

"Use this option only when the file is corrupted and can be restored. A file set to OFFLINE can only
be set online by restoring the file from backup. For more information about restoring a single file,
see RESTORE (Transact-SQL)."



But I have not an backup of the datafile, but I have the datafile itself!

What can I do to get it online again, the old location could be fine, but it would be better on an new location (thats is the reason for all the trouble, the original drive has not much space left, so I wanted to move the datafile)



What can I do, HELP

/Bjorn



View 1 Replies View Related

Login To Online Sql Database

Apr 11, 2005

Hi all; I am trying to login to an online sql database from enterprise manager;
First of all is this possible and second of all, how do I go about doing it from enterprise manager (by the way I am using MS SQL 2000)
THanks for any assistance

View 1 Replies View Related

SQL Database Diagrams Online?

May 10, 2001

Hi,

I hope i'm in the right forum. Is there a way to create a DB diagram schema via ASP/HTML and publish it on-line - keeping it up-to-date?
I want to at least output a diagram schema to HTML format? Any ideas. TIA!

View 2 Replies View Related

Online Books / Tutorials

Aug 2, 2002

Hi All...

Can anyone guide me to a place where I can download some Tutorials / Books (Not that new) covering Microsoft SQL 2000 essentials ? I tried to find here, but artices are too advanced for me.. I need something that covers the Basic and that could be used as a small reference/guide while I am learing...

Thanks to ALL

View 1 Replies View Related

SP That Lists The Servers Online

May 3, 2001

Does anyone know which SP to use to get the list of available servers?
I want to call it from a VB app via ADO to provide the user with a choice of servers available.

View 1 Replies View Related

Locating Database Online

Apr 20, 2006

I've just started with a company that had a web developer in to set up their site. She set it up with Coldfusion and MS SQL Server, uploaded the whole thing to their provider, then disappeared. Then the whole thing got dumped in my lap, and I'm pretty new to both SQL Server and Coldfusion.

My first question is, how can I access the SQL Server database online? It's somewhere on the web host's site, and I have the name of it and the password, but I have no clue how I'm supposed to get a look at the thing. Is there a file I should be able to find? Can anyone provide a clue?

Thanks!
April

View 5 Replies View Related

Offline|Online Database

Dec 21, 2005

Hi,

Is there any method to get an historical log where appears the database status (Online|offline) ?

Regards.

View 1 Replies View Related

Books Online Downloads For Ver 6.5/6.0/4

Sep 14, 2006

Dear all

Where can I download Sql Server Books Online for any versions of 6.5 or 6.0 or 4.

thanks

View 1 Replies View Related

SQL 2012 :: How To Set BOL To Local Once Set To Online

Aug 10, 2015

When I first opened Books Online, I chose the option to run the documentation online rather than locally; now I would like to change that to locally.

View 3 Replies View Related

Online Index On Large DB (&> 4GB)

May 22, 2007

Anyone using the ONLINE=ON option on large DB's? We have a db of 5 GB and we are doing some load testing for SQL 2005. We are modifying the Index scripts for the upgrade. We will run a load with the ONLINE=ON option but just wanted to find out if anyone already is doing it on a similar scale db and has seen any issues?
Also, we have auto-update stats off at the DB level. Does setting the ONLINE=ON require turning this auto-update stats to ON too? I didnt see anything to that effect in BOL, so was wondering.

Thanks for any feedback.

Dinakar Nethi
SQL Server MVP
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/

View 7 Replies View Related

Bring Db Online/offline

Jul 23, 2005

Hello there,I have a user who can bring offline a database but he cannot bring thedatabase back online.The error which pops up is:Error5011: User does not have permission to alter database dbnameALTER DATABASE statement failed.sp_dboption command failed.Any ideas?Thanks

View 1 Replies View Related

How To Get Online/offline Status

Jul 20, 2005

Hi,i try get information about the online or offline status of a databasewithin ms-sql srv 2000.I can look it up within server manager, but I'm looking for a way to getthis information from the command line or a select statement.Is there a command or a sql statement that tells me the status of adatabase ? There's some information in master.dbo.sysdatabases, but itlooks very cryptic.Any help appreciated, thanks,stefan

View 1 Replies View Related

Online Index Problem

Feb 6, 2008

So, I was under the impression that with the online index feature in SQL 2005 would prevent blocking if DML statements occur on the underlying table. I tried to rebuild the indexes on one of our tables that has a lot of traffic, and it caused a ton of blocking statements. Would anyone have any ideas why this would occur?

View 3 Replies View Related

Remote Online Backups

Mar 20, 2008

We have about 40 locations worldwide, with a typical data size of about 200 GB per location, with some up to 2 TB. Most sites have 1024 to 1536 Kb/s MPLS links, with a few 2 Mb/s and one 4.5 Mb/s. Central data center has two 45 Mb/s links.

We are looking to remote, online backups to our data center from each location. I'm wondering which products and processes have worked.

Has anybody successfully implemented remote, online backups of Windows servers across their WAN to a central data center?

View 2 Replies View Related

I Am Practicing By Building A PM Online App

May 11, 2006

In my Project table.

I have a column called projSeqNum (Project Sequence Number) I was with a fellow techie -data modeler- and I think it was just placed with an int data type. I think a 4 length.

My question is what would be the correct data type here. There could be 100's of thousands of unique Project ID's so I need something sturdy but not overboard.

Any ideas?

View 3 Replies View Related







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